/
AleksWork
/
diary_plants
Обзор
Документация
Войти
/
AleksWork
/
diary_plants
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Controller/Web/Dashboard/Usage/EditUsage/Input/EditUsageDTO.php
36 строк
972 B
AlekseySerov
Add vote to Usage managers
11 май 2026, 01:23
11 май 2026, 01:23
e838324
Код
Авторство
О чём код?
<?php namespace App\Controller\Web\Dashboard\Usage\EditUsage\Input; use DateTimeImmutable; use Symfony\Component\Validator\Constraints as Assert; class EditUsageDTO { public function __construct( #[Assert\NotBlank] #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public int $groupId, #[Assert\NotBlank] #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public int $plantId, #[Assert\NotBlank] #[Assert\Type(type: ['null', DateTimeImmutable::class])] public DateTimeImmutable $useDate, #[Assert\NotBlank] #[Assert\Type(type: 'integer')] public int $usableId, #[Assert\NotBlank] #[Assert\Length(min:4, max:50)] public string $usableType, #[Assert\Length(min:2)] #[Assert\Length(max:1024)] public ?string $comment = null ) { } }