<?php
namespace App\Entity;
use App\Repository\TvConfigurationRepository;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\DiscriminatorColumn;
use Doctrine\ORM\Mapping\InheritanceType;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=TvConfigurationRepository::class)
* @InheritanceType("SINGLE_TABLE")
* @DiscriminatorColumn(name="code", type="string")
* @ORM\HasLifecycleCallbacks()
*/
class TvConfiguration
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"daily_advice:write","daily_advice:read"})
*/
protected $id;
/**
* @ORM\Column(type="string", length=255)
* @Groups({"faq_question:read", "faq_question:write"})
*/
protected $field;
/**
* @ORM\Column(type="text")
* @Groups({"faq_question:read", "faq_question:write", "faq_answer:read", "faq_answer:write"})
*/
protected $value;
/**
* @ORM\Column(type="boolean", options={"default": 1})
* @Groups({"daily_advice:write","daily_advice:read", "faq_question:read", "faq_question:write", "faq_answer:read", "faq_answer:write"})
*/
protected $active = true;
/**
* @ORM\Column(type="datetime")
* @Gedmo\Timestampable(on="create")
* @Groups({"daily_advice:read"})
*/
protected $createdAt;
/**
* @ORM\Column(type="datetime")
* @Gedmo\Timestampable(on="create")
* @Groups({"daily_advice:read"})
*/
protected $updatedAt;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default": 1})
* @Groups({"daily_advice:write", "daily_advice:read"})
*/
protected $display = true;
public function __construct()
{
$this->updatedAt = new \DateTime();
$this->createdAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getField(): ?string
{
return $this->field;
}
public function setField(string $field): self
{
$this->field = $field;
return $this;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(string $value): self
{
$this->value = $value;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @param mixed $active
* @return TvConfiguration
*/
public function setActive($active): TvConfiguration
{
$this->active = $active;
return $this;
}
/**
* @return mixed
*/
public function getActive()
{
return $this->active;
}
public function getDisplay(): ?bool
{
return $this->display;
}
public function setDisplay(?bool $display): self
{
$this->display = $display;
return $this;
}
}