<?php
namespace App\Entity;
use App\Repository\ProductRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProductRepository::class)]
class Product
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id;
#[ORM\Column(length: 255)]
private ?string $name;
#[ORM\Column(length: 255)]
private ?string $slug = null;
#[ORM\Column(length: 255)]
private ?string $illustration = null;
#[ORM\Column(length: 255)]
private ?string $subtitle = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $description = null;
#[ORM\Column]
private ?float $price = null;
#[ORM\ManyToOne(inversedBy: 'products')]
#[ORM\JoinColumn(nullable: false)]
private ?Familly $category = null;
#[ORM\Column]
private ?bool $isBest = null;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getIllustration(): ?string
{
return $this->illustration;
}
public function setIllustration(string $illustration): self
{
$this->illustration = $illustration;
return $this;
}
public function getSubtitle(): ?string
{
return $this->subtitle;
}
public function setSubtitle(string $subtitle): self
{
$this->subtitle = $subtitle;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getPrice(): ?float
{
return $this->price;
}
public function setPrice(float $price): self
{
$this->price = $price;
return $this;
}
public function getCategory(): ?Familly
{
return $this->category;
}
public function setCategory(?Familly $category): self
{
$this->category = $category;
return $this;
}
public function getIsBest(): ?bool
{
return $this->isBest;
}
public function setIsBest(bool $isBest): self
{
$this->isBest = $isBest;
return $this;
}
}