<?php
namespace App\Entity;
use App\Repository\KitPromotionnelItemRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=KitPromotionnelItemRepository::class)
*/
class KitPromotionnelItem
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=KitPromotionnel::class, inversedBy="items")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $kitPromotionnel;
/**
* @ORM\ManyToOne(targetEntity=TrProduits::class, inversedBy="kitPromotionnelItems")
* @ORM\JoinColumn(nullable=false)
* @Assert\NotNull
*/
private $produit;
/**
* @ORM\Column(type="integer")
* @Assert\Positive
*/
private $quantite = 1;
/**
* @ORM\Column(type="integer", nullable=true)
* @Assert\GreaterThanOrEqual(value=0)
*/
private $ordreAffichage;
public function getId(): ?int
{
return $this->id;
}
public function getKitPromotionnel(): ?KitPromotionnel
{
return $this->kitPromotionnel;
}
public function setKitPromotionnel(?KitPromotionnel $kitPromotionnel): self
{
$this->kitPromotionnel = $kitPromotionnel;
return $this;
}
public function getProduit(): ?TrProduits
{
return $this->produit;
}
public function setProduit(?TrProduits $produit): self
{
$this->produit = $produit;
return $this;
}
public function getQuantite(): ?int
{
return $this->quantite;
}
public function setQuantite(int $quantite): self
{
$this->quantite = $quantite;
return $this;
}
public function getOrdreAffichage(): ?int
{
return $this->ordreAffichage;
}
public function setOrdreAffichage(?int $ordreAffichage): self
{
$this->ordreAffichage = $ordreAffichage;
return $this;
}
}