apps/backend/src/Entity/VehicleCategory.php line 9

  1. <?php
  2. namespace Backend\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'vehicle_category')]
  5. #[ORM\Entity]
  6. class VehicleCategory
  7. {
  8.     #[ORM\Column(name'id'type'integer'nullablefalse)]
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  11.     private int $id;
  12.     #[ORM\Column(name'name'type'string'length100nullablefalse)]
  13.     private string $name;
  14.     #[ORM\Column(name'description'type'string'length150nullablefalse)]
  15.     private string $description;
  16.     #[ORM\Column(name'icon'type'string'length100nullablefalse)]
  17.     private string $icon;
  18.     public function __toString(): string
  19.     {
  20.         return $this->name;
  21.     }
  22.     /**
  23.      * @return int
  24.      */
  25.     public function getId(): int
  26.     {
  27.         return $this->id;
  28.     }
  29.     /**
  30.      * @return string
  31.      */
  32.     public function getName(): string
  33.     {
  34.         return $this->name;
  35.     }
  36.     /**
  37.      * @param string $name
  38.      */
  39.     public function setName(string $name): void
  40.     {
  41.         $this->name $name;
  42.     }
  43.     /**
  44.      * @return string
  45.      */
  46.     public function getDescription(): string
  47.     {
  48.         return $this->description;
  49.     }
  50.     /**
  51.      * @param string $description
  52.      */
  53.     public function setDescription(string $description): void
  54.     {
  55.         $this->description $description;
  56.     }
  57.     /**
  58.      * @return string
  59.      */
  60.     public function getIcon(): string
  61.     {
  62.         return $this->icon;
  63.     }
  64.     /**
  65.      * @param string $icon
  66.      */
  67.     public function setIcon(string $icon): void
  68.     {
  69.         $this->icon $icon;
  70.     }
  71. }