src/Entity/Gos/Uniqskills/OrderError.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\Uniqskills;
  3. use App\Entity\Gos\User;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\Gos\Uniqskills\OrderErrorRepository")
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class OrderError
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\User", inversedBy="ordersError")
  19.      * @ORM\JoinColumn()
  20.      */
  21.     private $user;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="Course", inversedBy="ordersError")
  24.      * @ORM\JoinColumn(name="course_id", referencedColumnName="id", onDelete="SET NULL")
  25.      */
  26.     private $course;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $email;
  31.     /**
  32.      * @ORM\Column(type="text", nullable=true)
  33.      */
  34.     private $messageBody;
  35.     /**
  36.      * @ORM\Column(type="string", length=255)
  37.      */
  38.     private $messageTitle;
  39.     /**
  40.      * @ORM\Column(type="datetime")
  41.      */
  42.     private $createdAt;
  43.     /**
  44.      * @ORM\Column(type="datetime", nullable=true)
  45.      */
  46.     private $updatedAt;
  47.     /** @ORM\PrePersist() */
  48.     public function prePersist()
  49.     {
  50.         $this->createdAt = new \DateTime();
  51.     }
  52.     /** @ORM\PreUpdate() */
  53.     public function preUpdate()
  54.     {
  55.         $this->updatedAt = new \DateTime();
  56.     }
  57.     public function __toString()
  58.     {
  59.         return $this->messageTitle;
  60.     }
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getEmail(): ?string
  66.     {
  67.         return $this->email;
  68.     }
  69.     public function setEmail(?string $email): self
  70.     {
  71.         $this->email $email;
  72.         return $this;
  73.     }
  74.     public function getMessageBody(): ?string
  75.     {
  76.         return $this->messageBody;
  77.     }
  78.     public function setMessageBody(?string $messageBody): self
  79.     {
  80.         $this->messageBody $messageBody;
  81.         return $this;
  82.     }
  83.     public function getMessageTitle(): ?string
  84.     {
  85.         return $this->messageTitle;
  86.     }
  87.     public function setMessageTitle(string $messageTitle): self
  88.     {
  89.         $this->messageTitle $messageTitle;
  90.         return $this;
  91.     }
  92.     public function getCreatedAt(): ?\DateTimeInterface
  93.     {
  94.         return $this->createdAt;
  95.     }
  96.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  97.     {
  98.         $this->createdAt $createdAt;
  99.         return $this;
  100.     }
  101.     public function getUpdatedAt(): ?\DateTimeInterface
  102.     {
  103.         return $this->updatedAt;
  104.     }
  105.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  106.     {
  107.         $this->updatedAt $updatedAt;
  108.         return $this;
  109.     }
  110.     public function getUser(): ?User
  111.     {
  112.         return $this->user;
  113.     }
  114.     public function setUser(?User $user): self
  115.     {
  116.         $this->user $user;
  117.         return $this;
  118.     }
  119.     public function getCourse(): ?Course
  120.     {
  121.         return $this->course;
  122.     }
  123.     public function setCourse(?Course $course): self
  124.     {
  125.         $this->course $course;
  126.         return $this;
  127.     }
  128. }