src/Entity/Appointment.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppointmentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use DateTimeInterface;
  6. /**
  7.  * @ORM\Entity(repositoryClass=AppointmentRepository::class)
  8.  */
  9. class Appointment
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private ?int $id null;
  17.     /**
  18.      * @ORM\Column(type="datetime")
  19.      */
  20.     private ?DateTimeInterface $date null;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="appointments")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private ?User $user null;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=Properties::class, inversedBy="appointments", cascade={"remove"})
  28.      * @ORM\JoinColumn(nullable=false)
  29.      */
  30.     private ?Properties $properties null;
  31.     /**
  32.      * @ORM\Column(type="boolean")
  33.      */
  34.     private ?bool $inPerson null;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getDate(): ?DateTimeInterface
  40.     {
  41.         return $this->date;
  42.     }
  43.     public function setDate(?DateTimeInterface $date): self
  44.     {
  45.         $this->date $date;
  46.         return $this;
  47.     }
  48.     public function getUser(): ?User
  49.     {
  50.         return $this->user;
  51.     }
  52.     public function setUser(?User $user): self
  53.     {
  54.         $this->user $user;
  55.         return $this;
  56.     }
  57.     public function getProperties(): ?Properties
  58.     {
  59.         return $this->properties;
  60.     }
  61.     public function setProperties(?Properties $properties): self
  62.     {
  63.         $this->properties $properties;
  64.         return $this;
  65.     }
  66.     public function isInPerson(): ?bool
  67.     {
  68.         return $this->inPerson;
  69.     }
  70.     public function setInPerson(?bool $inPerson): self
  71.     {
  72.         $this->inPerson $inPerson;
  73.         return $this;
  74.     }
  75. }