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

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\Uniqskills;
  3. use App\Entity\Gos\User;
  4. use App\Repository\Gos\Uniqskills\UserVideoNotesRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=UserVideoNotesRepository::class)
  8.  * @ORM\HasLifecycleCallbacks()
  9.  */
  10. class UserVideoNotes
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $time;
  22.     /**
  23.      * @ORM\Column(type="text")
  24.      */
  25.     private $note;
  26.     /**
  27.      * @ORM\Column(type="datetime")
  28.      */
  29.     private $createdAt;
  30.     /**
  31.      * @ORM\Column(type="datetime", nullable=true)
  32.      */
  33.     private $updatedAt;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userVideoNotes")
  36.      */
  37.     private $user;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=Lesson::class, inversedBy="userVideoNotes")
  40.      */
  41.     private $lesson;
  42.     /** @ORM\PrePersist() */
  43.     public function prePersist()
  44.     {
  45.         $this->createdAt = new \DateTime();
  46.     }
  47.     /** @ORM\PreUpdate() */
  48.     public function preUpdate()
  49.     {
  50.         $this->updatedAt = new \DateTime();
  51.     }
  52.     public function getId(): ?int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function getTime(): ?int
  57.     {
  58.         return $this->time;
  59.     }
  60.     public function setTime(int $time): self
  61.     {
  62.         $this->time $time;
  63.         return $this;
  64.     }
  65.     public function getNote(): ?string
  66.     {
  67.         return $this->note;
  68.     }
  69.     public function setNote(string $note): self
  70.     {
  71.         $this->note $note;
  72.         return $this;
  73.     }
  74.     public function getCreatedAt(): ?\DateTimeInterface
  75.     {
  76.         return $this->createdAt;
  77.     }
  78.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  79.     {
  80.         $this->createdAt $createdAt;
  81.         return $this;
  82.     }
  83.     public function getUpdatedAt(): ?\DateTimeInterface
  84.     {
  85.         return $this->updatedAt;
  86.     }
  87.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  88.     {
  89.         $this->updatedAt $updatedAt;
  90.         return $this;
  91.     }
  92.     public function getUser(): ?User
  93.     {
  94.         return $this->user;
  95.     }
  96.     public function setUser(?User $user): self
  97.     {
  98.         $this->user $user;
  99.         return $this;
  100.     }
  101.     public function getLesson(): ?Lesson
  102.     {
  103.         return $this->lesson;
  104.     }
  105.     public function setLesson(?Lesson $lesson): self
  106.     {
  107.         $this->lesson $lesson;
  108.         return $this;
  109.     }
  110. }