/
AleksWork
/
diary_plants
Обзор
Документация
Войти
/
AleksWork
/
diary_plants
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Domain/Model/Watering/CreateWateringModel.php
32 строки
1 KB
AlekseySerov
Fix some bug in csv files and logic in service layer
07 апр 2026, 23:02
07 апр 2026, 23:02
72474b0
Код
Авторство
О чём код?
<?php namespace App\Domain\Model\Watering; use Symfony\Component\Validator\Constraints as Assert; class CreateWateringModel { 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: '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 $waterType, #[Assert\NotBlank] #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly string $wateringMethod, #[Assert\NotBlank] #[Assert\Type(type: 'string', message: 'The value {{ value }} is not a valid string.')] public readonly string $temperature, public readonly ?string $description = null, public readonly ?string $comment = null, ) { } }