108 lines
2.2 KiB
TypeScript
108 lines
2.2 KiB
TypeScript
// Types et données de test pour l'API PolyMPR
|
|
|
|
export interface Student {
|
|
numEtud: number;
|
|
nom: string;
|
|
prenom: string;
|
|
idPromo: number;
|
|
}
|
|
|
|
export interface Promotion {
|
|
idPromo: number;
|
|
annee: string;
|
|
}
|
|
|
|
export interface Prof {
|
|
id: number;
|
|
nom: string;
|
|
prenom: string;
|
|
}
|
|
|
|
export interface Module {
|
|
id: number;
|
|
nom: string;
|
|
}
|
|
|
|
export interface Note {
|
|
note: number;
|
|
numEtud: number;
|
|
idModule: number;
|
|
}
|
|
|
|
export interface UE {
|
|
id: number;
|
|
nom: string;
|
|
}
|
|
|
|
export interface UeModule {
|
|
idModule: number;
|
|
idUE: number;
|
|
idPromo: number;
|
|
coeff: number;
|
|
}
|
|
|
|
export interface Enseignement {
|
|
idProf: number;
|
|
idModule: number;
|
|
idPromo: number;
|
|
}
|
|
|
|
export interface Ajustement {
|
|
numEtud: number;
|
|
idUE: number;
|
|
valeur: number;
|
|
}
|
|
|
|
// --- Fixtures ---
|
|
|
|
export const students: Student[] = [
|
|
{ numEtud: 1, nom: "Dupont", prenom: "Alice", idPromo: 1 },
|
|
{ numEtud: 2, nom: "Martin", prenom: "Bob", idPromo: 1 },
|
|
{ numEtud: 3, nom: "Durand", prenom: "Claire", idPromo: 2 },
|
|
];
|
|
|
|
export const promotions: Promotion[] = [
|
|
{ idPromo: 1, annee: "2025-2026" },
|
|
{ idPromo: 2, annee: "2024-2025" },
|
|
];
|
|
|
|
export const profs: Prof[] = [
|
|
{ id: 1, nom: "Leclerc", prenom: "Jean" },
|
|
{ id: 2, nom: "Moreau", prenom: "Sophie" },
|
|
];
|
|
|
|
export const modules: Module[] = [
|
|
{ id: 1, nom: "Mathématiques" },
|
|
{ id: 2, nom: "Informatique" },
|
|
{ id: 3, nom: "Physique" },
|
|
];
|
|
|
|
export const notes: Note[] = [
|
|
{ note: 15, numEtud: 1, idModule: 1 },
|
|
{ note: 12, numEtud: 1, idModule: 2 },
|
|
{ note: 18, numEtud: 2, idModule: 1 },
|
|
{ note: 9, numEtud: 3, idModule: 3 },
|
|
];
|
|
|
|
export const ues: UE[] = [
|
|
{ id: 1, nom: "Sciences fondamentales" },
|
|
{ id: 2, nom: "Sciences appliquées" },
|
|
];
|
|
|
|
export const ueModules: UeModule[] = [
|
|
{ idModule: 1, idUE: 1, idPromo: 1, coeff: 3 },
|
|
{ idModule: 2, idUE: 2, idPromo: 1, coeff: 4 },
|
|
{ idModule: 3, idUE: 1, idPromo: 2, coeff: 2 },
|
|
];
|
|
|
|
export const enseignements: Enseignement[] = [
|
|
{ idProf: 1, idModule: 1, idPromo: 1 },
|
|
{ idProf: 2, idModule: 2, idPromo: 1 },
|
|
{ idProf: 1, idModule: 3, idPromo: 2 },
|
|
];
|
|
|
|
export const ajustements: Ajustement[] = [
|
|
{ numEtud: 1, idUE: 1, valeur: 0.5 },
|
|
{ numEtud: 3, idUE: 1, valeur: -1 },
|
|
];
|