src/Entity/TvConfiguration.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TvConfigurationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\ORM\Mapping\DiscriminatorColumn;
  6. use Doctrine\ORM\Mapping\InheritanceType;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. /**
  10.  * @ORM\Entity(repositoryClass=TvConfigurationRepository::class)
  11.  * @InheritanceType("SINGLE_TABLE")
  12.  * @DiscriminatorColumn(name="code", type="string")
  13.  * @ORM\HasLifecycleCallbacks()
  14.  */
  15. class TvConfiguration
  16. {
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue
  20.      * @ORM\Column(type="integer")
  21.      * @Groups({"daily_advice:write","daily_advice:read"})
  22.      */
  23.     protected $id;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      * @Groups({"faq_question:read", "faq_question:write"})
  27.      */
  28.     protected $field;
  29.     /**
  30.      * @ORM\Column(type="text")
  31.      * @Groups({"faq_question:read", "faq_question:write", "faq_answer:read", "faq_answer:write"})
  32.      */
  33.     protected $value;
  34.     /**
  35.      * @ORM\Column(type="boolean", options={"default": 1})
  36.      * @Groups({"daily_advice:write","daily_advice:read", "faq_question:read", "faq_question:write", "faq_answer:read", "faq_answer:write"})
  37.      */
  38.     protected $active true;
  39.     /**
  40.      * @ORM\Column(type="datetime")
  41.      * @Gedmo\Timestampable(on="create")
  42.      * @Groups({"daily_advice:read"})
  43.      */
  44.     protected $createdAt;
  45.     /**
  46.      * @ORM\Column(type="datetime")
  47.      * @Gedmo\Timestampable(on="create")
  48.      * @Groups({"daily_advice:read"})
  49.      */
  50.     protected $updatedAt;
  51.     /**
  52.      * @ORM\Column(type="boolean", nullable=true, options={"default": 1})
  53.      * @Groups({"daily_advice:write", "daily_advice:read"})
  54.      */
  55.     protected $display true;
  56.     public function __construct()
  57.     {
  58.         $this->updatedAt = new \DateTime();
  59.         $this->createdAt = new \DateTime();
  60.     }
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getField(): ?string
  66.     {
  67.         return $this->field;
  68.     }
  69.     public function setField(string $field): self
  70.     {
  71.         $this->field $field;
  72.         return $this;
  73.     }
  74.     public function getValue(): ?string
  75.     {
  76.         return $this->value;
  77.     }
  78.     public function setValue(string $value): self
  79.     {
  80.         $this->value $value;
  81.         return $this;
  82.     }
  83.     public function getCreatedAt(): ?\DateTimeInterface
  84.     {
  85.         return $this->createdAt;
  86.     }
  87.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  88.     {
  89.         $this->createdAt $createdAt;
  90.         return $this;
  91.     }
  92.     public function getUpdatedAt(): ?\DateTimeInterface
  93.     {
  94.         return $this->updatedAt;
  95.     }
  96.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  97.     {
  98.         $this->updatedAt $updatedAt;
  99.         return $this;
  100.     }
  101.     /**
  102.      * @param mixed $active
  103.      * @return TvConfiguration
  104.      */
  105.     public function setActive($active): TvConfiguration
  106.     {
  107.         $this->active $active;
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return mixed
  112.      */
  113.     public function getActive()
  114.     {
  115.         return $this->active;
  116.     }
  117.     public function getDisplay(): ?bool
  118.     {
  119.         return $this->display;
  120.     }
  121.     public function setDisplay(?bool $display): self
  122.     {
  123.         $this->display $display;
  124.         return $this;
  125.     }
  126. }