Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié Reviewed-on: #52 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\ApiResource;
|
|
|
|
use ApiPlatform\Metadata\ApiProperty;
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\Post;
|
|
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
|
use App\State\Bovin\BovineSyncInventoryProcessor;
|
|
|
|
#[ApiResource(
|
|
operations: [
|
|
new Post(
|
|
uriTemplate: '/bovines/sync-inventory',
|
|
openapi: new OpenApiOperation(
|
|
summary: "Synchronise l'inventaire bovin local avec EDNOTIF.",
|
|
description: 'Upsert des bovins par numéro national ; marque comme sortis ceux absents de la réponse EDNOTIF.',
|
|
tags: ['Bovines'],
|
|
),
|
|
security: "is_granted('ROLE_BUREAU')",
|
|
input: false,
|
|
output: self::class,
|
|
processor: BovineSyncInventoryProcessor::class,
|
|
read: false,
|
|
),
|
|
]
|
|
)]
|
|
final class BovineSyncInventoryResult
|
|
{
|
|
#[ApiProperty(identifier: true)]
|
|
public string $id = 'current';
|
|
|
|
public int $created = 0;
|
|
|
|
public int $updated = 0;
|
|
|
|
public int $exited = 0;
|
|
|
|
public int $total = 0;
|
|
}
|