<?php
namespace App\Entity;
use App\Repository\ProduitRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProduitRepository::class)
*/
class Produit
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $product_num;
/**
* @ORM\Column(type="text", nullable=true, options={"default":"-"})
*/
private $date_publication_product;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $order_num;
/********************************************************** */
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $title;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $author;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $owner_uisplayable_userName;
/**
* @ORM\Column(type="integer", length=255, nullable=true)
*/
private $owner_id;
/**
* @ORM\Column(type="integer", length=255, nullable=true)
*/
private $nbr_pages;
/**
* @ORM\Column(type="integer", length=255, nullable=true)
*/
private $document_id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $languages_iso_code;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $thumbnail_urls;
/**
* @ORM\ManyToOne(targetEntity=Categorie::class, inversedBy="produits")
*/
private $categorie;
/**
* @ORM\ManyToOne(targetEntity=Theme::class, inversedBy="produits")
*/
private $theme;
/**
* @ORM\ManyToMany(targetEntity=Rubrique::class, inversedBy="produits")
*/
private $rubrique;
/**
* @ORM\OneToMany(targetEntity=ClientProduit::class, mappedBy="produit")
*/
private $clientProduits;
public function __construct()
{
$this->rubrique = new ArrayCollection();
$this->produitRubriques = new ArrayCollection();
$this->clientProduits = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getProductId(): ?int
{
return $this->product_id;
}
public function setProductId(?int $product_id): self
{
$this->product_id = $product_id;
return $this;
}
public function getDatePublicationProduct(): ?string
{
return $this->date_publication_product;
}
public function setDatePublicationProduct(?string $date_publication_product): self
{
$this->date_publication_product = $date_publication_product;
return $this;
}
public function getOrderNum(): ?int
{
return $this->order_num;
}
public function setOrderNum(?int $order_num): self
{
$this->order_num = $order_num;
return $this;
}
public function getProductNum(): ?string
{
return $this->product_num;
}
public function setProductNum(?string $product_num): self
{
$this->product_num = $product_num;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getAuthor(): ?string
{
return $this->author;
}
public function setAuthor(?string $author): self
{
$this->author = $author;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getOwnerUisplayableUserName(): ?string
{
return $this->owner_uisplayable_userName;
}
public function setOwnerUisplayableUserName(?string $owner_uisplayable_userName): self
{
$this->owner_uisplayable_userName = $owner_uisplayable_userName;
return $this;
}
public function getOwnerId(): ?int
{
return $this->owner_id;
}
public function setOwnerId(?int $owner_id): self
{
$this->owner_id = $owner_id;
return $this;
}
public function getNbrPages(): ?int
{
return $this->nbr_pages;
}
public function setNbrPages(?int $nbr_pages): self
{
$this->nbr_pages = $nbr_pages;
return $this;
}
public function getDocumentId(): ?int
{
return $this->document_id;
}
public function setDocumentId(?int $document_id): self
{
$this->document_id = $document_id;
return $this;
}
public function getLanguagesIsoCode(): ?string
{
return $this->languages_iso_code;
}
public function setLanguagesIsoCode(?string $languages_iso_code): self
{
$this->languages_iso_code = $languages_iso_code;
return $this;
}
public function getThumbnailUrls(): ?string
{
return $this->thumbnail_urls;
}
public function setThumbnailUrls(?string $thumbnail_urls): self
{
$this->thumbnail_urls = $thumbnail_urls;
return $this;
}
public function getCategorie(): ?Categorie
{
return $this->categorie;
}
public function setCategorie(?Categorie $categorie): self
{
$this->categorie = $categorie;
return $this;
}
public function getTheme(): ?Theme
{
return $this->theme;
}
public function setTheme(?Theme $theme): self
{
$this->theme = $theme;
return $this;
}
/**
* @return Collection|Rubrique[]
*/
public function getRubrique(): Collection
{
return $this->rubrique;
}
public function addRubrique(Rubrique $rubrique): self
{
if (!$this->rubrique->contains($rubrique)) {
$this->rubrique[] = $rubrique;
}
return $this;
}
public function removeRubrique(Rubrique $rubrique): self
{
$this->rubrique->removeElement($rubrique);
return $this;
}
/**
* @return Collection|ClientProduit[]
*/
public function getClientProduits(): Collection
{
return $this->clientProduits;
}
public function addClientProduit(ClientProduit $clientProduit): self
{
if (!$this->clientProduits->contains($clientProduit)) {
$this->clientProduits[] = $clientProduit;
$clientProduit->setProduit($this);
}
return $this;
}
public function removeClientProduit(ClientProduit $clientProduit): self
{
if ($this->clientProduits->removeElement($clientProduit)) {
// set the owning side to null (unless already changed)
if ($clientProduit->getProduit() === $this) {
$clientProduit->setProduit(null);
}
}
return $this;
}
}