src/Entity/Pneu.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PneuRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=PneuRepository::class)
  9.  */
  10. class Pneu
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $hauteur;
  22.     /**
  23.      * @ORM\Column(type="float")
  24.      */
  25.     private $largeur;
  26.     /**
  27.      * @ORM\Column(type="integer")
  28.      */
  29.     private $diametre;
  30.     /**
  31.      * @ORM\Column(type="integer", nullable=true)
  32.      */
  33.     private $charge;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $vitesse;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $saison;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $marque;
  46.     /**
  47.      * @ORM\Column(type="string", length=255)
  48.      */
  49.     private $image;
  50.     /**
  51.      * @ORM\Column(type="float")
  52.      */
  53.     private $prix;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $modele;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=OrderDetail::class, mappedBy="pneu")
  60.      */
  61.     private $orderDetails;
  62.     /**
  63.      * @ORM\Column(type="string", length=255)
  64.      */
  65.     private $structure;
  66.     /**
  67.      * @ORM\Column(type="string", length=255, nullable=true)
  68.      */
  69.     private $specificite;
  70.     /**
  71.      * @ORM\Column(type="string", length=255)
  72.      */
  73.     private $DOT;
  74.     /**
  75.      * @ORM\Column(type="string", length=255)
  76.      */
  77.     private $usure;
  78.     public function __construct()
  79.     {
  80.         $this->orderDetails = new ArrayCollection();
  81.     }
  82.     public function getId(): ?int
  83.     {
  84.         return $this->id;
  85.     }
  86.     public function getHauteur(): ?int
  87.     {
  88.         return $this->hauteur;
  89.     }
  90.     public function setHauteur(int $hauteur): self
  91.     {
  92.         $this->hauteur $hauteur;
  93.         return $this;
  94.     }
  95.     public function getLargeur(): ?float
  96.     {
  97.         return $this->largeur;
  98.     }
  99.     public function setLargeur(float $largeur): self
  100.     {
  101.         $this->largeur $largeur;
  102.         return $this;
  103.     }
  104.     public function getDiametre(): ?int
  105.     {
  106.         return $this->diametre;
  107.     }
  108.     public function setDiametre(int $diametre): self
  109.     {
  110.         $this->diametre $diametre;
  111.         return $this;
  112.     }
  113.     public function getCharge(): ?int
  114.     {
  115.         return $this->charge;
  116.     }
  117.     public function setCharge(?int $charge): self
  118.     {
  119.         $this->charge $charge;
  120.         return $this;
  121.     }
  122.     public function getVitesse(): ?string
  123.     {
  124.         return $this->vitesse;
  125.     }
  126.     public function setVitesse(?string $vitesse): self
  127.     {
  128.         $this->vitesse $vitesse;
  129.         return $this;
  130.     }
  131.     public function getSaison(): ?string
  132.     {
  133.         return $this->saison;
  134.     }
  135.     public function setSaison(?string $saison): self
  136.     {
  137.         $this->saison $saison;
  138.         return $this;
  139.     }
  140.     public function getMarque(): ?string
  141.     {
  142.         return $this->marque;
  143.     }
  144.     public function setMarque(?string $marque): self
  145.     {
  146.         $this->marque $marque;
  147.         return $this;
  148.     }
  149.     public function getImage(): ?string
  150.     {
  151.         return $this->image;
  152.     }
  153.     public function setImage(string $image): self
  154.     {
  155.         $this->image $image;
  156.         return $this;
  157.     }
  158.     public function getPrix(): ?float
  159.     {
  160.         return $this->prix;
  161.     }
  162.     public function setPrix(float $prix): self
  163.     {
  164.         $this->prix $prix;
  165.         return $this;
  166.     }
  167.     public function getModele(): ?string
  168.     {
  169.         return $this->modele;
  170.     }
  171.     public function setModele(?string $modele): self
  172.     {
  173.         $this->modele $modele;
  174.         return $this;
  175.     }
  176.     /**
  177.      * @return Collection<int, OrderDetail>
  178.      */
  179.     public function getOrderDetails(): Collection
  180.     {
  181.         return $this->orderDetails;
  182.     }
  183.     public function addOrderDetail(OrderDetail $orderDetail): self
  184.     {
  185.         if (!$this->orderDetails->contains($orderDetail)) {
  186.             $this->orderDetails[] = $orderDetail;
  187.             $orderDetail->setPneu($this);
  188.         }
  189.         return $this;
  190.     }
  191.     public function removeOrderDetail(OrderDetail $orderDetail): self
  192.     {
  193.         if ($this->orderDetails->removeElement($orderDetail)) {
  194.             // set the owning side to null (unless already changed)
  195.             if ($orderDetail->getPneu() === $this) {
  196.                 $orderDetail->setPneu(null);
  197.             }
  198.         }
  199.         return $this;
  200.     }
  201.     public function getStructure(): ?string
  202.     {
  203.         return $this->structure;
  204.     }
  205.     public function setStructure(string $structure): self
  206.     {
  207.         $this->structure $structure;
  208.         return $this;
  209.     }
  210.     public function getSpecificite(): ?string
  211.     {
  212.         return $this->specificite;
  213.     }
  214.     public function setSpecificite(string $specificite): self
  215.     {
  216.         $this->specificite $specificite;
  217.         return $this;
  218.     }
  219.     public function getDOT(): ?string
  220.     {
  221.         return $this->DOT;
  222.     }
  223.     public function setDOT(string $DOT): self
  224.     {
  225.         $this->DOT $DOT;
  226.         return $this;
  227.     }
  228.     public function getUsure(): ?string
  229.     {
  230.         return $this->usure;
  231.     }
  232.     public function setUsure(string $usure): self
  233.     {
  234.         $this->usure $usure;
  235.         return $this;
  236.     }
  237. }