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

  1. <?php
  2. namespace Backend\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'vehicle_direction')]
  5. #[ORM\Entity]
  6. class VehicleDirection
  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.     public function __toString(): string
  15.     {
  16.         return $this->name;
  17.     }
  18.     /**
  19.      * @return int
  20.      */
  21.     public function getId(): int
  22.     {
  23.         return $this->id;
  24.     }
  25.     /**
  26.      * @return string
  27.      */
  28.     public function getName(): string
  29.     {
  30.         return $this->name;
  31.     }
  32.     /**
  33.      * @param string $name
  34.      */
  35.     public function setName(string $name): void
  36.     {
  37.         $this->name $name;
  38.     }
  39. }