src/Entity/Bail.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BailRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. #[ORM\Entity(repositoryClassBailRepository::class)]
  10. class Bail
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $preneur null;
  18.     #[ORM\Column(length255)]
  19.     private ?string $adresse null;
  20.     #[ORM\Column(length255)]
  21.     private ?string $naturedubail null;
  22.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  23.     private ?\DateTimeInterface $datedesignature null;
  24.     #[ORM\Column]
  25.     private ?int $dureedubail null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $gpsx null;
  28.     #[ORM\Column(length255nullabletrue)]
  29.     private ?string $gpsy null;
  30.     #[ORM\Column(nullabletrue)]
  31.     /**
  32.      * @Assert\GreaterThanOrEqual(0, message="Le numéro de parcelle ne peut pas être inférieur à 0.")
  33.      */
  34.     private ?int $numeroparcelle null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $lotdeparcelle null;
  37.     #[ORM\Column(nullabletrue)]
  38.     private ?int $superficiedeparcelle null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $tfnumero null;
  41.     #[ORM\Column(length255nullabletrue)]
  42.     private ?string $objetdubail null;
  43.     #[ORM\Column(nullabletrue)]
  44.     private ?int $montantinvestissement null;
  45.     #[ORM\Column(nullabletrue)]
  46.     private ?int $montantredevanceinitiale null;
  47.     #[ORM\Column(length255nullabletrue)]
  48.     private ?string $referencepermisdeconstruire null;
  49.     #[ORM\Column(nullabletrue)]
  50.     private ?int $superficieoccupee null;
  51.     #[ORM\Column(nullabletrue)]
  52.     private ?int $nombredebatiements null;
  53.     #[ORM\Column(nullabletrue)]
  54.     private ?int $nombresetages null;
  55.     #[ORM\Column(nullabletrue)]
  56.     private ?int $nombreappartementetautreslocaux null;
  57.     #[ORM\Column(length255nullabletrue)]
  58.     private ?string $usagelocaux null;
  59.     #[ORM\Column(length255nullabletrue)]
  60.     private ?string $etatactueldesouvrages null;
  61.     #[ORM\Column(length255nullabletrue)]
  62.     private ?string $niveaudemiseenoeuvre null;
  63.     #[ORM\Column(nullabletrue)]
  64.     private ?int $montantdeladerniereredevance null;
  65.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  66.     private ?\DateTimeInterface $anneedudernierpaiement null;
  67.     #[ORM\Column(length255nullabletrue)]
  68.     private ?string $conformiteauxtermesdubail null;
  69.     #[ORM\ManyToOne(inversedBy'bails')]
  70.     private ?Commune $commune null;
  71.     #[ORM\ManyToOne(inversedBy'bails')]
  72.     private ?Quartier $quartier null;
  73.     #[ORM\OneToMany(targetEntityImage::class, mappedBy'bail')]
  74.     private Collection $images;
  75.     #[ORM\Column(length255nullabletrue)]
  76.     private ?string $signature null;
  77.     #[ORM\Column(length255nullabletrue)]
  78.     private ?string $agentsdemission null;
  79.     #[ORM\ManyToOne(inversedBy'bails')]
  80.     #[ORM\JoinColumn(nullablefalse)]
  81.     private ?User $user null;
  82.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  83.     private ?\DateTimeInterface $createdAt null;
  84.     public function __construct()
  85.     {
  86.         $this->images = new ArrayCollection();
  87.         $this->createdAt = new \DateTime();
  88.     }
  89.     public function getId(): ?int
  90.     {
  91.         return $this->id;
  92.     }
  93.     public function getPreneur(): ?string
  94.     {
  95.         return $this->preneur;
  96.     }
  97.     public function setPreneur(string $preneur): static
  98.     {
  99.         $this->preneur $preneur;
  100.         return $this;
  101.     }
  102.     public function getAdresse(): ?string
  103.     {
  104.         return $this->adresse;
  105.     }
  106.     public function setAdresse(string $adresse): static
  107.     {
  108.         $this->adresse $adresse;
  109.         return $this;
  110.     }
  111.     public function getNaturedubail(): ?string
  112.     {
  113.         return $this->naturedubail;
  114.     }
  115.     public function setNaturedubail(string $naturedubail): static
  116.     {
  117.         $this->naturedubail $naturedubail;
  118.         return $this;
  119.     }
  120.     public function getDatedesignature(): ?\DateTimeInterface
  121.     {
  122.         return $this->datedesignature;
  123.     }
  124.     public function setDatedesignature(\DateTimeInterface $datedesignature): static
  125.     {
  126.         $this->datedesignature $datedesignature;
  127.         return $this;
  128.     }
  129.     public function getDureedubail(): ?int
  130.     {
  131.         return $this->dureedubail;
  132.     }
  133.     public function setDureedubail(int $dureedubail): static
  134.     {
  135.         $this->dureedubail $dureedubail;
  136.         return $this;
  137.     }
  138.     public function getGpsx(): ?string
  139.     {
  140.         return $this->gpsx;
  141.     }
  142.     public function setGpsx(?string $gpsx): static
  143.     {
  144.         $this->gpsx $gpsx;
  145.         return $this;
  146.     }
  147.     public function getGpsy(): ?string
  148.     {
  149.         return $this->gpsy;
  150.     }
  151.     public function setGpsy(?string $gpsy): static
  152.     {
  153.         $this->gpsy $gpsy;
  154.         return $this;
  155.     }
  156.     public function getNumeroparcelle(): ?int
  157.     {
  158.         return $this->numeroparcelle;
  159.     }
  160.     public function setNumeroparcelle(?int $numeroparcelle): static
  161.     {
  162.         $this->numeroparcelle $numeroparcelle;
  163.         return $this;
  164.     }
  165.     public function getLotdeparcelle(): ?string
  166.     {
  167.         return $this->lotdeparcelle;
  168.     }
  169.     public function setLotdeparcelle(?string $lotdeparcelle): static
  170.     {
  171.         $this->lotdeparcelle $lotdeparcelle;
  172.         return $this;
  173.     }
  174.     public function getSuperficiedeparcelle(): ?int
  175.     {
  176.         return $this->superficiedeparcelle;
  177.     }
  178.     public function setSuperficiedeparcelle(?int $superficiedeparcelle): static
  179.     {
  180.         $this->superficiedeparcelle $superficiedeparcelle;
  181.         return $this;
  182.     }
  183.     public function getTfnumero(): ?string
  184.     {
  185.         return $this->tfnumero;
  186.     }
  187.     public function setTfnumero(?string $tfnumero): static
  188.     {
  189.         $this->tfnumero $tfnumero;
  190.         return $this;
  191.     }
  192.     public function getObjetdubail(): ?string
  193.     {
  194.         return $this->objetdubail;
  195.     }
  196.     public function setObjetdubail(?string $objetdubail): static
  197.     {
  198.         $this->objetdubail $objetdubail;
  199.         return $this;
  200.     }
  201.     public function getMontantinvestissement(): ?int
  202.     {
  203.         return $this->montantinvestissement;
  204.     }
  205.     public function setMontantinvestissement(?int $montantinvestissement): static
  206.     {
  207.         $this->montantinvestissement $montantinvestissement;
  208.         return $this;
  209.     }
  210.     public function getMontantredevanceinitiale(): ?int
  211.     {
  212.         return $this->montantredevanceinitiale;
  213.     }
  214.     public function setMontantredevanceinitiale(?int $montantredevanceinitiale): static
  215.     {
  216.         $this->montantredevanceinitiale $montantredevanceinitiale;
  217.         return $this;
  218.     }
  219.     public function getReferencepermisdeconstruire(): ?string
  220.     {
  221.         return $this->referencepermisdeconstruire;
  222.     }
  223.     public function setReferencepermisdeconstruire(?string $referencepermisdeconstruire): static
  224.     {
  225.         $this->referencepermisdeconstruire $referencepermisdeconstruire;
  226.         return $this;
  227.     }
  228.     public function getSuperficieoccupee(): ?int
  229.     {
  230.         return $this->superficieoccupee;
  231.     }
  232.     public function setSuperficieoccupee(?int $superficieoccupee): static
  233.     {
  234.         $this->superficieoccupee $superficieoccupee;
  235.         return $this;
  236.     }
  237.     public function getNombredebatiements(): ?int
  238.     {
  239.         return $this->nombredebatiements;
  240.     }
  241.     public function setNombredebatiements(?int $nombredebatiements): static
  242.     {
  243.         $this->nombredebatiements $nombredebatiements;
  244.         return $this;
  245.     }
  246.     public function getNombresetages(): ?int
  247.     {
  248.         return $this->nombresetages;
  249.     }
  250.     public function setNombresetages(?int $nombresetages): static
  251.     {
  252.         $this->nombresetages $nombresetages;
  253.         return $this;
  254.     }
  255.     public function getNombreappartementetautreslocaux(): ?int
  256.     {
  257.         return $this->nombreappartementetautreslocaux;
  258.     }
  259.     public function setNombreappartementetautreslocaux(?int $nombreappartementetautreslocaux): static
  260.     {
  261.         $this->nombreappartementetautreslocaux $nombreappartementetautreslocaux;
  262.         return $this;
  263.     }
  264.     public function getUsagelocaux(): ?string
  265.     {
  266.         return $this->usagelocaux;
  267.     }
  268.     public function setUsagelocaux(?string $usagelocaux): static
  269.     {
  270.         $this->usagelocaux $usagelocaux;
  271.         return $this;
  272.     }
  273.     public function getEtatactueldesouvrages(): ?string
  274.     {
  275.         return $this->etatactueldesouvrages;
  276.     }
  277.     public function setEtatactueldesouvrages(?string $etatactueldesouvrages): static
  278.     {
  279.         $this->etatactueldesouvrages $etatactueldesouvrages;
  280.         return $this;
  281.     }
  282.     public function getNiveaudemiseenoeuvre(): ?string
  283.     {
  284.         return $this->niveaudemiseenoeuvre;
  285.     }
  286.     public function setNiveaudemiseenoeuvre(?string $niveaudemiseenoeuvre): static
  287.     {
  288.         $this->niveaudemiseenoeuvre $niveaudemiseenoeuvre;
  289.         return $this;
  290.     }
  291.     public function getMontantdeladerniereredevance(): ?int
  292.     {
  293.         return $this->montantdeladerniereredevance;
  294.     }
  295.     public function setMontantdeladerniereredevance(?int $montantdeladerniereredevance): static
  296.     {
  297.         $this->montantdeladerniereredevance $montantdeladerniereredevance;
  298.         return $this;
  299.     }
  300.     public function getAnneedudernierpaiement(): ?\DateTimeInterface
  301.     {
  302.         return $this->anneedudernierpaiement;
  303.     }
  304.     public function setAnneedudernierpaiement(?\DateTimeInterface $anneedudernierpaiement): static
  305.     {
  306.         $this->anneedudernierpaiement $anneedudernierpaiement;
  307.         return $this;
  308.     }
  309.     public function getConformiteauxtermesdubail(): ?string
  310.     {
  311.         return $this->conformiteauxtermesdubail;
  312.     }
  313.     public function setConformiteauxtermesdubail(?string $conformiteauxtermesdubail): static
  314.     {
  315.         $this->conformiteauxtermesdubail $conformiteauxtermesdubail;
  316.         return $this;
  317.     }
  318.     public function getCommune(): ?Commune
  319.     {
  320.         return $this->commune;
  321.     }
  322.     public function setCommune(?Commune $commune): static
  323.     {
  324.         $this->commune $commune;
  325.         return $this;
  326.     }
  327.     public function getQuartier(): ?Quartier
  328.     {
  329.         return $this->quartier;
  330.     }
  331.     public function setQuartier(?Quartier $quartier): static
  332.     {
  333.         $this->quartier $quartier;
  334.         return $this;
  335.     }
  336.     /**
  337.      * @return Collection<int, Image>
  338.      */
  339.     public function getImages(): Collection
  340.     {
  341.         return $this->images;
  342.     }
  343.     public function addImage(Image $image): static
  344.     {
  345.         if (!$this->images->contains($image)) {
  346.             $this->images->add($image);
  347.             $image->setBail($this);
  348.         }
  349.         return $this;
  350.     }
  351.     public function removeImage(Image $image): static
  352.     {
  353.         if ($this->images->removeElement($image)) {
  354.             // set the owning side to null (unless already changed)
  355.             if ($image->getBail() === $this) {
  356.                 $image->setBail(null);
  357.             }
  358.         }
  359.         return $this;
  360.     }
  361.     public function getSignature(): ?string
  362.     {
  363.         return $this->signature;
  364.     }
  365.     public function setSignature(?string $signature): static
  366.     {
  367.         $this->signature $signature;
  368.         return $this;
  369.     }
  370.     public function getAgentsdemission(): ?string
  371.     {
  372.         return $this->agentsdemission;
  373.     }
  374.     public function setAgentsdemission(?string $agentsdemission): static
  375.     {
  376.         $this->agentsdemission $agentsdemission;
  377.         return $this;
  378.     }
  379.     public function getUser(): ?User
  380.     {
  381.         return $this->user;
  382.     }
  383.     public function setUser(?User $user): static
  384.     {
  385.         $this->user $user;
  386.         return $this;
  387.     }
  388.     public function getCreatedAt(): ?\DateTimeInterface
  389.     {
  390.         return $this->createdAt;
  391.     }
  392.     public function setCreatedAt(?\DateTimeInterface $createdAt): static
  393.     {
  394.         $this->createdAt $createdAt;
  395.         return $this;
  396.     }
  397. }