src/Entity/InstitutionAppPersonalization.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Traits\Creatable;
  4. use App\Traits\Deleteable;
  5. use App\Traits\Updateable;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. /**
  9.  * @ORM\Table(name="`institution_app_personalization`")
  10.  * @ORM\Entity()
  11.  * @Gedmo\SoftDeleteable(fieldName="deletedAt")
  12.  */
  13. class InstitutionAppPersonalization
  14. {
  15.     use CreatableUpdateableDeleteable;
  16.     /**
  17.      * @ORM\Id
  18.      * @ORM\Column(type="integer")
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private ?int $id null;
  22.     /**
  23.      * @var ?string
  24.      * Primary color of the app (header, buttons, etc.)
  25.      * @ORM\Column(type="string", nullable=true)
  26.      */
  27.     private ?string $primaryColor;
  28.     /**
  29.      * @var ?string
  30.      * Primary variant color of the app, slightly lighter or darker tha primary (decoration, button click, etc.)
  31.      * @ORM\Column(type="string", nullable=true)
  32.      */
  33.     private ?string $primaryVariantColor;
  34.     /**
  35.      * @var ?string
  36.      * Color of the text located over the primary color (header's restaurant name, button's labels, etc.)
  37.      * @ORM\Column(type="string", nullable=true)
  38.      */
  39.     private ?string $textOverPrimaryColor;
  40.     /**
  41.      * @ORM\OneToOne (targetEntity="App\Entity\Institution", inversedBy="institutionAppPersonalization")
  42.      * @ORM\JoinColumn(name="institution_id", referencedColumnName="id")
  43.      */
  44.     private ?Institution $institution null;
  45.     public function __construct()
  46.     {
  47.         $this->primaryColor 'rgba(255, 57, 94, 1)';
  48.         $this->primaryVariantColor 'rgba(228, 47, 82, 1)';
  49.         $this->textOverPrimaryColor 'rgba(255, 255, 255, 1)';
  50.     }
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getPrimaryColor(): ?string
  56.     {
  57.         return $this->primaryColor;
  58.     }
  59.     public function setPrimaryColor(?string $primaryColor): self
  60.     {
  61.         $this->primaryColor $primaryColor;
  62.         return $this;
  63.     }
  64.     public function getPrimaryVariantColor(): ?string
  65.     {
  66.         return $this->primaryVariantColor;
  67.     }
  68.     public function setPrimaryVariantColor(?string $primaryVariantColor): self
  69.     {
  70.         $this->primaryVariantColor $primaryVariantColor;
  71.         return $this;
  72.     }
  73.     public function getTextOverPrimaryColor(): ?string
  74.     {
  75.         return $this->textOverPrimaryColor;
  76.     }
  77.     public function setTextOverPrimaryColor(?string $textOverPrimaryColor): self
  78.     {
  79.         $this->textOverPrimaryColor $textOverPrimaryColor;
  80.         return $this;
  81.     }
  82.     public function getInstitution(): ?Institution
  83.     {
  84.         return $this->institution;
  85.     }
  86.     public function setInstitution(?Institution $institution): self
  87.     {
  88.         $this->institution $institution;
  89.         return $this;
  90.     }
  91. }