<?phpnamespace App\Entity;use App\Repository\ProductDetailRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ProductDetailRepository::class)]#[ORM\Table(name: 'product_details')]class ProductDetail{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\ManyToOne(inversedBy: 'details')] #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] private ?Product $product = null; #[ORM\Column(length: 255)] private ?string $label = null; // Ex: "Matériau", "Garantie", "Dimensions", etc. #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $value = null; // La valeur du détail #[ORM\Column] private ?int $sortOrder = 0; #[ORM\Column] private ?bool $isActive = true; #[ORM\Column] private ?\DateTimeImmutable $createdAt = null; #[ORM\Column] private ?\DateTimeImmutable $updatedAt = null; public function __construct() { $this->createdAt = new \DateTimeImmutable(); $this->updatedAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getProduct(): ?Product { return $this->product; } public function setProduct(?Product $product): static { $this->product = $product; return $this; } public function getLabel(): ?string { return $this->label; } public function setLabel(string $label): static { $this->label = $label; return $this; } public function getValue(): ?string { return $this->value; } public function setValue(?string $value): static { $this->value = $value; return $this; } public function getSortOrder(): ?int { return $this->sortOrder; } public function setSortOrder(int $sortOrder): static { $this->sortOrder = $sortOrder; return $this; } public function isIsActive(): ?bool { return $this->isActive; } public function setIsActive(bool $isActive): static { $this->isActive = $isActive; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): static { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } public function setUpdatedAt(\DateTimeImmutable $updatedAt): static { $this->updatedAt = $updatedAt; return $this; }}