src/Entity/Abonnements.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AbonnementsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. #[ORM\Entity(repositoryClassAbonnementsRepository::class)]
  8. #[Vich\Uploadable]
  9. class Abonnements
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $title null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $description null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $subtitle null;
  21.     #[ORM\Column]
  22.     private ?int $price null;
  23.     #[ORM\Column(length255)]
  24.     private ?string $time null;
  25.     #[Vich\UploadableField(mapping'formules'fileNameProperty'imageName')]
  26.     private ?File $imageFile null;
  27.     #[ORM\Column(nullabletrue)]
  28.     private ?string $imageName null;
  29.     #[ORM\Column]
  30.     private ?bool $is_active null;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getTitle(): ?string
  36.     {
  37.         return $this->title;
  38.     }
  39.     public function setTitle(string $title): self
  40.     {
  41.         $this->title $title;
  42.         return $this;
  43.     }
  44.     public function getDescription(): ?string
  45.     {
  46.         return $this->description;
  47.     }
  48.     public function setDescription(string $description): self
  49.     {
  50.         $this->description $description;
  51.         return $this;
  52.     }
  53.     public function getSubtitle(): ?string
  54.     {
  55.         return $this->subtitle;
  56.     }
  57.     public function setSubtitle(string $subtitle): self
  58.     {
  59.         $this->subtitle $subtitle;
  60.         return $this;
  61.     }
  62.     public function getPrice(): ?int
  63.     {
  64.         return $this->price;
  65.     }
  66.     public function setPrice(int $price): self
  67.     {
  68.         $this->price $price;
  69.         return $this;
  70.     }
  71.     public function getTime(): ?string
  72.     {
  73.         return $this->time;
  74.     }
  75.     public function setTime(string $time): self
  76.     {
  77.         $this->time $time;
  78.         return $this;
  79.     }
  80.     public function setImageFile(?File $imageFile null): void
  81.     {
  82.         $this->imageFile $imageFile;
  83.         if (null !== $imageFile) {
  84.             // It is required that at least one field changes if you are using doctrine
  85.             // otherwise the event listeners won't be called and the file is lost
  86.             $this->updatedAt = new \DateTimeImmutable();
  87.         }
  88.     }
  89.     public function getImageFile(): ?File
  90.     {
  91.         return $this->imageFile;
  92.     }
  93.     public function setImageName(?string $imageName): void
  94.     {
  95.         $this->imageName $imageName;
  96.     }
  97.     public function getImageName(): ?string
  98.     {
  99.         return $this->imageName;
  100.     }
  101.     public function isIsActive(): ?bool
  102.     {
  103.         return $this->is_active;
  104.     }
  105.     public function setIsActive(bool $is_active): self
  106.     {
  107.         $this->is_active $is_active;
  108.         return $this;
  109.     }
  110. }