src/Entity/Transporteurs/RapportCloture.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Transporteurs;
  3. use App\Entity\GestionComerciale\Commande;
  4. use App\Entity\Utilisateur\Utilisateur;
  5. use DateTime;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. use Symfony\Component\Validator\ExecutionContextInterface;
  12. use App\Annotations\SecuredEntity;
  13. /**
  14.  * RapportCloture
  15.  *
  16.  * @ORM\Table("transporteur__rapport_cloture")
  17.  * @ORM\Entity(repositoryClass="App\Repository\Transporteurs\RapportClotureRepository")
  18.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  19.  * @SecuredEntity (name="Rapport de Cloture", group="TRANSPORTEURS")
  20.  */
  21. class RapportCloture  
  22. {
  23.     /**
  24.      * @ORM\Column(name="id", type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */
  28.     private $id;
  29.     /**
  30.      * @ORM\Column(name="commentaire", type="text", nullable=true)
  31.     */
  32.     private $commentaire;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  35.      * @ORM\JoinColumn(nullable=true)
  36.      */
  37.     private $utilisateur;
  38.     /**
  39.      * @ORM\Column(name="date", type="datetime", nullable=true)
  40.      */
  41.     private $date;
  42.     /**
  43.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  44.      */
  45.     private $dateSuppression;
  46.     /**
  47.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  48.      * @Gedmo\Timestampable(on="update")
  49.      */
  50.     private $dateMaj;
  51.     /**
  52.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="rapportCloture")
  53.     */
  54.     private $bonsLivraison;
  55.     /**
  56.      * @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\Transporteur")
  57.      * @ORM\JoinColumn(nullable=true)
  58.      */
  59.     private $transporteur;
  60.     /**
  61.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  62.      */
  63.     private $reference;
  64.     public function __construct()
  65.     {
  66.         $this->date             = new Datetime();
  67.         $this->bonsLivraison    = new ArrayCollection();
  68.     }
  69.     public function getId(): int
  70.     {
  71.         return $this->id;
  72.     }
  73.     public function setCommentaire(?string $commentaire): RapportCloture
  74.     {
  75.         $this->commentaire $commentaire;
  76.         return $this;
  77.     }
  78.     public function getCommentaire(): ?string
  79.     {
  80.         return $this->commentaire;
  81.     }
  82.     public function setDate(?DateTime $date): RapportCloture
  83.     {
  84.         $this->date $date;
  85.         return $this;
  86.     }
  87.     public function getDate(): ?DateTime
  88.     {
  89.         return $this->date;
  90.     }
  91.     public function setDateSuppression(?DateTime $dateSuppression): RapportCloture
  92.     {
  93.         $this->dateSuppression $dateSuppression;
  94.         return $this;
  95.     }
  96.     public function getDateSuppression(): ?DateTime
  97.     {
  98.         return $this->dateSuppression;
  99.     }
  100.     public function setDateMaj(?DateTime $dateMaj): RapportCloture
  101.     {
  102.         $this->dateMaj $dateMaj;
  103.         return $this;
  104.     }
  105.     public function getDateMaj(): ?DateTime
  106.     {
  107.         return $this->dateMaj;
  108.     }
  109.     public function setReference(?string $reference): RapportCloture
  110.     {
  111.         $this->reference $reference;
  112.         return $this;
  113.     }
  114.     public function getReference(): ?string
  115.     {
  116.         return $this->reference;
  117.     }
  118.     public function setUtilisateur(?Utilisateur $utilisateur): RapportCloture
  119.     {
  120.         $this->utilisateur $utilisateur;
  121.         return $this;
  122.     }
  123.     public function getUtilisateur(): ?Utilisateur
  124.     {
  125.         return $this->utilisateur;
  126.     }
  127.     public function addBonsLivraison(Commande $bonsLivraison): RapportCloture
  128.     {
  129.         $this->bonsLivraison[] = $bonsLivraison;
  130.         return $this;
  131.     }
  132.     public function removeBonsLivraison(Commande $bonsLivraison)
  133.     {
  134.         $this->bonsLivraison->removeElement($bonsLivraison);
  135.     }
  136.     public function getBonsLivraison(): Collection
  137.     {
  138.         return $this->bonsLivraison;
  139.     }
  140.     public function setTransporteur(?Transporteur $transporteur): RapportCloture
  141.     {
  142.         $this->transporteur $transporteur;
  143.         return $this;
  144.     }
  145.     public function getTransporteur(): ?Transporteur
  146.     {
  147.         return $this->transporteur;
  148.     }
  149. }