src/Entity/Vente.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\VenteRepository")
  6.  */
  7. class Vente
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\ManyToOne(targetEntity="App\Entity\Client", inversedBy="ventes")
  17.      * @ORM\JoinColumn(nullable=false)
  18.      */
  19.     private $client;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity="App\Entity\Voiture", inversedBy="ventes")
  22.      * @ORM\JoinColumn(nullable=false)
  23.      */
  24.     private $voiture;
  25.     /**
  26.      * @ORM\Column(type="integer")
  27.      */
  28.     private $quantite;
  29.     /**
  30.      * @ORM\Column(type="date")
  31.      */
  32.     private $date;
  33.     public function __construct()
  34.     {
  35.         $this->date = new \Datetime();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getClient(): ?Client
  42.     {
  43.         return $this->client;
  44.     }
  45.     public function setClient(?Client $client): self
  46.     {
  47.         $this->client $client;
  48.         return $this;
  49.     }
  50.     public function getVoiture(): ?Voiture
  51.     {
  52.         return $this->voiture;
  53.     }
  54.     public function setVoiture(?Voiture $voiture): self
  55.     {
  56.         $this->voiture $voiture;
  57.         return $this;
  58.     }
  59.     public function getQuantite(): ?int
  60.     {
  61.         return $this->quantite;
  62.     }
  63.     public function setQuantite(int $quantite): self
  64.     {
  65.         $this->quantite $quantite;
  66.         return $this;
  67.     }
  68.     public function getDate(): ?\DateTimeInterface
  69.     {
  70.         return $this->date;
  71.     }
  72.     public function setDate(\DateTimeInterface $date): self
  73.     {
  74.         $this->date $date;
  75.         return $this;
  76.     }
  77. }