<?php
namespace App\Entity\GestionComerciale;
use App\Entity\MarketPlace\MarketPlace;
use App\Entity\Transporteurs\Transporteur;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\ExecutionContextInterface;
use App\Annotations\SecuredEntity;
/**
* ModeExpedition
*
* @ORM\Table("commerciale__mode_expedition")
* @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\ModeExpeditionRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
* @SecuredEntity(name="Mode Expedition", group="MARKETPLACE")
*/
class ModeExpedition
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="dateMaj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\Column(name="origine", type="string", length=255, nullable=true)
*/
private $origine;
/**
* @ORM\Column(name="reference", type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(name="duree", type="integer", nullable=true)
*/
private $duree;
/**
* @ORM\Column(name="position", type="integer", nullable=true)
*/
private $position;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\MarketPlace\MarketPlace")
* @ORM\JoinColumn(nullable=true)
*/
private $marketPlace;
/**
* @var integer
*
* @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\Transporteur", inversedBy="commandes")
* @ORM\JoinColumn(nullable=true)
*/
private $transporteur;
public function __construct()
{
$this->date = new Datetime();
}
public function getId(): int
{
return $this->id;
}
public function setDate(?DateTime $date): ModeExpedition
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setLibelle(?string $libelle): ModeExpedition
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setPosition(?int $position): ModeExpedition
{
$this->position = $position;
return $this;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setDateMaj(?DateTime $dateMaj): ModeExpedition
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setReference(?string $reference): ModeExpedition
{
$this->reference = $reference;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setOrigine(?string $origine): ModeExpedition
{
$this->origine = $origine;
return $this;
}
public function getOrigine(): ?string
{
return $this->origine;
}
public function __toString()
{
return $this->libelle;
}
public function setDuree(?int $duree): ModeExpedition
{
$this->duree = $duree;
return $this;
}
public function getDuree(): ?int
{
return $this->duree;
}
public function setDateSuppression(?DateTime $dateSuppression): ModeExpedition
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setMarketPlace(?MarketPlace $marketPlace): ModeExpedition
{
$this->marketPlace = $marketPlace;
return $this;
}
public function getMarketPlace(): ?MarketPlace
{
return $this->marketPlace;
}
public function setTransporteur(?Transporteur $transporteur): ModeExpedition
{
$this->transporteur = $transporteur;
return $this;
}
public function getTransporteur(): ?Transporteur
{
return $this->transporteur;
}
}