feat: Permettre la création et modification de l'emploi du temps des classes
L'administration a besoin de construire et maintenir les emplois du temps hebdomadaires pour chaque classe, en s'assurant que les enseignants ne sont pas en conflit (même créneau, classes différentes) et que les affectations enseignant-matière-classe sont respectées. Cette implémentation couvre le CRUD complet des créneaux (ScheduleSlot), la détection de conflits (classe, enseignant, salle) avec possibilité de forcer, la validation des affectations côté serveur (AC2), l'intégration calendrier pour les jours bloqués, une vue mobile-first avec onglets jour par jour, et le drag-and-drop pour réorganiser les créneaux sur desktop.
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Scolarite\Domain\Repository;
|
||||
|
||||
use App\Administration\Domain\Model\SchoolClass\ClassId;
|
||||
use App\Administration\Domain\Model\User\UserId;
|
||||
use App\Scolarite\Domain\Exception\ScheduleSlotNotFoundException;
|
||||
use App\Scolarite\Domain\Model\Schedule\DayOfWeek;
|
||||
use App\Scolarite\Domain\Model\Schedule\ScheduleSlot;
|
||||
use App\Scolarite\Domain\Model\Schedule\ScheduleSlotId;
|
||||
use App\Shared\Domain\Tenant\TenantId;
|
||||
|
||||
interface ScheduleSlotRepository
|
||||
{
|
||||
public function save(ScheduleSlot $slot): void;
|
||||
|
||||
/** @throws ScheduleSlotNotFoundException */
|
||||
public function get(ScheduleSlotId $id, TenantId $tenantId): ScheduleSlot;
|
||||
|
||||
public function findById(ScheduleSlotId $id, TenantId $tenantId): ?ScheduleSlot;
|
||||
|
||||
public function delete(ScheduleSlotId $id, TenantId $tenantId): void;
|
||||
|
||||
/** @return array<ScheduleSlot> */
|
||||
public function findByClass(ClassId $classId, TenantId $tenantId): array;
|
||||
|
||||
/** @return array<ScheduleSlot> */
|
||||
public function findByTeacher(UserId $teacherId, TenantId $tenantId): array;
|
||||
|
||||
/** @return array<ScheduleSlot> */
|
||||
public function findOverlappingForClass(
|
||||
ClassId $classId,
|
||||
DayOfWeek $dayOfWeek,
|
||||
string $startTime,
|
||||
string $endTime,
|
||||
TenantId $tenantId,
|
||||
?ScheduleSlotId $excludeId = null,
|
||||
): array;
|
||||
|
||||
/** @return array<ScheduleSlot> */
|
||||
public function findOverlappingForTeacher(
|
||||
UserId $teacherId,
|
||||
DayOfWeek $dayOfWeek,
|
||||
string $startTime,
|
||||
string $endTime,
|
||||
TenantId $tenantId,
|
||||
?ScheduleSlotId $excludeId = null,
|
||||
): array;
|
||||
|
||||
/** @return array<ScheduleSlot> */
|
||||
public function findOverlappingForRoom(
|
||||
string $room,
|
||||
DayOfWeek $dayOfWeek,
|
||||
string $startTime,
|
||||
string $endTime,
|
||||
TenantId $tenantId,
|
||||
?ScheduleSlotId $excludeId = null,
|
||||
): array;
|
||||
}
|
||||
Reference in New Issue
Block a user