feat: generate draft assignments from a staffing matrix

This commit is contained in:
fromme committed 2026-10-15 18:11:51 +02:00
1 parent 3116d23199
commit 2fc9806c69
41 files changed
+2618

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Model;
use App\Enum\StaffingFee;
use App\Enum\StaffingRole;
/**
* One assignment App\Service\Assignment\AssignmentPlanner would create, before its role and
* fees are resolved to entities.
*/
final readonly class PlannedAssignment
{
/**
* @param list<StaffingFee> $fees
*/
public function __construct(
public StaffingRole $role,
public int $places,
/** busProId of the pre-selected boarding point ("Busbegleitung ab"), null for none */
public ?int $pickup = null,
public array $fees = [],
) {
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Model;
use App\Entity\Destination;
use App\Entity\StaffingRule;
/**
* A travel date the staffing matrix applies to, with what would be created for it.
*/
final readonly class StaffingCandidate
{
/**
* @param list<PlannedAssignment> $planned
*/
public function __construct(
public Destination $destination,
public StaffingRule $rule,
public array $planned,
/** It has had an assignment before, so it is never generated again. */
public bool $skipped,
) {
}
}