import { MultiLanguageString } from './common'; import {StudentId} from './student'; import {UserId} from './user'; import {ClientId} from './client'; import {AcademicYearId, RoomId} from './school'; export type ClassId = string; export type LessonId = string; /* export enum ClassType { NONE = "none", HOIKUEN = "hoikuen", YOUCHIEN = "youchien", PRESCHOOL = "preschool", BABY = "baby", TODDLER = "toddler", KINDY = "kindy", ELEMENTARY = "elementary", JHS = "jhs", HS = "hs", COLLEGE = "college", UNI = "uni", ADULT = "adult", OTHER = "other", } */ export type ClassType = "none" | "hoikuen" | "youchien" | "preschool" | "baby" | "toddler" | "kindy" | "elementary" | "jhs" | "hs" | "college" | "uni" | "adult" | "other"; /** * dbRef: class/{sid}/list/{classId} */ export interface Class { id: ClassId; color?: string; initials: string; name: MultiLanguageString | string; type: ClassType; // roomId?: RoomId; // status?: string; //? } // export type Class = Omit; /** * dbRef: class/{sid}/metadata/{classId} */ export interface ClassMetadata { id: ClassId; cid: ClientId; active: boolean; students: { [studentId: StudentId]: boolean }; teachers: { [teacherId: UserId]: boolean }; lessons: { [lessonId: LessonId]: boolean }; roomId: RoomId; yid: AcademicYearId; } /** * dbRef: class/{sid}/settings/{classId} */ export interface ClassSettings { allowMakeup: boolean; allowCancel: boolean; sMax: number; // maxStudents tMax: number; // maxTeachers sMin: number; // minStudents tMin: number; // minTeachers eTime: string; // endTime sTime: string; // startTime } /** * dbRef: class/{sid}/{classId}/profile * @deprecated */ export interface ClassProfileV2 { // id: ClassId, name: MultiLanguageString; // V3 classYear: { academicYear: string; title: string; }; color?: string; imageUrl: string; // V2 initials: string; maxTeachers: number; // V2 minStudents: number; // V2 minTeachers: number; // V2 nameFurigana: string; // V2 nameRomaji: string; // V2 notes: string; room: string; // V2 timeEnd: string; timeStart: string; } /** * dbRef: class/{sid}/{classId}/metadata * @deprecated */ export interface ClassMetadataV2 { active: boolean; cid: ClientId; id: ClassId; lessons: { [lessonId: LessonId]: boolean }; students: { [studentId: StudentId]: boolean }; teachers: { [teacherId: UserId]: boolean }; totalStudents: number; totalTeachers: number; }