src/Entity/TmpReception.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TmpReceptionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TmpReceptionRepository::class)
  9.  */
  10. class TmpReception
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=15)
  20.      */
  21.     private $volume;
  22.     /**
  23.      * @ORM\Column(type="string", length=15)
  24.      */
  25.     private $tonne;
  26.     /**
  27.      * @ORM\Column(type="boolean")
  28.      */
  29.     private $isflag;
  30.     /**
  31.      * @ORM\Column(type="string", length=10)
  32.      */
  33.     private $unite;
  34.     /**
  35.      * @ORM\Column(type="string", length=255)
  36.      */
  37.     private $nature;
  38.     /**
  39.      * @ORM\Column(type="string", length=255)
  40.      */
  41.     private $classementdepot;
  42.     /**
  43.      * @ORM\Column(type="string", length=10)
  44.      */
  45.     private $quantite;
  46.     /**
  47.      * @ORM\Column(type="string", length=100)
  48.      */
  49.     private $flutterid;
  50.     /**
  51.      * @ORM\ManyToOne(targetEntity=Reception::class, inversedBy="tmpReceptions", cascade={"persist", "remove"})
  52.      */
  53.     private $reception;
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity=utilisateur::class, inversedBy="tmpReceptions")
  56.      */
  57.     private $user;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=TmpConteneurReception::class, mappedBy="tmpReception")
  60.      */
  61.     private $tmpConteneurReceptions;
  62.     private $totalLoaded;
  63.     public function __construct()
  64.     {
  65.         $this->tmpConteneurReceptions = new ArrayCollection();
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getNature(): ?string
  72.     {
  73.         return $this->nature;
  74.     }
  75.     public function setNature(string $nature): self
  76.     {
  77.         $this->nature $nature;
  78.         return $this;
  79.     }
  80.     public function getFlutterid(): ?string
  81.     {
  82.         return $this->flutterid;
  83.     }
  84.     public function setFlutterid(string $flutterid): self
  85.     {
  86.         $this->flutterid $flutterid;
  87.         return $this;
  88.     }
  89.     public function getQuantite(): ?string
  90.     {
  91.         return $this->quantite;
  92.     }
  93.     public function setQuantite(string $quantite): self
  94.     {
  95.         $this->quantite $quantite;
  96.         return $this;
  97.     }
  98.     public function getVolume(): ?string
  99.     {
  100.         return $this->volume;
  101.     }
  102.     public function setVolume(string $volume): self
  103.     {
  104.         $this->volume $volume;
  105.         return $this;
  106.     }
  107.     public function getTonne(): ?string
  108.     {
  109.         return $this->tonne;
  110.     }
  111.     public function setTonne(string $tonne): self
  112.     {
  113.         $this->tonne $tonne;
  114.         return $this;
  115.     }
  116.     public function isIsflag(): ?bool
  117.     {
  118.         return $this->isflag;
  119.     }
  120.     public function setIsflag(bool $isflag): self
  121.     {
  122.         $this->isflag $isflag;
  123.         return $this;
  124.     }
  125.     public function getUnite(): ?string
  126.     {
  127.         return $this->unite;
  128.     }
  129.     public function setUnite(string $unite): self
  130.     {
  131.         $this->unite $unite;
  132.         return $this;
  133.     }
  134.     public function getReception(): ?Reception
  135.     {
  136.         return $this->reception;
  137.     }
  138.     public function setReception(?Reception $reception): self
  139.     {
  140.         $this->reception $reception;
  141.         return $this;
  142.     }
  143.     public function getUser(): ?utilisateur
  144.     {
  145.         return $this->user;
  146.     }
  147.     public function setUser(?utilisateur $user): self
  148.     {
  149.         $this->user $user;
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return mixed
  154.      */
  155.     public function getClassementdepot(): string
  156.     {
  157.         return $this->classementdepot;
  158.     }
  159.     /**
  160.      * @param mixed $classementdepot
  161.      */
  162.     public function setClassementdepot(string $classementdepot): self
  163.     {
  164.         $this->classementdepot $classementdepot;
  165.         return $this;
  166.     }
  167.     /**
  168.      * @return Collection<int, TmpConteneurReception>
  169.      */
  170.     public function getTmpConteneurReceptions(): Collection
  171.     {
  172.         return $this->tmpConteneurReceptions;
  173.     }
  174.     public function addTmpConteneurReception(TmpConteneurReception $tmpConteneurReception): self
  175.     {
  176.         if (!$this->tmpConteneurReceptions->contains($tmpConteneurReception)) {
  177.             $this->tmpConteneurReceptions[] = $tmpConteneurReception;
  178.             $tmpConteneurReception->setTmpReception($this);
  179.         }
  180.         return $this;
  181.     }
  182.     public function removeTmpConteneurReception(TmpConteneurReception $tmpConteneurReception): self
  183.     {
  184.         if ($this->tmpConteneurReceptions->removeElement($tmpConteneurReception)) {
  185.             // set the owning side to null (unless already changed)
  186.             if ($tmpConteneurReception->getTmpReception() === $this) {
  187.                 $tmpConteneurReception->setTmpReception(null);
  188.             }
  189.         }
  190.         return $this;
  191.     }
  192.     public function getTotalLOADED()
  193.     {
  194.         $total 0;
  195.         foreach($this->getTmpConteneurReceptions() as $v){
  196.                 $total $total $v->getQuantite();
  197.         }
  198.         return  $this->totalLoaded $total;
  199.     }
  200. }