<?php
namespace App\Entity;
use App\Repository\BailRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: BailRepository::class)]
class Bail
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $preneur = null;
#[ORM\Column(length: 255)]
private ?string $adresse = null;
#[ORM\Column(length: 255)]
private ?string $naturedubail = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $datedesignature = null;
#[ORM\Column]
private ?int $dureedubail = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $gpsx = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $gpsy = null;
#[ORM\Column(nullable: true)]
/**
* @Assert\GreaterThanOrEqual(0, message="Le numéro de parcelle ne peut pas être inférieur à 0.")
*/
private ?int $numeroparcelle = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lotdeparcelle = null;
#[ORM\Column(nullable: true)]
private ?int $superficiedeparcelle = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tfnumero = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $objetdubail = null;
#[ORM\Column(nullable: true)]
private ?int $montantinvestissement = null;
#[ORM\Column(nullable: true)]
private ?int $montantredevanceinitiale = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $referencepermisdeconstruire = null;
#[ORM\Column(nullable: true)]
private ?int $superficieoccupee = null;
#[ORM\Column(nullable: true)]
private ?int $nombredebatiements = null;
#[ORM\Column(nullable: true)]
private ?int $nombresetages = null;
#[ORM\Column(nullable: true)]
private ?int $nombreappartementetautreslocaux = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $usagelocaux = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $etatactueldesouvrages = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $niveaudemiseenoeuvre = null;
#[ORM\Column(nullable: true)]
private ?int $montantdeladerniereredevance = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $anneedudernierpaiement = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $conformiteauxtermesdubail = null;
#[ORM\ManyToOne(inversedBy: 'bails')]
private ?Commune $commune = null;
#[ORM\ManyToOne(inversedBy: 'bails')]
private ?Quartier $quartier = null;
#[ORM\OneToMany(targetEntity: Image::class, mappedBy: 'bail')]
private Collection $images;
#[ORM\Column(length: 255, nullable: true)]
private ?string $signature = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $agentsdemission = null;
#[ORM\ManyToOne(inversedBy: 'bails')]
#[ORM\JoinColumn(nullable: false)]
private ?User $user = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $createdAt = null;
public function __construct()
{
$this->images = new ArrayCollection();
$this->createdAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getPreneur(): ?string
{
return $this->preneur;
}
public function setPreneur(string $preneur): static
{
$this->preneur = $preneur;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(string $adresse): static
{
$this->adresse = $adresse;
return $this;
}
public function getNaturedubail(): ?string
{
return $this->naturedubail;
}
public function setNaturedubail(string $naturedubail): static
{
$this->naturedubail = $naturedubail;
return $this;
}
public function getDatedesignature(): ?\DateTimeInterface
{
return $this->datedesignature;
}
public function setDatedesignature(\DateTimeInterface $datedesignature): static
{
$this->datedesignature = $datedesignature;
return $this;
}
public function getDureedubail(): ?int
{
return $this->dureedubail;
}
public function setDureedubail(int $dureedubail): static
{
$this->dureedubail = $dureedubail;
return $this;
}
public function getGpsx(): ?string
{
return $this->gpsx;
}
public function setGpsx(?string $gpsx): static
{
$this->gpsx = $gpsx;
return $this;
}
public function getGpsy(): ?string
{
return $this->gpsy;
}
public function setGpsy(?string $gpsy): static
{
$this->gpsy = $gpsy;
return $this;
}
public function getNumeroparcelle(): ?int
{
return $this->numeroparcelle;
}
public function setNumeroparcelle(?int $numeroparcelle): static
{
$this->numeroparcelle = $numeroparcelle;
return $this;
}
public function getLotdeparcelle(): ?string
{
return $this->lotdeparcelle;
}
public function setLotdeparcelle(?string $lotdeparcelle): static
{
$this->lotdeparcelle = $lotdeparcelle;
return $this;
}
public function getSuperficiedeparcelle(): ?int
{
return $this->superficiedeparcelle;
}
public function setSuperficiedeparcelle(?int $superficiedeparcelle): static
{
$this->superficiedeparcelle = $superficiedeparcelle;
return $this;
}
public function getTfnumero(): ?string
{
return $this->tfnumero;
}
public function setTfnumero(?string $tfnumero): static
{
$this->tfnumero = $tfnumero;
return $this;
}
public function getObjetdubail(): ?string
{
return $this->objetdubail;
}
public function setObjetdubail(?string $objetdubail): static
{
$this->objetdubail = $objetdubail;
return $this;
}
public function getMontantinvestissement(): ?int
{
return $this->montantinvestissement;
}
public function setMontantinvestissement(?int $montantinvestissement): static
{
$this->montantinvestissement = $montantinvestissement;
return $this;
}
public function getMontantredevanceinitiale(): ?int
{
return $this->montantredevanceinitiale;
}
public function setMontantredevanceinitiale(?int $montantredevanceinitiale): static
{
$this->montantredevanceinitiale = $montantredevanceinitiale;
return $this;
}
public function getReferencepermisdeconstruire(): ?string
{
return $this->referencepermisdeconstruire;
}
public function setReferencepermisdeconstruire(?string $referencepermisdeconstruire): static
{
$this->referencepermisdeconstruire = $referencepermisdeconstruire;
return $this;
}
public function getSuperficieoccupee(): ?int
{
return $this->superficieoccupee;
}
public function setSuperficieoccupee(?int $superficieoccupee): static
{
$this->superficieoccupee = $superficieoccupee;
return $this;
}
public function getNombredebatiements(): ?int
{
return $this->nombredebatiements;
}
public function setNombredebatiements(?int $nombredebatiements): static
{
$this->nombredebatiements = $nombredebatiements;
return $this;
}
public function getNombresetages(): ?int
{
return $this->nombresetages;
}
public function setNombresetages(?int $nombresetages): static
{
$this->nombresetages = $nombresetages;
return $this;
}
public function getNombreappartementetautreslocaux(): ?int
{
return $this->nombreappartementetautreslocaux;
}
public function setNombreappartementetautreslocaux(?int $nombreappartementetautreslocaux): static
{
$this->nombreappartementetautreslocaux = $nombreappartementetautreslocaux;
return $this;
}
public function getUsagelocaux(): ?string
{
return $this->usagelocaux;
}
public function setUsagelocaux(?string $usagelocaux): static
{
$this->usagelocaux = $usagelocaux;
return $this;
}
public function getEtatactueldesouvrages(): ?string
{
return $this->etatactueldesouvrages;
}
public function setEtatactueldesouvrages(?string $etatactueldesouvrages): static
{
$this->etatactueldesouvrages = $etatactueldesouvrages;
return $this;
}
public function getNiveaudemiseenoeuvre(): ?string
{
return $this->niveaudemiseenoeuvre;
}
public function setNiveaudemiseenoeuvre(?string $niveaudemiseenoeuvre): static
{
$this->niveaudemiseenoeuvre = $niveaudemiseenoeuvre;
return $this;
}
public function getMontantdeladerniereredevance(): ?int
{
return $this->montantdeladerniereredevance;
}
public function setMontantdeladerniereredevance(?int $montantdeladerniereredevance): static
{
$this->montantdeladerniereredevance = $montantdeladerniereredevance;
return $this;
}
public function getAnneedudernierpaiement(): ?\DateTimeInterface
{
return $this->anneedudernierpaiement;
}
public function setAnneedudernierpaiement(?\DateTimeInterface $anneedudernierpaiement): static
{
$this->anneedudernierpaiement = $anneedudernierpaiement;
return $this;
}
public function getConformiteauxtermesdubail(): ?string
{
return $this->conformiteauxtermesdubail;
}
public function setConformiteauxtermesdubail(?string $conformiteauxtermesdubail): static
{
$this->conformiteauxtermesdubail = $conformiteauxtermesdubail;
return $this;
}
public function getCommune(): ?Commune
{
return $this->commune;
}
public function setCommune(?Commune $commune): static
{
$this->commune = $commune;
return $this;
}
public function getQuartier(): ?Quartier
{
return $this->quartier;
}
public function setQuartier(?Quartier $quartier): static
{
$this->quartier = $quartier;
return $this;
}
/**
* @return Collection<int, Image>
*/
public function getImages(): Collection
{
return $this->images;
}
public function addImage(Image $image): static
{
if (!$this->images->contains($image)) {
$this->images->add($image);
$image->setBail($this);
}
return $this;
}
public function removeImage(Image $image): static
{
if ($this->images->removeElement($image)) {
// set the owning side to null (unless already changed)
if ($image->getBail() === $this) {
$image->setBail(null);
}
}
return $this;
}
public function getSignature(): ?string
{
return $this->signature;
}
public function setSignature(?string $signature): static
{
$this->signature = $signature;
return $this;
}
public function getAgentsdemission(): ?string
{
return $this->agentsdemission;
}
public function setAgentsdemission(?string $agentsdemission): static
{
$this->agentsdemission = $agentsdemission;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): static
{
$this->user = $user;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
}