src/Entity/Produit.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProduitRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ProduitRepository::class)
  9.  */
  10. class Produit
  11. {
  12.     /**
  13.      * @ORM\Id()
  14.      * @ORM\GeneratedValue()
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="text", nullable=true)
  20.      */
  21.     private $product_num;
  22.     /**
  23.      * @ORM\Column(type="text",  nullable=true, options={"default":"-"})
  24.      */
  25.     private $date_publication_product;
  26.     /**
  27.      * @ORM\Column(type="integer", nullable=true)
  28.      */
  29.     private $order_num;
  30.     /********************************************************** */
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     private $title;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true)
  37.      */
  38.     private $author;
  39.     /**
  40.      * @ORM\Column(type="text", nullable=true)
  41.      */
  42.     private $description;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true)
  45.      */
  46.     private $owner_uisplayable_userName;
  47.     /**
  48.      * @ORM\Column(type="integer", length=255, nullable=true)
  49.      */
  50.     private $owner_id;
  51.     /**
  52.      * @ORM\Column(type="integer", length=255, nullable=true)
  53.      */
  54.     private $nbr_pages;
  55.     /**
  56.      * @ORM\Column(type="integer", length=255, nullable=true)
  57.      */
  58.     private $document_id;
  59.     /**
  60.      * @ORM\Column(type="string", length=255, nullable=true)
  61.      */
  62.     private $languages_iso_code;
  63.     /**
  64.      * @ORM\Column(type="string", length=255, nullable=true)
  65.      */
  66.     private $thumbnail_urls;
  67.     /**
  68.      * @ORM\ManyToOne(targetEntity=Categorie::class, inversedBy="produits")
  69.      */
  70.     private $categorie;
  71.     /**
  72.      * @ORM\ManyToOne(targetEntity=Theme::class, inversedBy="produits")
  73.      */
  74.     private $theme;
  75.     /**
  76.      * @ORM\ManyToMany(targetEntity=Rubrique::class, inversedBy="produits")
  77.      */
  78.     private $rubrique;
  79.     /**
  80.      * @ORM\OneToMany(targetEntity=ClientProduit::class, mappedBy="produit")
  81.      */
  82.     private $clientProduits;
  83.     public function __construct()
  84.     {
  85.         $this->rubrique = new ArrayCollection();
  86.         $this->produitRubriques = new ArrayCollection();
  87.         $this->clientProduits = new ArrayCollection();
  88.     }
  89.     public function getId(): ?int
  90.     {
  91.         return $this->id;
  92.     }
  93.     public function getProductId(): ?int
  94.     {
  95.         return $this->product_id;
  96.     }
  97.     public function setProductId(?int $product_id): self
  98.     {
  99.         $this->product_id $product_id;
  100.         return $this;
  101.     }
  102.     public function getDatePublicationProduct(): ?string
  103.     {
  104.         return $this->date_publication_product;
  105.     }
  106.     public function setDatePublicationProduct(?string $date_publication_product): self
  107.     {
  108.         $this->date_publication_product $date_publication_product;
  109.         return $this;
  110.     }
  111.     public function getOrderNum(): ?int
  112.     {
  113.         return $this->order_num;
  114.     }
  115.     public function setOrderNum(?int $order_num): self
  116.     {
  117.         $this->order_num $order_num;
  118.         return $this;
  119.     }
  120.     public function getProductNum(): ?string
  121.     {
  122.         return $this->product_num;
  123.     }
  124.     public function setProductNum(?string $product_num): self
  125.     {
  126.         $this->product_num $product_num;
  127.         return $this;
  128.     }
  129.     public function getTitle(): ?string
  130.     {
  131.         return $this->title;
  132.     }
  133.     public function setTitle(?string $title): self
  134.     {
  135.         $this->title $title;
  136.         return $this;
  137.     }
  138.     public function getAuthor(): ?string
  139.     {
  140.         return $this->author;
  141.     }
  142.     public function setAuthor(?string $author): self
  143.     {
  144.         $this->author $author;
  145.         return $this;
  146.     }
  147.     public function getDescription(): ?string
  148.     {
  149.         return $this->description;
  150.     }
  151.     public function setDescription(?string $description): self
  152.     {
  153.         $this->description $description;
  154.         return $this;
  155.     }
  156.     public function getOwnerUisplayableUserName(): ?string
  157.     {
  158.         return $this->owner_uisplayable_userName;
  159.     }
  160.     public function setOwnerUisplayableUserName(?string $owner_uisplayable_userName): self
  161.     {
  162.         $this->owner_uisplayable_userName $owner_uisplayable_userName;
  163.         return $this;
  164.     }
  165.     public function getOwnerId(): ?int
  166.     {
  167.         return $this->owner_id;
  168.     }
  169.     public function setOwnerId(?int $owner_id): self
  170.     {
  171.         $this->owner_id $owner_id;
  172.         return $this;
  173.     }
  174.     public function getNbrPages(): ?int
  175.     {
  176.         return $this->nbr_pages;
  177.     }
  178.     public function setNbrPages(?int $nbr_pages): self
  179.     {
  180.         $this->nbr_pages $nbr_pages;
  181.         return $this;
  182.     }
  183.     public function getDocumentId(): ?int
  184.     {
  185.         return $this->document_id;
  186.     }
  187.     public function setDocumentId(?int $document_id): self
  188.     {
  189.         $this->document_id $document_id;
  190.         return $this;
  191.     }
  192.     public function getLanguagesIsoCode(): ?string
  193.     {
  194.         return $this->languages_iso_code;
  195.     }
  196.     public function setLanguagesIsoCode(?string $languages_iso_code): self
  197.     {
  198.         $this->languages_iso_code $languages_iso_code;
  199.         return $this;
  200.     }
  201.     public function getThumbnailUrls(): ?string
  202.     {
  203.         return $this->thumbnail_urls;
  204.     }
  205.     public function setThumbnailUrls(?string $thumbnail_urls): self
  206.     {
  207.         $this->thumbnail_urls $thumbnail_urls;
  208.         return $this;
  209.     }
  210.     public function getCategorie(): ?Categorie
  211.     {
  212.         return $this->categorie;
  213.     }
  214.     public function setCategorie(?Categorie $categorie): self
  215.     {
  216.         $this->categorie $categorie;
  217.         return $this;
  218.     }
  219.     public function getTheme(): ?Theme
  220.     {
  221.         return $this->theme;
  222.     }
  223.     public function setTheme(?Theme $theme): self
  224.     {
  225.         $this->theme $theme;
  226.         return $this;
  227.     }
  228.     /**
  229.      * @return Collection|Rubrique[]
  230.      */
  231.     public function getRubrique(): Collection
  232.     {
  233.         return $this->rubrique;
  234.     }
  235.     public function addRubrique(Rubrique $rubrique): self
  236.     {
  237.         if (!$this->rubrique->contains($rubrique)) {
  238.             $this->rubrique[] = $rubrique;
  239.         }
  240.         return $this;
  241.     }
  242.     public function removeRubrique(Rubrique $rubrique): self
  243.     {
  244.         $this->rubrique->removeElement($rubrique);
  245.         return $this;
  246.     }
  247.     /**
  248.      * @return Collection|ClientProduit[]
  249.      */
  250.     public function getClientProduits(): Collection
  251.     {
  252.         return $this->clientProduits;
  253.     }
  254.     public function addClientProduit(ClientProduit $clientProduit): self
  255.     {
  256.         if (!$this->clientProduits->contains($clientProduit)) {
  257.             $this->clientProduits[] = $clientProduit;
  258.             $clientProduit->setProduit($this);
  259.         }
  260.         return $this;
  261.     }
  262.     public function removeClientProduit(ClientProduit $clientProduit): self
  263.     {
  264.         if ($this->clientProduits->removeElement($clientProduit)) {
  265.             // set the owning side to null (unless already changed)
  266.             if ($clientProduit->getProduit() === $this) {
  267.                 $clientProduit->setProduit(null);
  268.             }
  269.         }
  270.         return $this;
  271.     }
  272. }