src/Entity/Annonces.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AnnoncesRepository;
  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. #[ORM\Entity(repositoryClassAnnoncesRepository::class)]
  9. class Annonces
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne(inversedBy'annonces')]
  16.     private ?User $user null;
  17.     #[ORM\Column(nullabletrue)]
  18.     private ?float $superficie null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $adresse null;
  21.     #[ORM\Column(nullabletrue)]
  22.     private ?float $prix null;
  23.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  24.     private ?string $description null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $titre null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $longitude null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $latitude null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $codepostale null;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $image null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $slug null;
  37.     #[ORM\Column(type'datetime'nullabletrue)]
  38.     private $updated_at;
  39.     #[ORM\Column(type'datetime'nullabletrue)]
  40.     private $created_at;
  41.     #[ORM\Column(length255nullabletrue)]
  42.     private ?string $dpe null;
  43.     #[ORM\Column(length255nullabletrue)]
  44.     private ?string $ges null;
  45.     #[ORM\Column(nullabletrue)]
  46.     private ?float $honoraires null;
  47.     #[ORM\ManyToOne]
  48.     private ?VillesFrance $villes_france null;
  49.     #[ORM\Column(length255nullabletrue)]
  50.     private ?string $ville_slug null;
  51.     #[ORM\Column(length255nullabletrue)]
  52.     private ?string $ville_code_postal null;
  53.     #[ORM\Column(length255nullabletrue)]
  54.     private ?string $piece null;
  55.     #[ORM\OneToMany(mappedBy'annonce'targetEntityImages::class)]
  56.     private Collection $images;
  57.     #[ORM\OneToMany(mappedBy'annonce'targetEntityMessages::class)]
  58.     private Collection $messages;
  59.     #[ORM\OneToMany(mappedBy'annonce'targetEntityVisiteurs::class)]
  60.     private Collection $visiteurs;
  61.     #[ORM\OneToMany(mappedBy'annonce'targetEntityEvent::class)]
  62.     private Collection $events;
  63.     #[ORM\OneToMany(mappedBy'annonce'targetEntityReservations::class)]
  64.     private Collection $reservations;
  65.     #[ORM\ManyToOne(inversedBy'annonces')]
  66.     private ?Agences $agence null;
  67.     #[ORM\ManyToMany(targetEntityEquipements::class, inversedBy'annonces')]
  68.     private Collection $equipements;
  69.     #[ORM\OneToMany(mappedBy'logement'targetEntityCommentairesLogements::class)]
  70.     private Collection $commentairesLogements;
  71.     #[ORM\Column(length255nullabletrue)]
  72.     private ?string $ville null;
  73.     #[ORM\Column(length255nullabletrue)]
  74.     private ?string $codepostal null;
  75.     #[ORM\Column(length255nullabletrue)]
  76.     private ?string $transaction null;
  77.     #[ORM\Column(length255nullabletrue)]
  78.     private ?string $etat null;
  79.     #[ORM\ManyToOne(inversedBy'annonces')]
  80.     private ?VillesFrance $ville_annonce null;
  81.     #[ORM\Column(length255nullabletrue)]
  82.     private ?string $logement null;
  83.     #[ORM\Column(length255nullabletrue)]
  84.     private ?string $chauffage null;
  85.     #[ORM\Column(length255nullabletrue)]
  86.     private ?string $pieces null;
  87.     #[ORM\Column(length255nullabletrue)]
  88.     private ?string $chambres null;
  89.     #[ORM\Column(length255nullabletrue)]
  90.     private ?string $charges null;
  91.     #[ORM\Column(length255nullabletrue)]
  92.     private ?string $quantite null;
  93.     #[ORM\Column(length255nullabletrue)]
  94.     private ?string $chambre null;
  95.     #[ORM\Column(length255nullabletrue)]
  96.     private ?string $salledebain null;
  97.     #[ORM\Column(length255nullabletrue)]
  98.     private ?string $garage null;
  99.     #[ORM\OneToMany(mappedBy'annonce'targetEntityPostLike::class)]
  100.     private Collection $postLikes;
  101.     #[ORM\Column(length255nullabletrue)]
  102.     private ?string $psedo null;
  103.     #[ORM\Column(length255nullabletrue)]
  104.     private ?string $domaine null;
  105.     #[ORM\ManyToOne(inversedBy'annonces')]
  106.     private ?Hotels $hotel null;
  107.     public function __construct()
  108.     {
  109.         $this->images = new ArrayCollection();
  110.         $this->messages = new ArrayCollection();
  111.         $this->visiteurs = new ArrayCollection();
  112.         $this->events = new ArrayCollection();
  113.         $this->reservations = new ArrayCollection();
  114.         $this->equipements = new ArrayCollection();
  115.         $this->commentairesLogements = new ArrayCollection();
  116.         $this->created_at = new \DateTime();
  117.         $this->postLikes = new ArrayCollection();
  118.     }
  119.     public function getId(): ?int
  120.     {
  121.         return $this->id;
  122.     }
  123.     public function getUser(): ?User
  124.     {
  125.         return $this->user;
  126.     }
  127.     public function setUser(?User $user): self
  128.     {
  129.         $this->user $user;
  130.         return $this;
  131.     }
  132.     public function getSuperficie(): ?float
  133.     {
  134.         return $this->superficie;
  135.     }
  136.     public function setSuperficie(?float $superficie): self
  137.     {
  138.         $this->superficie $superficie;
  139.         return $this;
  140.     }
  141.     public function getAdresse(): ?string
  142.     {
  143.         return $this->adresse;
  144.     }
  145.     public function setAdresse(?string $adresse): self
  146.     {
  147.         $this->adresse $adresse;
  148.         return $this;
  149.     }
  150.     public function getPrix(): ?float
  151.     {
  152.         return $this->prix;
  153.     }
  154.     public function setPrix(?float $prix): self
  155.     {
  156.         $this->prix $prix;
  157.         return $this;
  158.     }
  159.     public function getDescription(): ?string
  160.     {
  161.         return $this->description;
  162.     }
  163.     public function setDescription(?string $description): self
  164.     {
  165.         $this->description $description;
  166.         return $this;
  167.     }
  168.     public function getTitre(): ?string
  169.     {
  170.         return $this->titre;
  171.     }
  172.     public function setTitre(?string $titre): self
  173.     {
  174.         $this->titre $titre;
  175.         return $this;
  176.     }
  177.     public function getLongitude(): ?string
  178.     {
  179.         return $this->longitude;
  180.     }
  181.     public function setLongitude(?string $longitude): self
  182.     {
  183.         $this->longitude $longitude;
  184.         return $this;
  185.     }
  186.     public function getLatitude(): ?string
  187.     {
  188.         return $this->latitude;
  189.     }
  190.     public function setLatitude(?string $latitude): self
  191.     {
  192.         $this->latitude $latitude;
  193.         return $this;
  194.     }
  195.     public function getCodepostale(): ?string
  196.     {
  197.         return $this->codepostale;
  198.     }
  199.     public function setCodepostale(?string $codepostale): self
  200.     {
  201.         $this->codepostale $codepostale;
  202.         return $this;
  203.     }
  204.     public function getImage(): ?string
  205.     {
  206.         return $this->image;
  207.     }
  208.     public function setImage(?string $image): self
  209.     {
  210.         $this->image $image;
  211.         return $this;
  212.     }
  213.     public function getSlug(): ?string
  214.     {
  215.         return $this->slug;
  216.     }
  217.     public function setSlug(?string $slug): self
  218.     {
  219.         $this->slug $slug;
  220.         return $this;
  221.     }
  222.     public function getUpdatedAt(): ?\DateTimeInterface
  223.     {
  224.         return $this->updated_at;
  225.     }
  226.     public function setUpdatedAt(?\DateTimeInterface $updated_at): self
  227.     {
  228.         $this->updated_at $updated_at;
  229.         return $this;
  230.     }
  231.     public function getCreatedAt(): ?\DateTimeInterface
  232.     {
  233.         return $this->created_at;
  234.     }
  235.     public function setCreatedAt(?\DateTimeInterface $created_at): self
  236.     {
  237.         $this->created_at $created_at;
  238.         return $this;
  239.     }
  240.     public function getDpe(): ?string
  241.     {
  242.         return $this->dpe;
  243.     }
  244.     public function setDpe(?string $dpe): self
  245.     {
  246.         $this->dpe $dpe;
  247.         return $this;
  248.     }
  249.     public function getGes(): ?string
  250.     {
  251.         return $this->ges;
  252.     }
  253.     public function setGes(?string $ges): self
  254.     {
  255.         $this->ges $ges;
  256.         return $this;
  257.     }
  258.     public function getHonoraires(): ?float
  259.     {
  260.         return $this->honoraires;
  261.     }
  262.     public function setHonoraires(?float $honoraires): self
  263.     {
  264.         $this->honoraires $honoraires;
  265.         return $this;
  266.     }
  267.     public function getVillesFrance(): ?VillesFrance
  268.     {
  269.         return $this->villes_france;
  270.     }
  271.     public function setVillesFrance(?VillesFrance $villes_france): self
  272.     {
  273.         $this->villes_france $villes_france;
  274.         return $this;
  275.     }
  276.     public function getVilleSlug(): ?string
  277.     {
  278.         return $this->ville_slug;
  279.     }
  280.     public function setVilleSlug(?string $ville_slug): self
  281.     {
  282.         $this->ville_slug $ville_slug;
  283.         return $this;
  284.     }
  285.     public function getVilleCodePostal(): ?string
  286.     {
  287.         return $this->ville_code_postal;
  288.     }
  289.     public function setVilleCodePostal(?string $ville_code_postal): self
  290.     {
  291.         $this->ville_code_postal $ville_code_postal;
  292.         return $this;
  293.     }
  294.     public function getPiece(): ?string
  295.     {
  296.         return $this->piece;
  297.     }
  298.     public function setPiece(?string $piece): self
  299.     {
  300.         $this->piece $piece;
  301.         return $this;
  302.     }
  303.     /**
  304.      * @return Collection<int, Images>
  305.      */
  306.     public function getImages(): Collection
  307.     {
  308.         return $this->images;
  309.     }
  310.     public function addImage(Images $image): self
  311.     {
  312.         if (!$this->images->contains($image)) {
  313.             $this->images->add($image);
  314.             $image->setAnnonce($this);
  315.         }
  316.         return $this;
  317.     }
  318.     public function removeImage(Images $image): self
  319.     {
  320.         if ($this->images->removeElement($image)) {
  321.             // set the owning side to null (unless already changed)
  322.             if ($image->getAnnonce() === $this) {
  323.                 $image->setAnnonce(null);
  324.             }
  325.         }
  326.         return $this;
  327.     }
  328.     /**
  329.      * @return Collection<int, Messages>
  330.      */
  331.     public function getMessages(): Collection
  332.     {
  333.         return $this->messages;
  334.     }
  335.     public function addMessage(Messages $message): self
  336.     {
  337.         if (!$this->messages->contains($message)) {
  338.             $this->messages->add($message);
  339.             $message->setAnnonce($this);
  340.         }
  341.         return $this;
  342.     }
  343.     public function removeMessage(Messages $message): self
  344.     {
  345.         if ($this->messages->removeElement($message)) {
  346.             // set the owning side to null (unless already changed)
  347.             if ($message->getAnnonce() === $this) {
  348.                 $message->setAnnonce(null);
  349.             }
  350.         }
  351.         return $this;
  352.     }
  353.     /**
  354.      * @return Collection<int, Visiteurs>
  355.      */
  356.     public function getVisiteurs(): Collection
  357.     {
  358.         return $this->visiteurs;
  359.     }
  360.     public function addVisiteur(Visiteurs $visiteur): self
  361.     {
  362.         if (!$this->visiteurs->contains($visiteur)) {
  363.             $this->visiteurs->add($visiteur);
  364.             $visiteur->setAnnonce($this);
  365.         }
  366.         return $this;
  367.     }
  368.     public function removeVisiteur(Visiteurs $visiteur): self
  369.     {
  370.         if ($this->visiteurs->removeElement($visiteur)) {
  371.             // set the owning side to null (unless already changed)
  372.             if ($visiteur->getAnnonce() === $this) {
  373.                 $visiteur->setAnnonce(null);
  374.             }
  375.         }
  376.         return $this;
  377.     }
  378.     /**
  379.      * @return Collection<int, Event>
  380.      */
  381.     public function getEvents(): Collection
  382.     {
  383.         return $this->events;
  384.     }
  385.     public function addEvent(Event $event): self
  386.     {
  387.         if (!$this->events->contains($event)) {
  388.             $this->events->add($event);
  389.             $event->setAnnonce($this);
  390.         }
  391.         return $this;
  392.     }
  393.     public function removeEvent(Event $event): self
  394.     {
  395.         if ($this->events->removeElement($event)) {
  396.             // set the owning side to null (unless already changed)
  397.             if ($event->getAnnonce() === $this) {
  398.                 $event->setAnnonce(null);
  399.             }
  400.         }
  401.         return $this;
  402.     }
  403.     /**
  404.      * @return Collection<int, Reservations>
  405.      */
  406.     public function getReservations(): Collection
  407.     {
  408.         return $this->reservations;
  409.     }
  410.     public function addReservation(Reservations $reservation): self
  411.     {
  412.         if (!$this->reservations->contains($reservation)) {
  413.             $this->reservations->add($reservation);
  414.             $reservation->setAnnonce($this);
  415.         }
  416.         return $this;
  417.     }
  418.     public function removeReservation(Reservations $reservation): self
  419.     {
  420.         if ($this->reservations->removeElement($reservation)) {
  421.             // set the owning side to null (unless already changed)
  422.             if ($reservation->getAnnonce() === $this) {
  423.                 $reservation->setAnnonce(null);
  424.             }
  425.         }
  426.         return $this;
  427.     }
  428.     public function getAgence(): ?Agences
  429.     {
  430.         return $this->agence;
  431.     }
  432.     public function setAgence(?Agences $agence): self
  433.     {
  434.         $this->agence $agence;
  435.         return $this;
  436.     }
  437.     /**
  438.      * @return Collection<int, Equipements>
  439.      */
  440.     public function getEquipements(): Collection
  441.     {
  442.         return $this->equipements;
  443.     }
  444.     public function addEquipement(Equipements $equipement): self
  445.     {
  446.         if (!$this->equipements->contains($equipement)) {
  447.             $this->equipements->add($equipement);
  448.         }
  449.         return $this;
  450.     }
  451.     public function removeEquipement(Equipements $equipement): self
  452.     {
  453.         $this->equipements->removeElement($equipement);
  454.         return $this;
  455.     }
  456.     /**
  457.      * @return Collection<int, CommentairesLogements>
  458.      */
  459.     public function getCommentairesLogements(): Collection
  460.     {
  461.         return $this->commentairesLogements;
  462.     }
  463.     public function addCommentairesLogement(CommentairesLogements $commentairesLogement): self
  464.     {
  465.         if (!$this->commentairesLogements->contains($commentairesLogement)) {
  466.             $this->commentairesLogements->add($commentairesLogement);
  467.             $commentairesLogement->setLogement($this);
  468.         }
  469.         return $this;
  470.     }
  471.     public function removeCommentairesLogement(CommentairesLogements $commentairesLogement): self
  472.     {
  473.         if ($this->commentairesLogements->removeElement($commentairesLogement)) {
  474.             // set the owning side to null (unless already changed)
  475.             if ($commentairesLogement->getLogement() === $this) {
  476.                 $commentairesLogement->setLogement(null);
  477.             }
  478.         }
  479.         return $this;
  480.     }
  481.     public function getVille(): ?string
  482.     {
  483.         return $this->ville;
  484.     }
  485.     public function setVille(?string $ville): self
  486.     {
  487.         $this->ville $ville;
  488.         return $this;
  489.     }
  490.     public function getCodepostal(): ?string
  491.     {
  492.         return $this->codepostal;
  493.     }
  494.     public function setCodepostal(?string $codepostal): self
  495.     {
  496.         $this->codepostal $codepostal;
  497.         return $this;
  498.     }
  499.     public function getTransaction(): ?string
  500.     {
  501.         return $this->transaction;
  502.     }
  503.     public function setTransaction(?string $transaction): self
  504.     {
  505.         $this->transaction $transaction;
  506.         return $this;
  507.     }
  508.     public function getEtat(): ?string
  509.     {
  510.         return $this->etat;
  511.     }
  512.     public function setEtat(?string $etat): self
  513.     {
  514.         $this->etat $etat;
  515.         return $this;
  516.     }
  517.     public function getVilleAnnonce(): ?VillesFrance
  518.     {
  519.         return $this->ville_annonce;
  520.     }
  521.     public function setVilleAnnonce(?VillesFrance $ville_annonce): self
  522.     {
  523.         $this->ville_annonce $ville_annonce;
  524.         return $this;
  525.     }
  526.     public function getLogement(): ?string
  527.     {
  528.         return $this->logement;
  529.     }
  530.     public function setLogement(?string $logement): self
  531.     {
  532.         $this->logement $logement;
  533.         return $this;
  534.     }
  535.     public function getChauffage(): ?string
  536.     {
  537.         return $this->chauffage;
  538.     }
  539.     public function setChauffage(?string $chauffage): self
  540.     {
  541.         $this->chauffage $chauffage;
  542.         return $this;
  543.     }
  544.     public function getPieces(): ?string
  545.     {
  546.         return $this->pieces;
  547.     }
  548.     public function setPieces(?string $pieces): self
  549.     {
  550.         $this->pieces $pieces;
  551.         return $this;
  552.     }
  553.     public function getChambres(): ?string
  554.     {
  555.         return $this->chambres;
  556.     }
  557.     public function setChambres(?string $chambres): self
  558.     {
  559.         $this->chambres $chambres;
  560.         return $this;
  561.     }
  562.     public function getCharges(): ?string
  563.     {
  564.         return $this->charges;
  565.     }
  566.     public function setCharges(?string $charges): self
  567.     {
  568.         $this->charges $charges;
  569.         return $this;
  570.     }
  571.     public function getQuantite(): ?string
  572.     {
  573.         return $this->quantite;
  574.     }
  575.     public function setQuantite(?string $quantite): self
  576.     {
  577.         $this->quantite $quantite;
  578.         return $this;
  579.     }
  580.     public function getChambre(): ?string
  581.     {
  582.         return $this->chambre;
  583.     }
  584.     public function setChambre(?string $chambre): self
  585.     {
  586.         $this->chambre $chambre;
  587.         return $this;
  588.     }
  589.     public function getSalledebain(): ?string
  590.     {
  591.         return $this->salledebain;
  592.     }
  593.     public function setSalledebain(?string $salledebain): self
  594.     {
  595.         $this->salledebain $salledebain;
  596.         return $this;
  597.     }
  598.     public function getGarage(): ?string
  599.     {
  600.         return $this->garage;
  601.     }
  602.     public function setGarage(?string $garage): self
  603.     {
  604.         $this->garage $garage;
  605.         return $this;
  606.     }
  607.     /**
  608.      * @return Collection<int, PostLike>
  609.      */
  610.     public function getPostLikes(): Collection
  611.     {
  612.         return $this->postLikes;
  613.     }
  614.     public function addPostLike(PostLike $postLike): self
  615.     {
  616.         if (!$this->postLikes->contains($postLike)) {
  617.             $this->postLikes->add($postLike);
  618.             $postLike->setAnnonce($this);
  619.         }
  620.         return $this;
  621.     }
  622.     public function removePostLike(PostLike $postLike): self
  623.     {
  624.         if ($this->postLikes->removeElement($postLike)) {
  625.             // set the owning side to null (unless already changed)
  626.             if ($postLike->getAnnonce() === $this) {
  627.                 $postLike->setAnnonce(null);
  628.             }
  629.         }
  630.         return $this;
  631.     }
  632.     public function getPsedo(): ?string
  633.     {
  634.         return $this->psedo;
  635.     }
  636.     public function setPsedo(?string $psedo): self
  637.     {
  638.         $this->psedo $psedo;
  639.         return $this;
  640.     }
  641.     public function getDomaine(): ?string
  642.     {
  643.         return $this->domaine;
  644.     }
  645.     public function setDomaine(?string $domaine): self
  646.     {
  647.         $this->domaine $domaine;
  648.         return $this;
  649.     }
  650.     public function getHotel(): ?Hotels
  651.     {
  652.         return $this->hotel;
  653.     }
  654.     public function setHotel(?Hotels $hotel): self
  655.     {
  656.         $this->hotel $hotel;
  657.         return $this;
  658.     }
  659. }