<?php
namespace App\Entity;
use App\Repository\DetailCommandeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DetailCommandeRepository::class)
*/
class DetailCommande
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Commande::class, inversedBy="detailCommandes")
*/
private $commande;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $quantite;
/**
* @ORM\ManyToOne(targetEntity=Produit::class, inversedBy="detailCommandes")
*/
private $produit;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getCommande(): ?Commande
{
return $this->commande;
}
public function setCommande(?Commande $commande): self
{
$this->commande = $commande;
return $this;
}
public function getQuantite(): ?int
{
return $this->quantite;
}
public function setQuantite(?int $quantite): self
{
$this->quantite = $quantite;
return $this;
}
public function getProduit(): ?Produit
{
return $this->produit;
}
public function setProduit(?Produit $produit): self
{
$this->produit = $produit;
return $this;
}
}