src/Entity/Service.php line 14
<?phpnamespace App\Entity;use App\Repository\ServiceRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;use Gedmo\Mapping\Annotation as Gedmo;#[ORM\Entity(repositoryClass: ServiceRepository::class)]#[Vich\Uploadable]class Service{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[Gedmo\Slug(fields: ['social_network'])]#[ORM\Column(length: 255,unique: true)]private ?string $slug = null;#[Gedmo\Slug(fields: ['category'])]#[ORM\Column(length: 255,unique: true)]private ?string $slug_category = null;#[Gedmo\Slug(fields: ['quality'])]#[ORM\Column(length: 255,unique: true)]private ?string $slug_quality= null;#[ORM\Column]private ?int $code = null;#[ORM\Column(length: 255)]private ?string $social_network = null;#[ORM\Column(length: 255)]private ?string $quality = null;#[ORM\Column]private ?float $price = null;#[ORM\Column(length: 10)]private ?string $currency = null;#[ORM\Column]private ?int $min = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $createdAt = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $updatedAt = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $deletedAt = null;// NOTE: This is not a mapped field of entity metadata, just a simple property.// #[Vich\UploadableField(mapping: 'service_image', fileNameProperty: 'image',originalName:'nomInitial')]// private ?File $imageFile = null;//// #[ORM\Column(length: 255,nullable: true)]// private ?string $image = null;//// #[ORM\Column(length: 255, nullable: true)]// private ?string $nomInitial = null;// NOTE: This is not a mapped field of entity metadata, just a simple property.// #[Vich\UploadableField(mapping: 'service_image_cat', fileNameProperty: 'imageCat',originalName:'nomInitialCat')]// private ?File $imageFileCat = null;//// #[ORM\Column(length: 255,nullable: true)]// private ?string $imageCat = null;//// #[ORM\Column(length: 255, nullable: true)]// private ?string $nomInitialCat = null;#[ORM\Column(nullable: true)]private ?bool $actif = null;#[ORM\Column(length: 255, nullable: true)]private ?string $category = null;#[ORM\Column(nullable: true)]private ?int $position = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $description = null;#[ORM\Column(length: 255, nullable: true)]private ?string $ServiceImage = null;#[ORM\Column(length: 255, nullable: true)]private ?string $CategoryImage = null;#[ORM\Column(length: 255, nullable: true)]private ?string $texte_url = null;public function __construct(){$this->createdAt = new \DateTimeImmutable('now');$this->actif = false;}public function getId(): ?int{return $this->id;}public function getCreatedAt(): ?\DateTimeInterface{return $this->createdAt;}public function setCreatedAt(\DateTimeInterface $createdAt): self{$this->createdAt = $createdAt;return $this;}public function getUpdatedAt(): ?\DateTimeInterface{return $this->updatedAt;}public function setUpdatedAt(?\DateTimeInterface $updatedAt): self{$this->updatedAt = $updatedAt;return $this;}// public function getImage(): ?string// {// return $this->image;// }//// public function setImage(?string $image): self// {// $this->image = $image;//// return $this;// }//// public function getImageCat(): ?string// {// return $this->imageCat;// }//// public function setImageCat(?string $imageCat): self// {// $this->imageCat = $imageCat;//// return $this;// }public function getDeletedAt(): ?\DateTimeInterface{return $this->deletedAt;}public function setDeletedAt(?\DateTimeInterface $deletedAt): self{$this->deletedAt = $deletedAt;return $this;}/*** If manually uploading a file (i.e. not using Symfony Form) ensure an instance* of 'UploadedFile' is injected into this setter to trigger the update. If this* bundle's configuration parameter 'inject_on_load' is set to 'true' this setter* must be able to accept an instance of 'File' as the bundle will inject one here* during Doctrine hydration.** @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $imageFile*/// public function setImageFile(?File $imageFile = null): void// {// $this->imageFile = $imageFile;//// if (null !== $imageFile) {// // It is required that at least one field changes if you are using doctrine// // otherwise the event listeners won't be called and the file is lost// $this->updatedAt = new \DateTimeImmutable();// }// }//// public function getImageFile(): ?File// {// return $this->imageFile;// }////// public function getNomInitial(): ?string// {// return $this->nomInitial;// }//// public function setNomInitial(?string $nomInitial): self// {// $this->nomInitial = $nomInitial;//// return $this;// }/*** If manually uploading a file (i.e. not using Symfony Form) ensure an instance* of 'UploadedFile' is injected into this setter to trigger the update. If this* bundle's configuration parameter 'inject_on_load' is set to 'true' this setter* must be able to accept an instance of 'File' as the bundle will inject one here* during Doctrine hydration.** @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $imageFileCat*/// public function setImageFileCat(?File $imageFileCat = null): void// {// $this->imageFileCat = $imageFileCat;//// if (null !== $imageFileCat) {// // It is required that at least one field changes if you are using doctrine// // otherwise the event listeners won't be called and the file is lost// $this->updatedAt = new \DateTimeImmutable();// }// }//// public function getImageFileCat(): ?File// {// return $this->imageFileCat;// }////// public function getNomInitialCat(): ?string// {// return $this->nomInitialCat;// }//// public function setNomInitialCat(?string $nomInitialCat): self// {// $this->nomInitialCat = $nomInitialCat;//// return $this;// }/*** @param int|null $id*/public function setId(?int $id): void{$this->id = $id;}public function getSlug(): ?string{return $this->slug;}public function getSlugCategory(): ?string{return $this->slug_category;}public function getSlugQuality(): ?string{return $this->slug_quality;}public function getSocialNetwork(): ?string{return $this->social_network;}public function setSocialNetwork(string $social_network): self{$this->social_network = $social_network;return $this;}public function getCode(): ?int{return $this->code;}public function setCode(int $code): self{$this->code = $code;return $this;}public function isActif(): ?bool{return $this->actif;}public function setActif(?bool $actif): self{$this->actif = $actif;return $this;}public function getQuality(): ?string{return $this->quality;}public function setQuality(string $quality): self{$this->quality = $quality;return $this;}public function getPrice(): ?float{return $this->price;}public function setPrice(float $price): self{$this->price = $price;return $this;}public function getCurrency(): ?string{return $this->currency;}public function setCurrency(string $currency): self{$this->currency = $currency;return $this;}public function getMin(): ?int{return $this->min;}public function setMin(int $min): self{$this->min = $min;return $this;}public function getCategory(): ?string{return $this->category;}public function setCategory(?string $category): self{$this->category = $category;return $this;}public function getPosition(): ?int{return $this->position;}public function setPosition(?int $position): self{$this->position = $position;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): self{$this->description = $description;return $this;}public function getServiceImage(): ?string{return $this->ServiceImage;}public function setServiceImage(?string $ServiceImage): static{$this->ServiceImage = $ServiceImage;return $this;}public function getCategoryImage(): ?string{return $this->CategoryImage;}public function setCategoryImage(?string $CategoryImage): static{$this->CategoryImage = $CategoryImage;return $this;}public function getTexteUrl(): ?string{return $this->texte_url;}public function setTexteUrl(?string $texte_url): static{$this->texte_url = $texte_url;return $this;}}