/
AleksWork
/
diary_plants
Обзор
Документация
Войти
/
AleksWork
/
diary_plants
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Domain/Model/Offspring/UpdateOffspringModel.php
30 строк
1 KB
AlexeySerov
Add group Many to One relation in Offspring and Plant entities
05 фев 2026, 17:20
05 фев 2026, 17:20
ffb6a3c
Код
Авторство
О чём код?
<?php namespace App\Domain\Model\Offspring; use Symfony\Component\Validator\Constraints as Assert; use DateTimeImmutable; class UpdateOffspringModel { 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 $plantId, #[Assert\Type(type: ['null', DateTimeImmutable::class])] public readonly ?DateTimeImmutable $fruitingDate = null, #[Assert\Type(type: ['null', DateTimeImmutable::class])] public readonly ?DateTimeImmutable $floweringDate = null, #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public readonly ?int $mass = null, public readonly ?string $color = null, public readonly ?string $flavor = null, #[Assert\Type(type: 'integer', message: 'The value {{ value }} is not a valid integer.')] public readonly ?int $quantity = null, public readonly ?string $comment = null ) { } }