Files
SIRH/src/ApiResource/WorkHourBulkUpsert.php
tristan 339d650b41
All checks were successful
Auto Tag Develop / tag (push) Successful in 8s
feat : ajout de la gestion des heures chauffeurs
2026-03-15 19:04:52 +01:00

45 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace App\ApiResource;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Post;
use App\State\WorkHourBulkUpsertProcessor;
#[ApiResource(
operations: [
new Post(
uriTemplate: '/work-hours/bulk-upsert',
security: "is_granted('ROLE_USER')",
output: WorkHourBulkUpsertResult::class,
processor: WorkHourBulkUpsertProcessor::class
),
]
)]
final class WorkHourBulkUpsert
{
public string $workDate = '';
/**
* @var list<array{
* employeeId:int,
* morningFrom?:?string,
* morningTo?:?string,
* afternoonFrom?:?string,
* afternoonTo?:?string,
* eveningFrom?:?string,
* eveningTo?:?string,
* isPresentMorning?:bool,
* isPresentAfternoon?:bool,
* dayHoursMinutes?:?int,
* nightHoursMinutes?:?int,
* hasBreakfast?:bool,
* hasLunch?:bool,
* hasOvernight?:bool
* }>
*/
public array $entries = [];
}