<?phpdeclare(strict_types=1);namespace App\Supplier\Doctrine\Entity;use App\Shop\Doctrine\Entity\Brand as BaseBrand;use App\Shop\Doctrine\Entity\Product;use App\Supplier\Doctrine\Repository\BrandRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping\Column;use Doctrine\ORM\Mapping\Entity;use Doctrine\ORM\Mapping\GeneratedValue;use Doctrine\ORM\Mapping\Id;use Doctrine\ORM\Mapping\Index;use Doctrine\ORM\Mapping\JoinColumn;use Doctrine\ORM\Mapping\ManyToOne;use Doctrine\ORM\Mapping\OneToMany;use Doctrine\ORM\Mapping\Table;#[Entity(repositoryClass: BrandRepository::class)]#[Table(name: 'supplier_brand')]#[Index(columns: ['name', 'supplier_id'], name: 'name_supplier_id')]class Brand{ #[Id] #[Column(type: 'integer')] #[GeneratedValue] private ?int $id = null; #[Column] private string $name; #[ManyToOne(targetEntity: Supplier::class)] #[JoinColumn(nullable: false)] private Supplier $supplier; #[ManyToOne(targetEntity: BaseBrand::class)] private ?BaseBrand $brand = null; private ?string $baseName = null; /** * @var Collection<array-key, Product> */ #[OneToMany(mappedBy: 'supplierBrand', targetEntity: Product::class)] private Collection $products; public function __construct() { $this->products = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): string { return $this->name; } public function setName(string $name): void { $this->name = $name; } public function getSupplier(): Supplier { return $this->supplier; } public function setSupplier(Supplier $supplier): void { $this->supplier = $supplier; } public function getBrand(): ?BaseBrand { return $this->brand; } public function setBrand(?BaseBrand $brand): void { $this->brand = $brand; } /** * @return Collection<array-key, Product> */ public function getProducts(): Collection { return $this->products; } public function getBaseName(): ?string { return $this->baseName; } public function setBaseName(?string $baseName): void { $this->baseName = $baseName; }}