src/Entity/GpReminder.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\MDS\GreenPatioBundle\Entity\Reservation;
  4. use App\Repository\GpReminderRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=GpReminderRepository::class)
  8.  * @ORM\HasLifecycleCallbacks()
  9.  */
  10. class GpReminder
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=User::class)
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $user;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=Reservation::class, inversedBy="gpReminders")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $reservation;
  28.     /**
  29.      * @ORM\Column(type="datetime")
  30.      */
  31.     private $reminderAt;
  32.     /**
  33.      * @ORM\Column(type="datetime_immutable")
  34.      */
  35.     private $createdAt;
  36.     /**
  37.      * @ORM\Column(type="datetime_immutable")
  38.      */
  39.     private $updatedAt;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity=User::class)
  42.      * @ORM\JoinColumn(nullable=false)
  43.      */
  44.     private $createdId;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=User::class)
  47.      * @ORM\JoinColumn(nullable=false)
  48.      */
  49.     private $updatedId;
  50.     /**
  51.      * @ORM\Column(type="string", length=255)
  52.      */
  53.     private $reminder;
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getUser(): ?User
  59.     {
  60.         return $this->user;
  61.     }
  62.     public function setUser(?User $user): self
  63.     {
  64.         $this->user $user;
  65.         return $this;
  66.     }
  67.     public function getReservation(): ?Reservation
  68.     {
  69.         return $this->reservation;
  70.     }
  71.     public function setReservation(?Reservation $reservation): self
  72.     {
  73.         $this->reservation $reservation;
  74.         return $this;
  75.     }
  76.     public function getReminderAt(): ?\DateTimeInterface
  77.     {
  78.         return $this->reminderAt;
  79.     }
  80.     public function setReminderAt(\DateTimeInterface $reminderAt): self
  81.     {
  82.         $this->reminderAt $reminderAt;
  83.         return $this;
  84.     }
  85.     public function getCreatedAt(): ?\DateTimeImmutable
  86.     {
  87.         return $this->createdAt;
  88.     }
  89.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  90.     {
  91.         $this->createdAt $createdAt;
  92.         return $this;
  93.     }
  94.     public function getUpdatedAt(): ?\DateTimeImmutable
  95.     {
  96.         return $this->updatedAt;
  97.     }
  98.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  99.     {
  100.         $this->updatedAt $updatedAt;
  101.         return $this;
  102.     }
  103.     public function getCreatedId(): ?User
  104.     {
  105.         return $this->createdId;
  106.     }
  107.     public function setCreatedId(?User $createdId): self
  108.     {
  109.         $this->createdId $createdId;
  110.         return $this;
  111.     }
  112.     public function getUpdatedId(): ?User
  113.     {
  114.         return $this->updatedId;
  115.     }
  116.     public function setUpdatedId(?User $updatedId): self
  117.     {
  118.         $this->updatedId $updatedId;
  119.         return $this;
  120.     }
  121.     /**
  122.      * @ORM\PrePersist
  123.      */
  124.     public function setCreatedAtValue()
  125.     {
  126.         $this->createdAt = new \DateTimeImmutable();
  127.     }
  128.     /**
  129.      * @ORM\PrePersist
  130.      * @ORM\PreUpdate
  131.      */
  132.     public function setUpdatedAtValue()
  133.     {
  134.         $this->updatedAt = new \DateTimeImmutable();
  135.     }
  136.     public function getReminder(): ?string
  137.     {
  138.         return $this->reminder;
  139.     }
  140.     public function setReminder(string $reminder): self
  141.     {
  142.         $this->reminder $reminder;
  143.         return $this;
  144.     }
  145. }