contructeur classes, type DTO dans TS, clean hard code

This commit is contained in:
trochas
2026-01-08 15:42:11 +01:00
parent 78b82fcfee
commit f2a0f8ca86
7 changed files with 207 additions and 97 deletions

View File

@@ -0,0 +1,50 @@
import { Groupe } from "./classes";
export type ActiviteDTO = {
id: number;
name: string;
theme: string;
duree: number;
dataActivite: string[];
sessionId: number;
}
export type AdminDTO = {
id: number;
id_keycloak: string;
name: string;
prenom: string;
}
export type AthleteDTO = {
id:number;
id_keycloak: string;
name: string;
prenom: string;
categorie: string;
niveau: string;
groupes: Groupe[];
sessionIds: number[];
};
export type CoachDTO = {
id: number;
id_keycloak: string;
name: string;
prenom: string;
sessionIds: number[];
};
export type SessionDTO = {
id: number;
name: string;
isRecurrent: boolean;
creneau: string; // LocalDateTime → ISO string
duree: number;
groupe: Groupe;
coachId: number;
athleteIds: number[];
activiteIds: number[];
};