src/Entity/Cvs/FaqCategories.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Cvs;
  3. use App\Entity\Core\Users;
  4. use App\Entity\Core\Agencies;
  5. use Doctrine\DBAL\Types\Types;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * Faq Categories
  11.  *
  12.  * @ORM\Table("cvs_faq_categories")
  13.  * @ORM\Entity()
  14.  * @ORM\HasLifecycleCallbacks()
  15.  */
  16. class FaqCategories
  17. {
  18.     /**
  19.      * @var integer
  20.      *
  21.      * @ORM\Column(name="id", type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     protected $id;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"})
  30.      */
  31.     private $createdAt;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
  36.      */
  37.     private $updatedAt;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  42.      */
  43.     private $title;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="description", type="text", nullable=true)
  48.      */
  49.     private $description;
  50.     /**
  51.      * @ORM\PrePersist
  52.      */
  53.     public function setCreatedAtValue(): void
  54.     {
  55.         $this->setCreatedAt(new \DateTime("now"));
  56.         $this->setUpdatedAt(new \DateTime("now"));
  57.     }
  58.     /**
  59.      * @ORM\PreUpdate
  60.      */
  61.     public function setUpdatedAtValue(): void
  62.     {
  63.         $this->setUpdatedAt(new \DateTime("now"));
  64.     }
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getCreatedAt(): ?\DateTimeInterface
  70.     {
  71.         return $this->createdAt;
  72.     }
  73.     public function setCreatedAt(?\DateTimeInterface $createdAt): static
  74.     {
  75.         $this->createdAt $createdAt;
  76.         return $this;
  77.     }
  78.     public function getUpdatedAt(): ?\DateTimeInterface
  79.     {
  80.         return $this->updatedAt;
  81.     }
  82.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
  83.     {
  84.         $this->updatedAt $updatedAt;
  85.         return $this;
  86.     }
  87.     public function getTitle(): ?string
  88.     {
  89.         return $this->title;
  90.     }
  91.     public function setTitle(?string $title): static
  92.     {
  93.         $this->title $title;
  94.         return $this;
  95.     }
  96.     public function getDescription(): ?string
  97.     {
  98.         return $this->description;
  99.     }
  100.     public function setDescription(?string $description): static
  101.     {
  102.         $this->description $description;
  103.         return $this;
  104.     }
  105. }