src/Entity/DetailCommande.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DetailCommandeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=DetailCommandeRepository::class)
  9.  */
  10. class DetailCommande
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Commande::class, inversedBy="detailCommandes")
  20.      */
  21.     private $commande;
  22.     /**
  23.      * @ORM\Column(type="integer", nullable=true)
  24.      */
  25.     private $quantite;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=Produit::class, inversedBy="detailCommandes")
  28.      */
  29.     private $produit;
  30.     public function __construct()
  31.     {
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getCommande(): ?Commande
  38.     {
  39.         return $this->commande;
  40.     }
  41.     public function setCommande(?Commande $commande): self
  42.     {
  43.         $this->commande $commande;
  44.         return $this;
  45.     }
  46.     public function getQuantite(): ?int
  47.     {
  48.         return $this->quantite;
  49.     }
  50.     public function setQuantite(?int $quantite): self
  51.     {
  52.         $this->quantite $quantite;
  53.         return $this;
  54.     }
  55.     public function getProduit(): ?Produit
  56.     {
  57.         return $this->produit;
  58.     }
  59.     public function setProduit(?Produit $produit): self
  60.     {
  61.         $this->produit $produit;
  62.         return $this;
  63.     }
  64. }