apps/backend/src/Entity/VehicleGallery.php line 10

  1. <?php
  2. namespace Backend\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name: 'vehicle_gallery')]
  5. #[ORM\Index(columns: ['vehicle_id'], name: 'fk_vehicle_gallery_vehicle1_idx')]
  6. #[ORM\Entity]
  7. class VehicleGallery
  8. {
  9.     #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue(strategy: 'IDENTITY')]
  12.     private int $id;
  13.     /**
  14.      * @var string
  15.      *
  16.      */
  17.     #[ORM\Column(name: 'imagename', type: 'string', length: 250, nullable: false)]
  18.     private string $imagename;
  19.     #[ORM\JoinColumn(name: 'vehicle_id', referencedColumnName: 'id')]
  20.     #[ORM\ManyToOne(targetEntity: 'Vehicle')]
  21.     private Vehicle $vehicle;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getImagename(): ?string
  27.     {
  28.         return $this->imagename;
  29.     }
  30.     public function setImagename(string $imagename): self
  31.     {
  32.         $this->imagename = $imagename;
  33.         return $this;
  34.     }
  35.     public function getVehicle(): ?Vehicle
  36.     {
  37.         return $this->vehicle;
  38.     }
  39.     public function setVehicle(?Vehicle $vehicle): self
  40.     {
  41.         $this->vehicle = $vehicle;
  42.         return $this;
  43.     }
  44. }