/
AleksWork
/
diary_plants
Обзор
Документация
Войти
/
AleksWork
/
diary_plants
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Domain/Model/Usage/UpdateUsageModel.php
36 строк
948 B
AlekseySerov
Make fix som bugs in method Usage() of CsvService layer
22 мар 2026, 18:49
22 мар 2026, 18:49
b83aea8
Код
Авторство
О чём код?
<?php namespace App\Domain\Model\Usage; use Symfony\Component\Validator\Constraints as Assert; use DateTimeImmutable; class UpdateUsageModel { 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:3, max:50)] public string $usableType, #[Assert\Length(min:2)] #[Assert\Length(max:1024)] public ?string $comment = null ) { } }