src/Entity/AppointmentPerson.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppointmentPersonRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAppointmentPersonRepository::class)]
  8. #[ORM\HasLifecycleCallbacks]
  9. class AppointmentPerson
  10. {
  11.     const REVERVATION_VALIDATING 1;
  12.     const REVERVATION_CONFIRMED 2;
  13.     const REVERVATION_CANCELED 3;
  14.     use \App\Traits\EntityDateTimeAbleTrait;
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column(type'integer')]
  18.     private $id;
  19.     #[ORM\ManyToOne(targetEntityAppointment::class, inversedBy'appointmentPerson')]
  20.     private ?\App\Entity\Appointment $appointment null;
  21.     #[ORM\ManyToMany(targetEntityProgram::class, inversedBy'appointmentPerson')]
  22.     private Collection $programs;
  23.     #[ORM\ManyToOne(targetEntityProfile::class, inversedBy'appointmentPerson')]
  24.     private ?\App\Entity\Profile $profile null;
  25.     #[ORM\Column(type'integer'nullabletrue)]
  26.     private ?int $reservation null;
  27.     #[ORM\Column(type'boolean'nullabletrue)]
  28.     private ?bool $isEnded null;
  29.     #[ORM\Column(type'text'nullabletrue)]
  30.     private ?string $note null;
  31.     public function __construct()
  32.     {
  33.         $this->programs = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getAppointment(): ?Appointment
  40.     {
  41.         return $this->appointment;
  42.     }
  43.     public function setAppointment(?Appointment $appointment): self
  44.     {
  45.         $this->appointment $appointment;
  46.         return $this;
  47.     }
  48.     /**
  49.      * @return Collection<int, Program>
  50.      */
  51.     public function getPrograms(): Collection
  52.     {
  53.         return $this->programs;
  54.     }
  55.     public function addProgram(Program $program): self
  56.     {
  57.         if (!$this->programs->contains($program)) {
  58.             $this->programs[] = $program;
  59.         }
  60.         return $this;
  61.     }
  62.     public function removeProgram(Program $program): self
  63.     {
  64.         $this->programs->removeElement($program);
  65.         return $this;
  66.     }
  67.     public function getProfile(): ?Profile
  68.     {
  69.         return $this->profile;
  70.     }
  71.     public function setProfile(?Profile $profile): self
  72.     {
  73.         $this->profile $profile;
  74.         return $this;
  75.     }
  76.     public function getReservation(): ?int
  77.     {
  78.         return $this->reservation;
  79.     }
  80.     public function setReservation(?int $reservation): self
  81.     {
  82.         $this->reservation $reservation;
  83.         return $this;
  84.     }
  85.     public function getIsEnded(): ?bool
  86.     {
  87.         return $this->isEnded;
  88.     }
  89.     public function setIsEnded(?bool $isEnded): self
  90.     {
  91.         $this->isEnded $isEnded;
  92.         return $this;
  93.     }
  94.     public function getNote(): ?string
  95.     {
  96.         return $this->note;
  97.     }
  98.     public function setNote(?string $note): self
  99.     {
  100.         $this->note $note;
  101.         return $this;
  102.     }
  103. }