feat: inventaire bovins (!49)
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
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: #49 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #49.
This commit is contained in:
42
src/ApiResource/BovineSyncInventoryResult.php
Normal file
42
src/ApiResource/BovineSyncInventoryResult.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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_ADMIN')",
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user