src/Entity/User/AdminAvatar.php line 26

  1. <?php
  2. /*
  3.  * This file is part of the Pellipop project.
  4.  *
  5.  * (c) Mobizel
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace App\Entity\User;
  12. use App\Entity\Media\File;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Monofony\Contracts\Core\Model\User\AdminAvatarInterface;
  15. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  16. /**
  17.  * @Vich\Uploadable
  18.  */
  19. #[ORM\Entity]
  20. #[ORM\Table(name'app_admin_avatar')]
  21. class AdminAvatar extends File implements AdminAvatarInterface
  22. {
  23.     /**
  24.      * @Vich\UploadableField(mapping="admin_avatar", fileNameProperty="path")
  25.      */
  26.     #[\Symfony\Component\Validator\Constraints\File(maxSize'6000000'mimeTypes: ['image/*'])]
  27.     protected ?\SplFileInfo $file null;
  28. }