src/Entity/Stockpharmacie.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StockpharmacieRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=StockpharmacieRepository::class)
  9.  * @ORM\HasLifecycleCallbacks
  10.  */
  11. class Stockpharmacie
  12. {
  13.     /**
  14.     * @ORM\Id()
  15.     * @ORM\GeneratedValue()
  16.     * @ORM\Column(type="integer")
  17.     */
  18.      private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $nomproduit;
  23.     /**
  24.      * @ORM\Column(type="string", length=255,nullable=true)
  25.      */
  26.     private $cip7;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $cip13;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="stockpharmacies")
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     private $user;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=IctusPharmacie::class, inversedBy="stockpharmacies")
  38.      */
  39.     private $ictuspharmacie;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity=IctusForme::class, inversedBy="stockpharmacies")
  42.      */
  43.     private $ictusforme;
  44.     /**
  45.      * @ORM\Column(type="string", length=50, nullable=true)
  46.      */
  47.     private $uuid;
  48.     /**
  49.      * @ORM\Column(type="string", length=255, nullable=true)
  50.      */
  51.     private $description;
  52.     /**
  53.      * @ORM\Column(type="text", nullable=true)
  54.      */
  55.     private $posologie;
  56.     /**
  57.      * @ORM\Column(type="float", nullable=true)
  58.      */
  59.     private $poids;
  60.     /**
  61.      * @ORM\Column(type="boolean", nullable=true)
  62.      */
  63.     private $isDisponible;
  64.     /**
  65.      * @ORM\Column(type="float", nullable=true)
  66.      */
  67.     private $prixunitforme;
  68.     /**
  69.      * @ORM\Column(type="float", nullable=true)
  70.      */
  71.     private $remise;
  72.     /**
  73.      * @ORM\Column(type="datetime", nullable=true)
  74.      */
  75.     private $dateFinRemise;
  76.     /**
  77.      * @ORM\Column(type="integer", nullable=true)
  78.      */
  79.     private $quantite;
  80.     /**
  81.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="stockpharmacies")
  82.      */
  83.     private $produit;
  84.     /**
  85.      * @ORM\OneToMany(targetEntity=IctusPanierPatient::class, mappedBy="produit_stock_pcie", cascade={"remove"})
  86.      */
  87.     private $ictusPanierPatients;
  88.     /**
  89.      * @ORM\Column(type="integer", nullable=true)
  90.      */
  91.     private $tva;
  92.     /**
  93.      * @ORM\OneToMany(targetEntity=IctusCommandeLine::class, mappedBy="stockPharmacieProduit")
  94.      */
  95.     private $ictusCommandeLines;
  96.     /**
  97.      * @ORM\Column(type="datetime")
  98.      */
  99.     private $created_at;
  100.     /**
  101.      * @ORM\Column(type="datetime", nullable=true)
  102.      */
  103.     private $modified_at;
  104.     /**
  105.      * @ORM\Column(type="boolean", nullable=true)
  106.      */
  107.     private $isOrdonnance;
  108.     public function __construct()
  109.     {
  110.         $this->uuid   uniqid((new \DateTime())->format('YmdHis'));
  111.         $this->created_at = new \DateTime();
  112.         $this->ictusPanierPatients = new ArrayCollection();
  113.         $this->ictusCommandeLines = new ArrayCollection();
  114.     }
  115.     /**
  116.      * Undocumented function
  117.      *
  118.      * @ORM\PrePersist
  119.      * @ORM\PreUpdate
  120.      */
  121.     public function initialiseSlug()
  122.     {
  123.         $this->modified_at = new \DateTime();
  124.     }
  125.     public function getId(): ?int
  126.     {
  127.         return $this->id;
  128.     }
  129.     public function getNomproduit(): ?string
  130.     {
  131.         return $this->nomproduit;
  132.     }
  133.     public function setNomproduit(string $nomproduit): self
  134.     {
  135.         $this->nomproduit $nomproduit;
  136.         return $this;
  137.     }
  138.     public function getCip7(): ?string
  139.     {
  140.         return $this->cip7;
  141.     }
  142.     public function setCip7(?string $cip7): self
  143.     {
  144.         $this->cip7 $cip7;
  145.         return $this;
  146.     }
  147.     public function getCip13(): ?string
  148.     {
  149.         return $this->cip13;
  150.     }
  151.     public function setCip13(?string $cip13): self
  152.     {
  153.         $this->cip13 $cip13;
  154.         return $this;
  155.     }
  156.     public function getUser(): ?User
  157.     {
  158.         return $this->user;
  159.     }
  160.     public function setUser(?User $user): self
  161.     {
  162.         $this->user $user;
  163.         return $this;
  164.     }
  165.     public function getIctuspharmacie(): ?IctusPharmacie
  166.     {
  167.         return $this->ictuspharmacie;
  168.     }
  169.     public function setIctuspharmacie(?IctusPharmacie $ictuspharmacie): self
  170.     {
  171.         $this->ictuspharmacie $ictuspharmacie;
  172.         return $this;
  173.     }
  174.     public function getIctusforme(): ?IctusForme
  175.     {
  176.         return $this->ictusforme;
  177.     }
  178.     public function setIctusforme(?IctusForme $ictusforme): self
  179.     {
  180.         $this->ictusforme $ictusforme;
  181.         return $this;
  182.     }
  183.     public function getUuid(): ?string
  184.     {
  185.         return $this->uuid;
  186.     }
  187.     public function setUuid(?string $uuid): self
  188.     {
  189.         $this->uuid $uuid;
  190.         return $this;
  191.     }
  192.     public function getDescription(): ?string
  193.     {
  194.         return $this->description;
  195.     }
  196.     public function setDescription(?string $description): self
  197.     {
  198.         $this->description $description;
  199.         return $this;
  200.     }
  201.     public function getPosologie(): ?string
  202.     {
  203.         return $this->posologie;
  204.     }
  205.     public function setPosologie(?string $posologie): self
  206.     {
  207.         $this->posologie $posologie;
  208.         return $this;
  209.     }
  210.     public function getPoids(): ?float
  211.     {
  212.         return $this->poids;
  213.     }
  214.     public function setPoids(?float $poids): self
  215.     {
  216.         $this->poids $poids;
  217.         return $this;
  218.     }
  219.     public function isIsDisponible(): ?bool
  220.     {
  221.         return $this->isDisponible;
  222.     }
  223.     public function setIsDisponible(?bool $isDisponible): self
  224.     {
  225.         $this->isDisponible $isDisponible;
  226.         return $this;
  227.     }
  228.     public function getPrixunitforme(): ?float
  229.     {
  230.         return $this->prixunitforme;
  231.     }
  232.     public function setPrixunitforme(?float $prixunitforme): self
  233.     {
  234.         $this->prixunitforme $prixunitforme;
  235.         return $this;
  236.     }
  237.     public function getRemise(): ?float
  238.     {
  239.         return $this->remise;
  240.     }
  241.     public function setRemise(?float $remise): self
  242.     {
  243.         $this->remise $remise;
  244.         return $this;
  245.     }
  246.     public function getDateFinRemise(): ?\DateTimeInterface
  247.     {
  248.         return $this->dateFinRemise;
  249.     }
  250.     public function setDateFinRemise(?\DateTimeInterface $dateFinRemise): self
  251.     {
  252.         $this->dateFinRemise $dateFinRemise;
  253.         return $this;
  254.     }
  255.     public function getQuantite(): ?int
  256.     {
  257.         return $this->quantite;
  258.     }
  259.     public function setQuantite(?int $quantite): self
  260.     {
  261.         $this->quantite $quantite;
  262.         return $this;
  263.     }
  264.     public function getProduit(): ?Product
  265.     {
  266.         return $this->produit;
  267.     }
  268.     public function setProduit(?Product $produit): self
  269.     {
  270.         $this->produit $produit;
  271.         return $this;
  272.     }
  273.     /**
  274.      * @return Collection<int, IctusPanierPatient>
  275.      */
  276.     public function getIctusPanierPatients(): Collection
  277.     {
  278.         return $this->ictusPanierPatients;
  279.     }
  280.     public function addIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
  281.     {
  282.         if (!$this->ictusPanierPatients->contains($ictusPanierPatient)) {
  283.             $this->ictusPanierPatients[] = $ictusPanierPatient;
  284.             $ictusPanierPatient->setProduitStockPcie($this);
  285.         }
  286.         return $this;
  287.     }
  288.     public function removeIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
  289.     {
  290.         if ($this->ictusPanierPatients->removeElement($ictusPanierPatient)) {
  291.             // set the owning side to null (unless already changed)
  292.             if ($ictusPanierPatient->getProduitStockPcie() === $this) {
  293.                 $ictusPanierPatient->setProduitStockPcie(null);
  294.             }
  295.         }
  296.         return $this;
  297.     }
  298.     public function getTva(): ?int
  299.     {
  300.         return $this->tva;
  301.     }
  302.     public function setTva(?int $tva): self
  303.     {
  304.         $this->tva $tva;
  305.         return $this;
  306.     }
  307.     /**
  308.      * @return Collection<int, IctusCommandeLine>
  309.      */
  310.     public function getIctusCommandeLines(): Collection
  311.     {
  312.         return $this->ictusCommandeLines;
  313.     }
  314.     public function addIctusCommandeLine(IctusCommandeLine $ictusCommandeLine): self
  315.     {
  316.         if (!$this->ictusCommandeLines->contains($ictusCommandeLine)) {
  317.             $this->ictusCommandeLines[] = $ictusCommandeLine;
  318.             $ictusCommandeLine->setStockPharmacieProduit($this);
  319.         }
  320.         return $this;
  321.     }
  322.     public function removeIctusCommandeLine(IctusCommandeLine $ictusCommandeLine): self
  323.     {
  324.         if ($this->ictusCommandeLines->removeElement($ictusCommandeLine)) {
  325.             // set the owning side to null (unless already changed)
  326.             if ($ictusCommandeLine->getStockPharmacieProduit() === $this) {
  327.                 $ictusCommandeLine->setStockPharmacieProduit(null);
  328.             }
  329.         }
  330.         return $this;
  331.     }
  332.     public function getCreatedAt(): ?\DateTimeInterface
  333.     {
  334.         return $this->created_at;
  335.     }
  336.     public function setCreatedAt(\DateTimeInterface $created_at): self
  337.     {
  338.         $this->created_at $created_at;
  339.         return $this;
  340.     }
  341.     public function getModifiedAt(): ?\DateTimeInterface
  342.     {
  343.         return $this->modified_at;
  344.     }
  345.     public function setModifiedAt(\DateTimeInterface $modified_at): self
  346.     {
  347.         $this->modified_at $modified_at;
  348.         return $this;
  349.     }
  350.     public function isIsOrdonnance(): ?bool
  351.     {
  352.         return $this->isOrdonnance;
  353.     }
  354.     public function setIsOrdonnance(?bool $isOrdonnance): self
  355.     {
  356.         $this->isOrdonnance $isOrdonnance;
  357.         return $this;
  358.     }
  359. }