/
AleksWork
/
diary_plants
Обзор
Документация
Войти
/
AleksWork
/
diary_plants
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Domain/Model/Fertilizer/CreateFertilizerModel.php
31 строка
1 KB
AlexeySerov
Make change fields in PreparationVolume VO
12 мар 2026, 17:24
12 мар 2026, 17:24
0ae1f53
Код
Авторство
О чём код?
<?php namespace App\Domain\Model\Fertilizer; use Symfony\Component\Validator\Constraints as Assert; class CreateFertilizerModel { public function __construct( #[Assert\NotBlank] #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public readonly int $groupId, #[Assert\NotBlank] #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public readonly int $markerId, #[Assert\NotBlank] #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly string $title, #[Assert\NotBlank] #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public readonly int $amount, #[Assert\NotBlank] #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly string $manufacturer, #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly ?string $applicationRate = null, public readonly ?string $description = null, public readonly ?string $comment = null, ) { } }