apps/backend/src/Entity/Brand.php line 13

  1. <?php
  2. namespace Backend\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Brand
  6.  *
  7.  */
  8. #[ORM\Table(name'brand')]
  9. #[ORM\Entity]
  10. class Brand
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      */
  16.     #[ORM\Column(name'id'type'integer'nullablefalse)]
  17.     #[ORM\Id]
  18.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  19.     private $id;
  20.     #[ORM\Column(name'name'type'string'length100nullablefalse)]
  21.     private string $name;
  22.     public function __toString(): string
  23.     {
  24.         return $this->name;
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getName(): ?string
  31.     {
  32.         return $this->name;
  33.     }
  34.     public function setName(string $name): self
  35.     {
  36.         $this->name $name;
  37.         return $this;
  38.     }
  39. }