collection-crud/src/Entity/BrandCategory.php

32 lines
553 B
PHP

<?php declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'brand_category', schema: 'collection')]
#[ORM\Entity]
class BrandCategory {
#[ORM\Id]
#[ORM\Column(name: 'category_name')]
#[ORM\OrderBy(['name' => 'asc'])]
private string $name;
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function __toString(): string
{
return $this->name;
}
}