src/Entity/ChargeAllocation.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ChargeAllocationRepository;
  4. use App\Traits\TimeStampTrait;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassChargeAllocationRepository::class)]
  8. #[ORM\HasLifecycleCallbacks]
  9. class ChargeAllocation
  10. {
  11.     use TimeStampTrait;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\ManyToOne(inversedBy'chargeAllocations'cascade: ['persist'])]
  17.     private ?Charge $charge null;
  18.     #[ORM\ManyToOne(inversedBy'chargeAllocations')]
  19.     private ?Location $location null;
  20.     #[ORM\Column(typeTypes::DECIMALprecision10scale2)]
  21.     private ?string $allocatedAmount null;
  22.     #[ORM\ManyToOne(inversedBy'chargeAllocations')]
  23.     private ?Locataire $locataire null;
  24.     #[ORM\ManyToOne(inversedBy'chargeAllocations')]
  25.     private ?Entreprise $marchand null;
  26.     #[ORM\Column(length255)]
  27.     private ?string $code null;
  28.     #[ORM\Column]
  29.     private ?bool $paid null;
  30.     #[ORM\Column(nullabletrue)]
  31.     private ?\DateTime $paidAt null;
  32.     #[ORM\ManyToOne(inversedBy'chargeAllocations')]
  33.     private ?Payment $payment null;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getCharge(): ?Charge
  39.     {
  40.         return $this->charge;
  41.     }
  42.     public function setCharge(?Charge $charge): static
  43.     {
  44.         $this->charge $charge;
  45.         return $this;
  46.     }
  47.     public function getLocation(): ?Location
  48.     {
  49.         return $this->location;
  50.     }
  51.     public function setLocation(?Location $location): static
  52.     {
  53.         $this->location $location;
  54.         return $this;
  55.     }
  56.     public function getAllocatedAmount(): ?string
  57.     {
  58.         return $this->allocatedAmount;
  59.     }
  60.     public function setAllocatedAmount(string $allocatedAmount): static
  61.     {
  62.         $this->allocatedAmount $allocatedAmount;
  63.         return $this;
  64.     }
  65.     public function getLocataire(): ?Locataire
  66.     {
  67.         return $this->locataire;
  68.     }
  69.     public function setLocataire(?Locataire $locataire): static
  70.     {
  71.         $this->locataire $locataire;
  72.         return $this;
  73.     }
  74.     public function getMarchand(): ?Entreprise
  75.     {
  76.         return $this->marchand;
  77.     }
  78.     public function setMarchand(?Entreprise $marchand): static
  79.     {
  80.         $this->marchand $marchand;
  81.         return $this;
  82.     }
  83.     public function getCode(): ?string
  84.     {
  85.         return $this->code;
  86.     }
  87.     public function setCode(string $code): static
  88.     {
  89.         $this->code $code;
  90.         return $this;
  91.     }
  92.     public function isPaid(): ?bool
  93.     {
  94.         return $this->paid;
  95.     }
  96.     public function setPaid(bool $paid): static
  97.     {
  98.         $this->paid $paid;
  99.         return $this;
  100.     }
  101.     public function getPaidAt(): ?\DateTime
  102.     {
  103.         return $this->paidAt;
  104.     }
  105.     public function setPaidAt(?\DateTime $paidAt): static
  106.     {
  107.         $this->paidAt $paidAt;
  108.         return $this;
  109.     }
  110.     public function getPayment(): ?Payment
  111.     {
  112.         return $this->payment;
  113.     }
  114.     public function setPayment(?Payment $payment): static
  115.     {
  116.         $this->payment $payment;
  117.         return $this;
  118.     }
  119. }