src/Entity/Vehicules.php line 12

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