src/Entity/Garages/GarageFacility.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Garages;
  3. use App\Annotation\SiteAware;
  4. use App\Entity\AbstractBase;
  5. use App\Entity\Interfaces\ImageInterface;
  6. use App\Entity\Interfaces\PublishedInterface;
  7. use App\Entity\Interfaces\SiteInterface;
  8. use App\Entity\MiniAbstractBase;
  9. use App\Entity\Traits\HasImageTrait;
  10. use App\Entity\Traits\NameTrait;
  11. use App\Entity\Traits\PublishedTrait;
  12. use App\Entity\Traits\SiteTrait;
  13. use App\Repository\Garages\GarageFacilityRepository;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use Gedmo\Mapping\Annotation as Gedmo;
  16. use Symfony\Component\HttpFoundation\File\File;
  17. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  18. /**
  19.  * @ORM\Table(name="vulco_garage_facility", indexes={@ORM\Index(name="garage_facility_site_idx", columns={"site"})})
  20.  * @ORM\Entity(repositoryClass=GarageFacilityRepository::class)
  21.  * @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
  22.  * @SiteAware(siteFieldName="site")
  23.  * @Vich\Uploadable
  24.  */
  25. class GarageFacility extends AbstractBase implements SiteInterfacePublishedInterfaceImageInterface
  26. {
  27.     use HasImageTrait;
  28.     use NameTrait;
  29.     use PublishedTrait;
  30.     use SiteTrait;
  31.     /**
  32.      * @Vich\UploadableField(mapping="garage_facility_image", fileNameProperty="imageName")
  33.      */
  34.     private ?File $image null;
  35.     /**
  36.      * @ORM\Column(type="string", length=200, nullable=false)
  37.      */
  38.     private string $name;
  39.     /**
  40.      * @ORM\Column(type="string", length=200, nullable=true)
  41.      * TODO: Ya no se utiliza
  42.      */
  43.     private ?string $nameCa null;
  44.     /**
  45.      * @ORM\Column(type="integer", name="ordenation", options={"default": 0})
  46.      */
  47.     private int $order 0;
  48.     public function __construct()
  49.     {
  50.     }
  51.     public function getNameCa(): ?string
  52.     {
  53.         return $this->nameCa;
  54.     }
  55.     public function setNameCa(?string $nameCa): self
  56.     {
  57.         $this->nameCa $nameCa;
  58.         return $this;
  59.     }
  60.     public function getOrder(): int
  61.     {
  62.         return $this->order;
  63.     }
  64.     public function setOrder(int $order): self
  65.     {
  66.         $this->order $order;
  67.         return $this;
  68.     }
  69.     public function __toString(): string
  70.     {
  71.         return $this->id $this->getName() : MiniAbstractBase::DEFAULT_EMPTY_STRING;
  72.     }
  73. }