src/Entity/Gos/CourseNotify.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Entity\Gos\Uniqskills\Course;
  4. use App\Repository\Gos\CourseNotifyRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=CourseNotifyRepository::class)
  8.  * @ORM\HasLifecycleCallbacks()
  9.  */
  10. class CourseNotify
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Course::class, inversedBy="courseNotifies")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $course;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=User::class)
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $user;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=OrderPart::class)
  30.      * @ORM\JoinColumn(nullable=true)
  31.      */
  32.     private $orderPart;
  33.     /**
  34.      * @ORM\Column(type="datetime", nullable=true)
  35.      */
  36.     private $mailSentAt;
  37.     /**
  38.      * @ORM\Column(type="datetime")
  39.      */
  40.     private $createdAt;
  41.     /**
  42.      * @ORM\Column(type="string", length=1000, nullable=true)
  43.      */
  44.     private $status;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=User::class)
  47.      * @ORM\JoinColumn(nullable=false)
  48.      */
  49.     private $createdBy;
  50.     public function __construct(Course $courseUser $userUser $author,  OrderPart $orderPart null)
  51.     {
  52.         $this->course $course;
  53.         $this->user $user;
  54.         $this->createdBy $author;
  55.         $this->orderPart $orderPart;
  56.     }
  57.     /** @ORM\PrePersist() */
  58.     public function onPrePersist()
  59.     {
  60.         $this->createdAt = new \DateTime();
  61.     }
  62.     public function getId(): ?int
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function getCourse(): ?Course
  67.     {
  68.         return $this->course;
  69.     }
  70.     public function setCourse(?Course $course): self
  71.     {
  72.         $this->course $course;
  73.         return $this;
  74.     }
  75.     public function getUser(): ?User
  76.     {
  77.         return $this->user;
  78.     }
  79.     public function setUser(?User $user): self
  80.     {
  81.         $this->user $user;
  82.         return $this;
  83.     }
  84.     public function getOrderPart(): ?OrderPart
  85.     {
  86.         return $this->orderPart;
  87.     }
  88.     public function setOrderPart(?OrderPart $orderPart): self
  89.     {
  90.         $this->orderPart $orderPart;
  91.         return $this;
  92.     }
  93.     public function getMailSentAt(): ?\DateTimeInterface
  94.     {
  95.         return $this->mailSentAt;
  96.     }
  97.     public function setMailSentAt(?\DateTimeInterface $mailSentAt): self
  98.     {
  99.         $this->mailSentAt $mailSentAt;
  100.         return $this;
  101.     }
  102.     public function getCreatedAt(): ?\DateTimeInterface
  103.     {
  104.         return $this->createdAt;
  105.     }
  106.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  107.     {
  108.         $this->createdAt $createdAt;
  109.         return $this;
  110.     }
  111.     public function getStatus(): ?string
  112.     {
  113.         return $this->status;
  114.     }
  115.     public function setStatus(?string $status): self
  116.     {
  117.         $this->status $status;
  118.         return $this;
  119.     }
  120.     public function getCreatedBy(): ?User
  121.     {
  122.         return $this->createdBy;
  123.     }
  124.     public function setCreatedBy(?User $createdBy): self
  125.     {
  126.         $this->createdBy $createdBy;
  127.         return $this;
  128.     }
  129. }