<?phpnamespace App\Entity;use App\Repository\ProduitDDRepository;use Doctrine\ORM\Mapping as ORM;use App\Entity\CategorieDD;use Exception;use JsonSerializable;/** * @ORM\Entity(repositoryClass=ProduitDDRepository::class) */class ProduitDD implements JsonSerializable{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $nom; /** * @ORM\Column(type="string", length=3000, nullable=true) */ private $description; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $photo; /** * @ORM\ManyToOne(targetEntity=Secteur::class, inversedBy="produits") * @ORM\JoinColumn(nullable=false) */ private $secteur; /** * @ORM\Column(type="integer") */ private $statut; /** * @ORM\ManyToOne(targetEntity="CategorieDD", inversedBy="products") * @ORM\JoinColumn(name="id_categorie", referencedColumnName="id") */ private $categorie; public function getId(): ?int { return $this->id; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): self { $this->nom = $nom; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } public function getPhoto(): ?string { return $this->photo; } public function setPhoto(?string $photo): self { $this->photo = $photo; return $this; } public function jsonSerialize() { $vars = get_object_vars($this); return $vars; } public function getSecteur(): ?Secteur { return $this->secteur; } public function setSecteur(?Secteur $secteur): self { $this->secteur = $secteur; return $this; } public function getStatut(): ?int { return $this->statut; } public function setStatut(int $statut): self { $this->statut = $statut; return $this; } /** * Get the value of categorie */ public function getCategorie(): ?CategorieDD { return $this->categorie; } /** * Set the value of categorie * * @return self */ public function setCategorie(CategorieDD $categorie) { $this->categorie = $categorie; return $this; } }