feat: Permettre la définition d'une semaine type récurrente pour l'emploi du temps
Les administrateurs devaient recréer manuellement l'emploi du temps chaque semaine. Cette implémentation introduit un système de récurrence hebdomadaire avec gestion des exceptions par occurrence, permettant de modifier ou annuler un cours spécifique sans affecter les autres semaines. Le ScheduleResolver calcule dynamiquement l'EDT réel en combinant les créneaux récurrents, les exceptions ponctuelles et le calendrier scolaire (vacances/fériés).
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Scolarite\Domain\Repository;
|
||||
|
||||
use App\Scolarite\Domain\Model\Schedule\ScheduleException;
|
||||
use App\Scolarite\Domain\Model\Schedule\ScheduleExceptionId;
|
||||
use App\Scolarite\Domain\Model\Schedule\ScheduleSlotId;
|
||||
use App\Shared\Domain\Tenant\TenantId;
|
||||
use DateTimeImmutable;
|
||||
|
||||
interface ScheduleExceptionRepository
|
||||
{
|
||||
public function save(ScheduleException $exception): void;
|
||||
|
||||
public function findById(ScheduleExceptionId $id, TenantId $tenantId): ?ScheduleException;
|
||||
|
||||
public function findForSlotAndDate(
|
||||
ScheduleSlotId $slotId,
|
||||
DateTimeImmutable $date,
|
||||
TenantId $tenantId,
|
||||
): ?ScheduleException;
|
||||
|
||||
/**
|
||||
* @return array<ScheduleException>
|
||||
*/
|
||||
public function findForSlotBetweenDates(
|
||||
ScheduleSlotId $slotId,
|
||||
DateTimeImmutable $startDate,
|
||||
DateTimeImmutable $endDate,
|
||||
TenantId $tenantId,
|
||||
): array;
|
||||
|
||||
/**
|
||||
* @return array<ScheduleException>
|
||||
*/
|
||||
public function findForDateRange(
|
||||
TenantId $tenantId,
|
||||
DateTimeImmutable $startDate,
|
||||
DateTimeImmutable $endDate,
|
||||
): array;
|
||||
|
||||
public function delete(ScheduleExceptionId $id, TenantId $tenantId): void;
|
||||
}
|
||||
@@ -26,6 +26,9 @@ interface ScheduleSlotRepository
|
||||
/** @return array<ScheduleSlot> */
|
||||
public function findByClass(ClassId $classId, TenantId $tenantId): array;
|
||||
|
||||
/** @return array<ScheduleSlot> */
|
||||
public function findRecurringByClass(ClassId $classId, TenantId $tenantId): array;
|
||||
|
||||
/** @return array<ScheduleSlot> */
|
||||
public function findByTeacher(UserId $teacherId, TenantId $tenantId): array;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user