src/Entity/KitPromotionnelItem.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\KitPromotionnelItemRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass=KitPromotionnelItemRepository::class)
  8.  */
  9. class KitPromotionnelItem
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=KitPromotionnel::class, inversedBy="items")
  19.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  20.      */
  21.     private $kitPromotionnel;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=TrProduits::class, inversedBy="kitPromotionnelItems")
  24.      * @ORM\JoinColumn(nullable=false)
  25.      * @Assert\NotNull
  26.      */
  27.     private $produit;
  28.     /**
  29.      * @ORM\Column(type="integer")
  30.      * @Assert\Positive
  31.      */
  32.     private $quantite = 1;
  33.     /**
  34.      * @ORM\Column(type="integer", nullable=true)
  35.      * @Assert\GreaterThanOrEqual(value=0)
  36.      */
  37.     private $ordreAffichage;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getKitPromotionnel(): ?KitPromotionnel
  43.     {
  44.         return $this->kitPromotionnel;
  45.     }
  46.     public function setKitPromotionnel(?KitPromotionnel $kitPromotionnel): self
  47.     {
  48.         $this->kitPromotionnel = $kitPromotionnel;
  49.         return $this;
  50.     }
  51.     public function getProduit(): ?TrProduits
  52.     {
  53.         return $this->produit;
  54.     }
  55.     public function setProduit(?TrProduits $produit): self
  56.     {
  57.         $this->produit = $produit;
  58.         return $this;
  59.     }
  60.     public function getQuantite(): ?int
  61.     {
  62.         return $this->quantite;
  63.     }
  64.     public function setQuantite(int $quantite): self
  65.     {
  66.         $this->quantite = $quantite;
  67.         return $this;
  68.     }
  69.     public function getOrdreAffichage(): ?int
  70.     {
  71.         return $this->ordreAffichage;
  72.     }
  73.     public function setOrdreAffichage(?int $ordreAffichage): self
  74.     {
  75.         $this->ordreAffichage = $ordreAffichage;
  76.         return $this;
  77.     }
  78. }