src/Entity/ProductBrand.php line 11
<?phpnamespace App\Entity;use App\Repository\ProductBrandRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ProductBrandRepository::class)]class ProductBrand{#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]private int $id;#[ORM\Column(type: 'string', length: 255)]private string $name;#[ORM\Column(type: 'string', length: 255)]private string $slug;#[ORM\OneToMany(targetEntity: Product::class, mappedBy: 'productBrand', orphanRemoval: true)]private Collection $product;#[ORM\Column]private ?bool $is_active = null;public function __construct(){$this->product = new ArrayCollection();}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;}/*** @return Collection|Product[]*/public function getProduct(): Collection{return $this->product;}public function addProduct(Product $product): self{if (!$this->product->contains($product)) {$this->product[] = $product;$product->setProductBrand($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->getProductBrand() === $this) {$product->setProductBrand(null);}}return $this;}public function isIsActive(): ?bool{return $this->is_active;}public function setIsActive(bool $is_active): static{$this->is_active = $is_active;return $this;}}