/
AleksWork
/
diary_plants
Обзор
Документация
Войти
/
AleksWork
/
diary_plants
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Domain/Model/Attachment/CreateAttachmentModel.php
49 строк
2 KB
AlexeySerov
Add isShown flag setter to image patch manager
30 янв 2026, 10:17
30 янв 2026, 10:17
3ac7281
Код
Авторство
О чём код?
<?php namespace App\Domain\Model\Attachment; use Symfony\Component\Validator\Constraints as Assert; use DateTimeImmutable; class CreateAttachmentModel { public function __construct( #[Assert\NotBlank] #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public readonly int $groupId, #[Assert\Type(type: 'bool', message: 'The value {{ value }} is not a valid boolean.')] public readonly bool $isShown, #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly ?string $filename = null, #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly ?string $path = null, #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly ?string $mimeType = null, #[Assert\NotBlank] #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly string $alt, #[Assert\NotBlank] #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly string $title, #[Assert\NotBlank] public readonly DateTimeImmutable $fileDate, #[Assert\NotBlank] #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public readonly int $attachableId, #[Assert\NotBlank] #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly string $attachableType, public readonly ?string $description = null, ) { } }