src/Entity/Immeubles.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ImmeublesRepository;
  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(repositoryClassImmeublesRepository::class)]
  9. class Immeubles
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column()]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $libelle null;
  17.     #[ORM\Column(typeTypes::TEXT)]
  18.     private ?string $description null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $slug null;
  21.     #[ORM\Column(length20)]
  22.     private ?string $code null;
  23.     #[ORM\Column(length15)]
  24.     private ?string $typeoperation null;
  25.     #[ORM\Column]
  26.     private ?int $status null;
  27.     #[ORM\Column]
  28.     private ?int $prix null;
  29.     #[ORM\Column]
  30.     private ?bool $isNoprice null;
  31.     #[ORM\ManyToOne(inversedBy'immeubles')]
  32.     #[ORM\JoinColumn(nullablefalse)]
  33.     private ?User $vendeur null;
  34.     #[ORM\OneToMany(mappedBy'immeuble'targetEntityImmeubleVariable::class)]
  35.     private Collection $immeubleVariables;
  36.     #[ORM\Column(length255)]
  37.     private ?string $photo null;
  38.     #[ORM\ManyToOne(inversedBy'immeubles')]
  39.     #[ORM\JoinColumn(nullablefalse)]
  40.     private ?Villes $ville null;
  41.     #[ORM\ManyToOne(inversedBy'immeubles')]
  42.     #[ORM\JoinColumn(nullabletrue)]
  43.     private ?Quartiers $quartier null;
  44.     #[ORM\Column]
  45.     private ?\DateTimeImmutable $createdAt null;
  46.     #[ORM\Column(nullabletrue)]
  47.     private ?\DateTimeImmutable $pubDate null;
  48.     #[ORM\ManyToOne(inversedBy'immeubles')]
  49.     #[ORM\JoinColumn(nullablefalse)]
  50.     private ?Categories $categorie null;
  51.     #[ORM\OneToMany(mappedBy'immeuble'targetEntityImages::class)]
  52.     private Collection $images;
  53.     public function __construct()
  54.     {
  55.         $this->immeubleVariables = new ArrayCollection();
  56.         $this->images = new ArrayCollection();
  57.     }
  58.     public function getId(): ?int
  59.     {
  60.         return $this->id;
  61.     }
  62.     /**
  63.      * @param int|null $id
  64.      */
  65.     public function setId(?int $id): void
  66.     {
  67.         $this->id $id;
  68.     }
  69.     public function getLibelle(): ?string
  70.     {
  71.         return $this->libelle;
  72.     }
  73.     public function setLibelle(string $libelle): self
  74.     {
  75.         $this->libelle $libelle;
  76.         return $this;
  77.     }
  78.     public function getDescription(): ?string
  79.     {
  80.         return $this->description;
  81.     }
  82.     public function setDescription(string $description): self
  83.     {
  84.         $this->description $description;
  85.         return $this;
  86.     }
  87.     public function getSlug(): ?string
  88.     {
  89.         return $this->slug;
  90.     }
  91.     public function setSlug(string $slug): self
  92.     {
  93.         $this->slug $slug;
  94.         return $this;
  95.     }
  96.     public function getCode(): ?string
  97.     {
  98.         return $this->code;
  99.     }
  100.     public function setCode(string $code): self
  101.     {
  102.         $this->code $code;
  103.         return $this;
  104.     }
  105.     public function getTypeoperation(): ?string
  106.     {
  107.         return $this->typeoperation;
  108.     }
  109.     public function setTypeoperation(string $typeoperation): self
  110.     {
  111.         $this->typeoperation $typeoperation;
  112.         return $this;
  113.     }
  114.     public function getStatus(): ?int
  115.     {
  116.         return $this->status;
  117.     }
  118.     public function setStatus(int $status): self
  119.     {
  120.         $this->status $status;
  121.         return $this;
  122.     }
  123.     public function getPrix(): ?int
  124.     {
  125.         return $this->prix;
  126.     }
  127.     public function setPrix(int $prix): self
  128.     {
  129.         $this->prix $prix;
  130.         return $this;
  131.     }
  132.     public function isIsNoprice(): ?bool
  133.     {
  134.         return $this->isNoprice;
  135.     }
  136.     public function setIsNoprice(bool $isNoprice): self
  137.     {
  138.         $this->isNoprice $isNoprice;
  139.         return $this;
  140.     }
  141.     public function getVendeur(): ?User
  142.     {
  143.         return $this->vendeur;
  144.     }
  145.     public function setVendeur(?User $vendeur): self
  146.     {
  147.         $this->vendeur $vendeur;
  148.         return $this;
  149.     }
  150.     /**
  151.      * @return Collection<int, ImmeubleVariable>
  152.      */
  153.     public function getImmeubleVariables(): Collection
  154.     {
  155.         return $this->immeubleVariables;
  156.     }
  157.     public function addImmeubleVariable(ImmeubleVariable $immeubleVariable): self
  158.     {
  159.         if (!$this->immeubleVariables->contains($immeubleVariable)) {
  160.             $this->immeubleVariables[] = $immeubleVariable;
  161.             $immeubleVariable->setImmeuble($this);
  162.         }
  163.         return $this;
  164.     }
  165.     public function removeImmeubleVariable(ImmeubleVariable $immeubleVariable): self
  166.     {
  167.         if ($this->immeubleVariables->removeElement($immeubleVariable)) {
  168.             // set the owning side to null (unless already changed)
  169.             if ($immeubleVariable->getImmeuble() === $this) {
  170.                 $immeubleVariable->setImmeuble(null);
  171.             }
  172.         }
  173.         return $this;
  174.     }
  175.     public function getPhoto(): ?string
  176.     {
  177.         return $this->photo;
  178.     }
  179.     public function setPhoto(string $photo): self
  180.     {
  181.         $this->photo $photo;
  182.         return $this;
  183.     }
  184.     public function getVille(): ?Villes
  185.     {
  186.         return $this->ville;
  187.     }
  188.     public function setVille(?Villes $ville): self
  189.     {
  190.         $this->ville $ville;
  191.         return $this;
  192.     }
  193.     public function getQuartier(): ?Quartiers
  194.     {
  195.         return $this->quartier;
  196.     }
  197.     public function setQuartier(?Quartiers $quartier): self
  198.     {
  199.         $this->quartier $quartier;
  200.         return $this;
  201.     }
  202.     public function getCreatedAt(): ?\DateTimeImmutable
  203.     {
  204.         return $this->createdAt;
  205.     }
  206.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  207.     {
  208.         $this->createdAt $createdAt;
  209.         return $this;
  210.     }
  211.     public function getPubDate(): ?\DateTimeImmutable
  212.     {
  213.         return $this->pubDate;
  214.     }
  215.     public function setPubDate(?\DateTimeImmutable $pubDate): self
  216.     {
  217.         $this->pubDate $pubDate;
  218.         return $this;
  219.     }
  220.     public function getCategorie(): ?Categories
  221.     {
  222.         return $this->categorie;
  223.     }
  224.     public function setCategorie(?Categories $categorie): self
  225.     {
  226.         $this->categorie $categorie;
  227.         return $this;
  228.     }
  229.     /**
  230.      * @return Collection<int, Images>
  231.      */
  232.     public function getImages(): Collection
  233.     {
  234.         return $this->images;
  235.     }
  236.     public function addImage(Images $image): self
  237.     {
  238.         if (!$this->images->contains($image)) {
  239.             $this->images[] = $image;
  240.             $image->setImmeuble($this);
  241.         }
  242.         return $this;
  243.     }
  244.     public function removeImage(Images $image): self
  245.     {
  246.         if ($this->images->removeElement($image)) {
  247.             // set the owning side to null (unless already changed)
  248.             if ($image->getImmeuble() === $this) {
  249.                 $image->setImmeuble(null);
  250.             }
  251.         }
  252.         return $this;
  253.     }
  254. }