<?phpnamespace App\Entity\Product;use App\Repository\Product\BrandRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: BrandRepository::class)]class Brand{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $name = null; #[ORM\OneToMany(mappedBy: 'brand', targetEntity: Product::class)] private Collection $product; #[ORM\Column(length: 255, nullable: true)] private ?string $logo = null; #[ORM\Column(length: 255, nullable: true)] private ?string $description = null; #[ORM\Column(length: 255, nullable: true)] private ?string $website = null; public function __construct() { $this->product = new ArrayCollection(); } public function __toString() { return $this->name; } 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; } /** * @return Collection<int, Product> */ public function getProduct(): Collection { return $this->product; } public function addProduct(Product $product): self { if (!$this->product->contains($product)) { $this->product->add($product); $product->setBrand($this); } return $this; } public function removeProduct(Product $product): self { if ($this->product->removeElement($product)) { // set the owning side to null (unless already changed) if ($product->getBrand() === $this) { $product->setBrand(null); } } return $this; } public function getLogo(): ?string { return $this->logo; } public function setLogo(?string $logo): self { $this->logo = $logo; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } public function getWebsite(): ?string { return $this->website; } public function setWebsite(?string $website): self { $this->website = $website; return $this; }}