src/Entity/Produit.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * Produit
  8.  *
  9.  * @ORM\Table(name="produit", indexes={@ORM\Index(name="fk_produittype_idx", columns={"type"}), @ORM\Index(name="fk_user_idx", columns={"iduser"}), @ORM\Index(name="fk_Produitsjour_idx", columns={"idsjour"})})
  10.  * @ORM\Entity(repositoryClass="App\Repository\ProduitRepository")
  11.  */
  12. class Produit
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer", nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="IDENTITY")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string|null
  24.      *
  25.      * @ORM\Column(name="labele", type="string", length=45, nullable=true)
  26.      */
  27.     private $labele;
  28.     /**
  29.      * @var int|null
  30.      *
  31.      * @ORM\Column(name="prix", type="integer", nullable=true)
  32.      */
  33.     private $prix;
  34.     /**
  35.      * @var string|null
  36.      *
  37.      * @ORM\Column(name="Produitcol", type="string", length=45, nullable=true)
  38.      */
  39.     private $produitcol;
  40.     /**
  41.      * @var \DateTime|null
  42.      *
  43.      * @ORM\Column(name="date", type="datetime", nullable=true)
  44.      */
  45.     private $date;
  46.     /**
  47.      * @var \Sejour
  48.      *
  49.      * @ORM\ManyToOne(targetEntity="Sejour")
  50.      * @ORM\JoinColumns({
  51.      *   @ORM\JoinColumn(name="idsjour", referencedColumnName="id")
  52.      * })
  53.      */
  54.     private $idsjour;
  55.     /**
  56.      * @var \Typeproduit
  57.      *
  58.      * @ORM\ManyToOne(targetEntity="Typeproduit")
  59.      * @ORM\JoinColumns({
  60.      *   @ORM\JoinColumn(name="type", referencedColumnName="id")
  61.      * })
  62.      */
  63.     private $type;
  64.     /**
  65.      * @var \User
  66.      *
  67.      * @ORM\ManyToOne(targetEntity="User")
  68.      * @ORM\JoinColumns({
  69.      *   @ORM\JoinColumn(name="iduser", referencedColumnName="id")
  70.      * })
  71.      */
  72.     private $iduser;
  73.     
  74.     
  75.         /**
  76.      * @var string|null
  77.      *
  78.      * @ORM\Column(name="statut", type="string", length=45, nullable=true)
  79.      */
  80.     private $statut;
  81.     
  82.      /**
  83.      * @var int|null
  84.      *
  85.      * @ORM\Column(name="nbattach", type="integer", nullable=true)
  86.      */
  87.     private $nbattach;
  88.     
  89.      /**
  90.      * @var string|null
  91.      * @ORM\Column(name="pathpdf", type="text",nullable=true)
  92.      */
  93.     private $pathpdf;
  94.     /**
  95.      * @ORM\ManyToOne(targetEntity="App\Entity\TypeProduitConditionnement", inversedBy="produits")
  96.      * @ORM\JoinColumns({
  97.      * @ORM\JoinColumn(name="idConditionnement_id", referencedColumnName="id")
  98.      * })
  99.      */
  100.     private $idConditionnement;
  101.     /**
  102.      * @ORM\OneToMany(targetEntity="App\Entity\PanierProduit", mappedBy="idProduit")
  103.      */
  104.     private $panierProduits;
  105.       /**
  106.      * @var int|null
  107.      *
  108.      * @ORM\Column(name="delated", type="integer", nullable=true)
  109.      */
  110.     private $delated;
  111.     
  112.     /**
  113.      * @var string|null
  114.      *
  115.      * @ORM\Column(name="version", type="string", length=45, nullable=true)
  116.      */
  117.     private $version;
  118.     /**
  119.      * @ORM\OneToMany(targetEntity="App\Entity\Photonsumeriques", mappedBy="idProduit")
  120.      */
  121.     private $photonsumeriques;
  122.     
  123.     public function __construct()
  124.     {
  125.         $this->panierProduits = new ArrayCollection();
  126.         $this->photonsumeriques = new ArrayCollection();
  127.     }
  128.     public function getId(): ?int
  129.     {
  130.         return $this->id;
  131.     }
  132.         public function getStatut(): ?string
  133.     {
  134.         return $this->statut;
  135.     }
  136.     public function setStatut(?string $statut): self
  137.     {
  138.         $this->statut $statut;
  139.         return $this;
  140.     }
  141.     
  142.     public function getLabele(): ?string
  143.     {
  144.         return $this->labele;
  145.     }
  146.     public function setLabele(?string $labele): self
  147.     {
  148.         $this->labele $labele;
  149.         return $this;
  150.     }
  151.     public function getPrix(): ?int
  152.     {
  153.         return $this->prix;
  154.     }
  155.     public function setPrix(?int $prix): self
  156.     {
  157.         $this->prix $prix;
  158.         return $this;
  159.     }
  160.     
  161.     public function getNbattach(): ?int
  162.     {
  163.         return $this->nbattach;
  164.     }
  165.     public function setNbattach(?int $nbattach): self
  166.     {
  167.         $this->nbattach $nbattach;
  168.         return $this;
  169.     }
  170.     public function getDelated(): ?int
  171.     {
  172.         return $this->delated;
  173.     }
  174.     public function setDelated(?int $delated): self
  175.     {
  176.         $this->delated $delated;
  177.         return $this;
  178.     }
  179.     public function getProduitcol(): ?string
  180.     {
  181.         return $this->produitcol;
  182.     }
  183.     public function setProduitcol(?string $produitcol): self
  184.     {
  185.         $this->produitcol $produitcol;
  186.         return $this;
  187.     }
  188.         public function getPathpdf(): ?string
  189.     {
  190.         return $this->pathpdf;
  191.     }
  192.     public function setPathpdf(?string $pathpdf): self
  193.     {
  194.         $this->pathpdf $pathpdf;
  195.         return $this;
  196.     }
  197.     
  198.     public function getDate(): ?\DateTimeInterface
  199.     {
  200.         return $this->date;
  201.     }
  202.     public function setDate(?\DateTimeInterface $date): self
  203.     {
  204.         $this->date $date;
  205.         return $this;
  206.     }
  207.     public function getIdsjour(): ?Sejour
  208.     {
  209.         return $this->idsjour;
  210.     }
  211.     public function setIdsjour(?Sejour $idsjour): self
  212.     {
  213.         $this->idsjour $idsjour;
  214.         return $this;
  215.     }
  216.     public function getType(): ?Typeproduit
  217.     {
  218.         return $this->type;
  219.     }
  220.     public function setType(?Typeproduit $type): self
  221.     {
  222.         $this->type $type;
  223.         return $this;
  224.     }
  225.     public function getIduser(): ?User
  226.     {
  227.         return $this->iduser;
  228.     }
  229.     public function setIduser(?User $iduser): self
  230.     {
  231.         $this->iduser $iduser;
  232.         return $this;
  233.     }
  234.     public function getIdConditionnement(): ?TypeProduitConditionnement
  235.     {
  236.         return $this->idConditionnement;
  237.     }
  238.     public function setIdConditionnement(?TypeProduitConditionnement $idConditionnement): self
  239.     {
  240.         $this->idConditionnement $idConditionnement;
  241.         return $this;
  242.     }
  243.     /**
  244.      * @return Collection|PanierProduit[]
  245.      */
  246.     public function getPanierProduits(): Collection
  247.     {
  248.         return $this->panierProduits;
  249.     }
  250.     public function addPanierProduit(PanierProduit $panierProduit): self
  251.     {
  252.         if (!$this->panierProduits->contains($panierProduit)) {
  253.             $this->panierProduits[] = $panierProduit;
  254.             $panierProduit->setIdProduit($this);
  255.         }
  256.         return $this;
  257.     }
  258.     public function removePanierProduit(PanierProduit $panierProduit): self
  259.     {
  260.         if ($this->panierProduits->contains($panierProduit)) {
  261.             $this->panierProduits->removeElement($panierProduit);
  262.             // set the owning side to null (unless already changed)
  263.             if ($panierProduit->getIdProduit() === $this) {
  264.                 $panierProduit->setIdProduit(null);
  265.             }
  266.         }
  267.         return $this;
  268.     }
  269.     
  270.     public function getVersion(): ?string
  271.     {
  272.         return $this->version;
  273.     }
  274.     public function setVersion(?string $version): self
  275.     {
  276.         $this->version $version;
  277.         return $this;
  278.     }
  279.     /**
  280.      * @return Collection|Photonsumeriques[]
  281.      */
  282.     public function getPhotonsumeriques(): Collection
  283.     {
  284.         return $this->photonsumeriques;
  285.     }
  286.     public function addPhotonsumerique(Photonsumeriques $photonsumerique): self
  287.     {
  288.         if (!$this->photonsumeriques->contains($photonsumerique)) {
  289.             $this->photonsumeriques[] = $photonsumerique;
  290.             $photonsumerique->setIdProduit($this);
  291.         }
  292.         return $this;
  293.     }
  294.     public function removePhotonsumerique(Photonsumeriques $photonsumerique): self
  295.     {
  296.         if ($this->photonsumeriques->contains($photonsumerique)) {
  297.             $this->photonsumeriques->removeElement($photonsumerique);
  298.             // set the owning side to null (unless already changed)
  299.             if ($photonsumerique->getIdProduit() === $this) {
  300.                 $photonsumerique->setIdProduit(null);
  301.             }
  302.         }
  303.         return $this;
  304.     }
  305. }