Files
Ferme/src/ApiResource/BovinIdentification.php

45 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
namespace App\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\State\BovinIdentificationProvider;
#[ApiResource(
operations: [
new Get(
uriTemplate: '/bovins/{numeroNational}/identification',
provider: BovinIdentificationProvider::class
),
]
)]
final class BovinIdentification
{
#[ApiProperty(identifier: true)]
public string $numeroNational;
public ?string $sex = null;
public ?string $breedType = null;
public ?string $workNumber = null;
public ?string $birthDate = null;
public ?string $birthDateCompletenessFlag = null;
public ?bool $isFilie = null;
public ?string $motherNationalNumber = null;
public ?string $motherBreedType = null;
public ?string $fatherNationalNumber = null;
public ?string $fatherBreedType = null;
public ?string $birthExploitationNumber = null;
/** @var list<PresencePeriod> */
public array $presencePeriods = [];
}