src/Entity/Gos/Uniqskills/LessonType.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\Uniqskills;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6.  * @ORM\Table()
  7.  * @ORM\Entity
  8.  * @ORM\HasLifecycleCallbacks
  9.  */
  10. class LessonType
  11. {
  12.     /**
  13.      * @ORM\Column(type="integer")
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue(strategy="IDENTITY")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="boolean", nullable=true)
  20.      */
  21.     private $isActive;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $name;
  26.     /**
  27.      * @Gedmo\Slug(fields={"name"})
  28.      * @ORM\Column(type="string", length=191, unique=true)
  29.      */
  30.     private $slug;
  31.     /**
  32.      * @ORM\Column(type="datetime")
  33.      */
  34.     private $createdAt;
  35.     /**
  36.      * @ORM\Column(type="datetime", nullable=true)
  37.      */
  38.     private $updatedAt;
  39.     /** @ORM\PrePersist() */
  40.     public function prePersist()
  41.     {
  42.         $this->createdAt = new \DateTime();
  43.     }
  44.     /** @ORM\PreUpdate() */
  45.     public function preUpdate()
  46.     {
  47.         $this->updatedAt = new \DateTime();
  48.     }
  49.     public function __toString()
  50.     {
  51.         return (string)$this->name;
  52.     }
  53.     /* ****************************** GETTERS & SETTERS ******************************  */
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getIsActive(): ?bool
  59.     {
  60.         return $this->isActive;
  61.     }
  62.     public function setIsActive(?bool $isActive): self
  63.     {
  64.         $this->isActive $isActive;
  65.         return $this;
  66.     }
  67.     public function getName(): ?string
  68.     {
  69.         return $this->name;
  70.     }
  71.     public function setName(string $name): self
  72.     {
  73.         $this->name $name;
  74.         return $this;
  75.     }
  76.     public function getSlug(): ?string
  77.     {
  78.         return $this->slug;
  79.     }
  80.     public function setSlug(string $slug): self
  81.     {
  82.         $this->slug $slug;
  83.         return $this;
  84.     }
  85.     public function getCreatedAt(): ?\DateTimeInterface
  86.     {
  87.         return $this->createdAt;
  88.     }
  89.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  90.     {
  91.         $this->createdAt $createdAt;
  92.         return $this;
  93.     }
  94.     public function getUpdatedAt(): ?\DateTimeInterface
  95.     {
  96.         return $this->updatedAt;
  97.     }
  98.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  99.     {
  100.         $this->updatedAt $updatedAt;
  101.         return $this;
  102.     }
  103. }