src/Entity/Embarcation.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EmbarcationRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\HttpFoundation\File\File;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. #[ORM\Entity(repositoryClassEmbarcationRepository::class)]
  9. #[Vich\Uploadable]
  10. class Embarcation
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $name null;
  18.     #[Vich\UploadableField(mapping'embarcations'fileNameProperty'imageName')]
  19.     private ?File $imageFile null;
  20.     #[ORM\Column(nullabletrue)]
  21.     private ?string $imageName null;
  22.     #[ORM\Column]
  23.     private ?int $people null;
  24.     #[ORM\Column]
  25.     private ?int $motor null;
  26.     #[ORM\Column(length255)]
  27.     private ?string $link null;
  28.     #[ORM\Column]
  29.     private ?float $width null;
  30.     #[ORM\Column]
  31.     private ?float $height null;
  32.     #[ORM\Column(nullabletrue)]
  33.     private ?bool $permis null;
  34.     #[ORM\Column]
  35.     private ?bool $is_active null;
  36.     #[ORM\Column(typeTypes::TEXT)]
  37.     private ?string $description null;
  38.     #[ORM\Column(length255nullabletrue)]
  39.     private ?string $comment null;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getName(): ?string
  45.     {
  46.         return $this->name;
  47.     }
  48.     public function setName(string $name): self
  49.     {
  50.         $this->name $name;
  51.         return $this;
  52.     }
  53.     public function setImageFile(?File $imageFile null): void
  54.     {
  55.         $this->imageFile $imageFile;
  56.         if (null !== $imageFile) {
  57.             // It is required that at least one field changes if you are using doctrine
  58.             // otherwise the event listeners won't be called and the file is lost
  59.             $this->updatedAt = new \DateTimeImmutable();
  60.         }
  61.     }
  62.     public function getImageFile(): ?File
  63.     {
  64.         return $this->imageFile;
  65.     }
  66.     public function setImageName(?string $imageName): void
  67.     {
  68.         $this->imageName $imageName;
  69.     }
  70.     public function getImageName(): ?string
  71.     {
  72.         return $this->imageName;
  73.     }
  74.     public function getPeople(): ?int
  75.     {
  76.         return $this->people;
  77.     }
  78.     public function setPeople(int $people): self
  79.     {
  80.         $this->people $people;
  81.         return $this;
  82.     }
  83.     public function getMotor(): ?int
  84.     {
  85.         return $this->motor;
  86.     }
  87.     public function setMotor(int $motor): self
  88.     {
  89.         $this->motor $motor;
  90.         return $this;
  91.     }
  92.    
  93.     public function getLink(): ?string
  94.     {
  95.         return $this->link;
  96.     }
  97.     public function setLink(string $link): self
  98.     {
  99.         $this->link $link;
  100.         return $this;
  101.     }
  102.     public function getWidth(): ?float
  103.     {
  104.         return $this->width;
  105.     }
  106.     public function setWidth(float $width): self
  107.     {
  108.         $this->width $width;
  109.         return $this;
  110.     }
  111.     public function getHeight(): ?float
  112.     {
  113.         return $this->height;
  114.     }
  115.     public function setHeight(float $height): self
  116.     {
  117.         $this->height $height;
  118.         return $this;
  119.     }
  120.     public function isPermis(): ?bool
  121.     {
  122.         return $this->permis;
  123.     }
  124.     public function setPermis(?bool $permis): self
  125.     {
  126.         $this->permis $permis;
  127.         return $this;
  128.     }
  129.     public function isIsActive(): ?bool
  130.     {
  131.         return $this->is_active;
  132.     }
  133.     public function setIsActive(bool $is_active): self
  134.     {
  135.         $this->is_active $is_active;
  136.         return $this;
  137.     }
  138.     public function getDescription(): ?string
  139.     {
  140.         return $this->description;
  141.     }
  142.     public function setDescription(string $description): self
  143.     {
  144.         $this->description $description;
  145.         return $this;
  146.     }
  147.     public function getComment(): ?string
  148.     {
  149.         return $this->comment;
  150.     }
  151.     public function setComment(?string $comment): self
  152.     {
  153.         $this->comment $comment;
  154.         return $this;
  155.     }
  156. }