src/Entity/ProduitIMEI.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProduitIMEIRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ProduitIMEIRepository::class)
  9.  */
  10. class ProduitIMEI
  11. {
  12.     public const IMEIS_CONTROL_STATES_FILTERS = [
  13.         "IN_STOCK" => "En stock",
  14.         "SOLD" => "Vendu",
  15.         "DELETED" => "Supprimé",
  16.     ];
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=Produit::class, inversedBy="produitIMEIs")
  25.      */
  26.     private $produit;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      */
  30.     private $imei;
  31.     /**
  32.      * @ORM\Column(type="date")
  33.      */
  34.     private $dateEntree;
  35.     /**
  36.      * @ORM\Column(type="date", nullable=true)
  37.      */
  38.     private $dateSortie;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity=Siege::class, inversedBy="produitIMEIs")
  41.      */
  42.     private $siege;
  43.     /**
  44.      * @ORM\Column(type="date", nullable=true)
  45.      */
  46.     private $dateTransfert;
  47.     /**
  48.      * @ORM\Column(type="date", nullable=true)
  49.      */
  50.     private $dateEntreeBoutique;
  51.     /**
  52.      * @ORM\OneToMany(targetEntity=StockUser::class, mappedBy="produitIMEI")
  53.      */
  54.     private $stockUsers;
  55.     /**
  56.      * @ORM\OneToMany(targetEntity=TransfertPV::class, mappedBy="produitIMEI")
  57.      */
  58.     private $transfertPVs;
  59.     /**
  60.      * @ORM\OneToMany(targetEntity=BlIMEI::class, mappedBy="produitIMEI")
  61.      */
  62.     private $blIMEIs;
  63.     /**
  64.      * @ORM\OneToMany(targetEntity=TranfertCadeaux::class, mappedBy="productIMEI")
  65.      */
  66.     private $tranfertCadeauxes;
  67.     public function __construct()
  68.     {
  69.         $this->stockUsers = new ArrayCollection();
  70.         $this->transfertPVs = new ArrayCollection();
  71.         $this->blIMEIs = new ArrayCollection();
  72.         $this->tranfertCadeauxes = new ArrayCollection();
  73.     }
  74.     public function getId(): ?int
  75.     {
  76.         return $this->id;
  77.     }
  78.     public function getProduit(): ?Produit
  79.     {
  80.         return $this->produit;
  81.     }
  82.     public function setProduit(?Produit $produit): self
  83.     {
  84.         $this->produit $produit;
  85.         return $this;
  86.     }
  87.     public function getImei(): ?string
  88.     {
  89.         return $this->imei;
  90.     }
  91.     public function setImei(string $imei): self
  92.     {
  93.         $this->imei $imei;
  94.         return $this;
  95.     }
  96.     public function getDateEntree(): ?\DateTimeInterface
  97.     {
  98.         return $this->dateEntree;
  99.     }
  100.     public function setDateEntree(\DateTimeInterface $dateEntree): self
  101.     {
  102.         $this->dateEntree $dateEntree;
  103.         return $this;
  104.     }
  105.     public function getDateSortie(): ?\DateTimeInterface
  106.     {
  107.         return $this->dateSortie;
  108.     }
  109.     public function setDateSortie(?\DateTimeInterface $dateSortie): self
  110.     {
  111.         $this->dateSortie $dateSortie;
  112.         return $this;
  113.     }
  114.     public function getSiege(): ?Siege
  115.     {
  116.         return $this->siege;
  117.     }
  118.     public function setSiege(?Siege $siege): self
  119.     {
  120.         $this->siege $siege;
  121.         return $this;
  122.     }
  123.     public function getDateTransfert(): ?\DateTimeInterface
  124.     {
  125.         return $this->dateTransfert;
  126.     }
  127.     public function setDateTransfert(?\DateTimeInterface $dateTransfert): self
  128.     {
  129.         $this->dateTransfert $dateTransfert;
  130.         return $this;
  131.     }
  132.     public function getDateEntreeBoutique(): ?\DateTimeInterface
  133.     {
  134.         return $this->dateEntreeBoutique;
  135.     }
  136.     public function setDateEntreeBoutique(?\DateTimeInterface $dateEntreeBoutique): self
  137.     {
  138.         $this->dateEntreeBoutique $dateEntreeBoutique;
  139.         return $this;
  140.     }
  141.     /**
  142.      * @return Collection<int, StockUser>
  143.      */
  144.     public function getStockUsers(): Collection
  145.     {
  146.         return $this->stockUsers;
  147.     }
  148.     public function addStockUser(StockUser $stockUser): self
  149.     {
  150.         if (!$this->stockUsers->contains($stockUser)) {
  151.             $this->stockUsers[] = $stockUser;
  152.             $stockUser->setProduitIMEI($this);
  153.         }
  154.         return $this;
  155.     }
  156.     public function removeStockUser(StockUser $stockUser): self
  157.     {
  158.         if ($this->stockUsers->removeElement($stockUser)) {
  159.             // set the owning side to null (unless already changed)
  160.             if ($stockUser->getProduitIMEI() === $this) {
  161.                 $stockUser->setProduitIMEI(null);
  162.             }
  163.         }
  164.         return $this;
  165.     }
  166.     /**
  167.      * @return Collection<int, TransfertPV>
  168.      */
  169.     public function getTransfertPVs(): Collection
  170.     {
  171.         return $this->transfertPVs;
  172.     }
  173.     public function addTransfertPV(TransfertPV $transfertPV): self
  174.     {
  175.         if (!$this->transfertPVs->contains($transfertPV)) {
  176.             $this->transfertPVs[] = $transfertPV;
  177.             $transfertPV->setProduitIMEI($this);
  178.         }
  179.         return $this;
  180.     }
  181.     public function removeTransfertPV(TransfertPV $transfertPV): self
  182.     {
  183.         if ($this->transfertPVs->removeElement($transfertPV)) {
  184.             // set the owning side to null (unless already changed)
  185.             if ($transfertPV->getProduitIMEI() === $this) {
  186.                 $transfertPV->setProduitIMEI(null);
  187.             }
  188.         }
  189.         return $this;
  190.     }
  191.     /**
  192.      * @return Collection<int, BlIMEI>
  193.      */
  194.     public function getBlIMEIs(): Collection
  195.     {
  196.         return $this->blIMEIs;
  197.     }
  198.     public function addBlIMEI(BlIMEI $blIMEI): self
  199.     {
  200.         if (!$this->blIMEIs->contains($blIMEI)) {
  201.             $this->blIMEIs[] = $blIMEI;
  202.             $blIMEI->setProduitIMEI($this);
  203.         }
  204.         return $this;
  205.     }
  206.     public function removeBlIMEI(BlIMEI $blIMEI): self
  207.     {
  208.         if ($this->blIMEIs->removeElement($blIMEI)) {
  209.             // set the owning side to null (unless already changed)
  210.             if ($blIMEI->getProduitIMEI() === $this) {
  211.                 $blIMEI->setProduitIMEI(null);
  212.             }
  213.         }
  214.         return $this;
  215.     }
  216.     /**
  217.      * @return Collection<int, TranfertCadeaux>
  218.      */
  219.     public function getTranfertCadeauxes(): Collection
  220.     {
  221.         return $this->tranfertCadeauxes;
  222.     }
  223.     public function addTranfertCadeaux(TranfertCadeaux $tranfertCadeaux): self
  224.     {
  225.         if (!$this->tranfertCadeauxes->contains($tranfertCadeaux)) {
  226.             $this->tranfertCadeauxes[] = $tranfertCadeaux;
  227.             $tranfertCadeaux->setProductIMEI($this);
  228.         }
  229.         return $this;
  230.     }
  231.     public function removeTranfertCadeaux(TranfertCadeaux $tranfertCadeaux): self
  232.     {
  233.         if ($this->tranfertCadeauxes->removeElement($tranfertCadeaux)) {
  234.             // set the owning side to null (unless already changed)
  235.             if ($tranfertCadeaux->getProductIMEI() === $this) {
  236.                 $tranfertCadeaux->setProductIMEI(null);
  237.             }
  238.         }
  239.         return $this;
  240.     }
  241. }