<?php
namespace App\Entity;
use App\Repository\ProduitPromotionRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProduitPromotionRepository::class)]
class ProduitPromotion
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $date_debut_promo = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $date_fin_promo = null;
#[ORM\ManyToOne(inversedBy: 'promotions')]
#[ORM\JoinColumn(nullable: false)]
private ?Produit $produit = null;
#[ORM\ManyToOne(inversedBy: 'promotions')]
#[ORM\JoinColumn(nullable: false)]
private ?Promotion $promotion = null;
public function getId(): ?int
{
return $this->id;
}
public function getDateDebutPromo(): ?\DateTimeInterface
{
return $this->date_debut_promo;
}
public function setDateDebutPromo(\DateTimeInterface $date_debut_promo): self
{
$this->date_debut_promo = $date_debut_promo;
return $this;
}
public function getDateFinPromo(): ?\DateTimeInterface
{
return $this->date_fin_promo;
}
public function setDateFinPromo(\DateTimeInterface $date_fin_promo): self
{
$this->date_fin_promo = $date_fin_promo;
return $this;
}
public function getProduit(): ?Produit
{
return $this->produit;
}
public function setProduit(?Produit $produit): self
{
$this->produit = $produit;
return $this;
}
public function getPromotion(): ?Promotion
{
return $this->promotion;
}
public function setPromotion(?Promotion $promotion): self
{
$this->promotion = $promotion;
return $this;
}
}