src/Entity/Vehicule.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VehiculeRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass=VehiculeRepository::class)
  8.  * @Assert\Callback("App\Validator\FileValidator", "validateMois")
  9.  */
  10. class Vehicule
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $immatriculation;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $marque;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $modele;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $couleur;
  34.     /**
  35.      * @ORM\OneToOne(targetEntity=Adherent::class, inversedBy="vehicule", cascade={"persist", "remove"})
  36.      */
  37.     private $adherent;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=Parking::class, inversedBy="vehicules")
  40.      */
  41.     private $parking;
  42.     /**
  43.      * @ORM\Column(type="integer", nullable=true)
  44.      */
  45.     private $moisDebut;
  46.     /**
  47.      * @ORM\Column(type="integer", nullable=true)
  48.      */
  49.     private $moisFin;
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getImmatriculation(): ?string
  55.     {
  56.         return $this->immatriculation;
  57.     }
  58.     public function setImmatriculation(string $immatriculation): self
  59.     {
  60.         $this->immatriculation $immatriculation;
  61.         return $this;
  62.     }
  63.     public function getMarque(): ?string
  64.     {
  65.         return $this->marque;
  66.     }
  67.     public function setMarque(string $marque): self
  68.     {
  69.         $this->marque $marque;
  70.         return $this;
  71.     }
  72.     public function getModele(): ?string
  73.     {
  74.         return $this->modele;
  75.     }
  76.     public function setModele(string $modele): self
  77.     {
  78.         $this->modele $modele;
  79.         return $this;
  80.     }
  81.     public function getCouleur(): ?string
  82.     {
  83.         return $this->couleur;
  84.     }
  85.     public function setCouleur(string $couleur): self
  86.     {
  87.         $this->couleur $couleur;
  88.         return $this;
  89.     }
  90.     public function getAdherent(): ?Adherent
  91.     {
  92.         return $this->adherent;
  93.     }
  94.     public function setAdherent(?Adherent $adherent): self
  95.     {
  96.         $this->adherent $adherent;
  97.         return $this;
  98.     }
  99.     public function getParking(): ?Parking
  100.     {
  101.         return $this->parking;
  102.     }
  103.     public function setParking(?Parking $parking): self
  104.     {
  105.         $this->parking $parking;
  106.         return $this;
  107.     }
  108.     public function getMoisDebut(): ?int
  109.     {
  110.         return $this->moisDebut;
  111.     }
  112.     public function setMoisDebut(?int $moisDebut): self
  113.     {
  114.         $this->moisDebut $moisDebut;
  115.         return $this;
  116.     }
  117.     public function getMoisFin(): ?int
  118.     {
  119.         return $this->moisFin;
  120.     }
  121.     public function setMoisFin(?int $moisFin): self
  122.     {
  123.         $this->moisFin $moisFin;
  124.         return $this;
  125.     }
  126. }