<?phpnamespace App\Entity\Gos;use App\Entity\Gos\Uniqskills\Course;use App\Repository\Gos\CourseNotifyRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=CourseNotifyRepository::class) * @ORM\HasLifecycleCallbacks() */class CourseNotify{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Course::class, inversedBy="courseNotifies") * @ORM\JoinColumn(nullable=false) */ private $course; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) */ private $user; /** * @ORM\ManyToOne(targetEntity=OrderPart::class) * @ORM\JoinColumn(nullable=true) */ private $orderPart; /** * @ORM\Column(type="datetime", nullable=true) */ private $mailSentAt; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="string", length=1000, nullable=true) */ private $status; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) */ private $createdBy; public function __construct(Course $course, User $user, User $author, OrderPart $orderPart = null) { $this->course = $course; $this->user = $user; $this->createdBy = $author; $this->orderPart = $orderPart; } /** @ORM\PrePersist() */ public function onPrePersist() { $this->createdAt = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getCourse(): ?Course { return $this->course; } public function setCourse(?Course $course): self { $this->course = $course; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getOrderPart(): ?OrderPart { return $this->orderPart; } public function setOrderPart(?OrderPart $orderPart): self { $this->orderPart = $orderPart; return $this; } public function getMailSentAt(): ?\DateTimeInterface { return $this->mailSentAt; } public function setMailSentAt(?\DateTimeInterface $mailSentAt): self { $this->mailSentAt = $mailSentAt; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): self { $this->status = $status; return $this; } public function getCreatedBy(): ?User { return $this->createdBy; } public function setCreatedBy(?User $createdBy): self { $this->createdBy = $createdBy; return $this; }}