src/Entity/RentalHistory.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RentalHistoryRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassRentalHistoryRepository::class)]
  7. class RentalHistory
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'rentalHistories')]
  14.     private ?Building $building null;
  15.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  16.     private ?\DateTimeInterface $dateStartLease null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $dateEndLease null;
  19.     #[ORM\Column()]
  20.     private bool $rentalSign false;
  21.     #[ORM\Column(nullabletrue)]
  22.     private ?int $rent null;
  23.     #[ORM\ManyToOne(inversedBy'rentalHistories')]
  24.     private ?User $tenant null;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getBuilding(): ?Building
  30.     {
  31.         return $this->building;
  32.     }
  33.     public function setBuilding(?Building $building): self
  34.     {
  35.         $this->building $building;
  36.         return $this;
  37.     }
  38.     public function getDateStartLease(): ?\DateTimeInterface
  39.     {
  40.         return $this->dateStartLease;
  41.     }
  42.     public function setDateStartLease(?\DateTimeInterface $dateStartLease): self
  43.     {
  44.         $this->dateStartLease $dateStartLease;
  45.         return $this;
  46.     }
  47.     public function getDateEndLease(): ?\DateTimeInterface
  48.     {
  49.         return $this->dateEndLease;
  50.     }
  51.     public function setDateEndLease(?\DateTimeInterface $dateEndLease): self
  52.     {
  53.         $this->dateEndLease $dateEndLease;
  54.         return $this;
  55.     }
  56.     public function getRent(): ?int
  57.     {
  58.         return $this->rent;
  59.     }
  60.     public function setRent(?int $rent): self
  61.     {
  62.         $this->rent $rent;
  63.         return $this;
  64.     }
  65.     public function getRentalSign(): bool
  66.     {
  67.         return $this->rentalSign;
  68.     }
  69.     public function setRentalSign(bool $isSign): self
  70.     {
  71.         $this->rentalSign $isSign;
  72.         return $this;
  73.     }
  74.     public function getTenant(): ?User
  75.     {
  76.         return $this->tenant;
  77.     }
  78.     public function setTenant(?User $tenant): self
  79.     {
  80.         $this->tenant $tenant;
  81.         return $this;
  82.     }
  83. }