src/Entity/OperationDeCourtage.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\OperationDeCourtageRepository")
  6.  */
  7. class OperationDeCourtage
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.    
  16.     /**
  17.      * @ORM\Column(type="string", length=255, nullable=true)
  18.      */
  19.     private $ref;
  20.     /**
  21.      * @ORM\Column(type="string", length=255, nullable=true)
  22.      */
  23.     private $sous_jacent;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $donnrut_d_ordre;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     private $date_livraison;
  32.     
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $destination;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $terme;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $mode_de_transport;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $volume;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $unite;
  53.     /**
  54.      * @ORM\Column(type="string", length=255, nullable=true)
  55.      */
  56.     private $statut;
  57.     /**
  58.      * @ORM\Column(type="datetime", nullable=true)
  59.      */
  60.     private $date_op;
  61.     /**
  62.      * @ORM\Column(type="datetime")
  63.      */
  64.     private $createdAt;
  65.     /**
  66.      * @ORM\ManyToOne(targetEntity="App\Entity\AdminDonneurOrdre", inversedBy="donneurOperation")
  67.      */
  68.     private $donneur;
  69.     public function __construct(){
  70.         $this->createdAt = new \DateTime('now');
  71.         if (!isset($this->ref)){
  72.             $this->ref 'OP'.random_int(1,99).date('s');
  73.         }else{
  74.             $this->ref 'OP'.random_int(1,99).date('s');
  75.         }
  76.     }
  77.     public function getId(): ?int
  78.     {
  79.         return $this->id;
  80.     }
  81.     public function getDateOp():?\DateTimeInterface
  82.     {
  83.         return $this->date_op;
  84.     }
  85.     public function setDateOp(\DateTimeInterface $date_op): self
  86.     {
  87.         $this->date_op $date_op;
  88.         return $this;
  89.     }
  90.     public function getRef(): ?string
  91.     {
  92.         return $this->ref;
  93.     }
  94.     public function setRef(string $ref): self
  95.     {
  96.         $this->ref $ref;
  97.         return $this;
  98.     }
  99.     public function getSousJacent(): ?string
  100.     {
  101.         return $this->sous_jacent;
  102.     }
  103.     public function setSousJacent(string $sous_jacent): self
  104.     {
  105.         $this->sous_jacent $sous_jacent;
  106.         return $this;
  107.     }
  108.     public function getDonnrutDOrdre(): ?string
  109.     {
  110.         return $this->donnrut_d_ordre;
  111.     }
  112.     public function setDonnrutDOrdre(string $donnrut_d_ordre): self
  113.     {
  114.         $this->donnrut_d_ordre $donnrut_d_ordre;
  115.         return $this;
  116.     }
  117.     public function getDateLivraison(): ?string
  118.     {
  119.         return $this->date_livraison;
  120.     }
  121.     public function setDateLivraison(string $date_livraison): self
  122.     {
  123.         $this->date_livraison $date_livraison;
  124.         return $this;
  125.     }
  126.     public function getDestination(): ?string
  127.     {
  128.         return $this->destination;
  129.     }
  130.     public function setDestination(string $destination): self
  131.     {
  132.         $this->destination $destination;
  133.         return $this;
  134.     }
  135.     public function getTerme(): ?string
  136.     {
  137.         return $this->terme;
  138.     }
  139.     public function setTerme(string $terme): self
  140.     {
  141.         $this->terme $terme;
  142.         return $this;
  143.     }
  144.     public function getModeDeTransport(): ?string
  145.     {
  146.         return $this->mode_de_transport;
  147.     }
  148.     public function setModeDeTransport(?string $mode_de_transport): self
  149.     {
  150.         $this->mode_de_transport $mode_de_transport;
  151.         return $this;
  152.     }
  153.     public function getStatut(): ?string
  154.     {
  155.         return $this->statut;
  156.     }
  157.     public function setStatut(?string $statut): self
  158.     {
  159.         $this->statut $statut;
  160.         return $this;
  161.     }
  162.     public function getCreatedAt(): ?\DateTimeInterface
  163.     {
  164.         return $this->createdAt;
  165.     }
  166.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  167.     {
  168.         $this->createdAt $createdAt;
  169.         return $this;
  170.     }
  171.     public function getVolume(): ?string
  172.     {
  173.         return $this->volume;
  174.     }
  175.     public function setVolume(?string $volume):self
  176.     {
  177.         $this->volume $volume;
  178.         return $this;
  179.     }
  180.     public function getUnite(): ?string
  181.     {
  182.         return $this->unite;
  183.     }
  184.     public function setUnite(?string $unite):self
  185.     {
  186.         $this->unite $unite;
  187.         return $this;
  188.     }
  189.     public function getDonneur(): ?AdminDonneurOrdre
  190.     {
  191.         return $this->donneur;
  192.     }
  193.     public function setDonneur(?AdminDonneurOrdre $donneur): self
  194.     {
  195.         $this->donneur $donneur;
  196.         return $this;
  197.     }
  198.     public function __toString()
  199.     {
  200.         return $this->donneur;
  201.     }
  202. }