import { MultiLanguageString, Timestamp, Gender } from './common'; import { SchoolId } from './school'; import { ClientId } from './client'; import { ClassId } from './class'; import { FamilyId } from './family'; import { UserId } from './user'; import { Image, ImageV2 } from './fileManager'; import { Record as AttendanceRecord } from './attendance'; export declare type StudentId = string; export declare type StudentType = "baby" | "toddler" | "kindy" | "elementary" | "jhs" | "hs" | "college" | "uni" | "adult" | "other"; export declare type StudentGrade = "none" | "g1" | "g2" | "g3" | "g4" | "g5" | "g6" | "g7" | "g8" | "g9" | "g10" | "g11" | "g12" | "g13" | "g14" | "g15" | "g16"; export declare type EducationType = "none" | "hoikuen" | "youchien" | "preschool" | "elementary" | "jhs" | "hs" | "college" | "uni" | "adult" | "other"; export declare type HealthCategory = "hw" | "temp"; export declare type HealthType = "height" | "weight" | "temperature"; export declare type HealthBloodType = "none" | "O+" | "O-" | "A+" | "A-" | "B+" | "B-" | "AB+" | "AB-"; /** * DB: /schoolData/{sid}/students/{studentId} */ export interface Student { fid?: FamilyId; isUser: boolean; name: MultiLanguageString | string; photoUrl?: string; uid: StudentId | UserId; status: string; } /** * dbRef: studentData/{studentId} */ export interface StudentData { cid: ClientId; id: StudentId; fid: FamilyId; attendance: { [date: Timestamp]: { [id: string]: AttendanceRecord; }; }; health: { [Key in HealthCategory]: { [date: Timestamp]: object; }; }; homework: { [date: Timestamp]: { [id: string]: object; }; }; medical: StudentMedicalV2; profile: StudentProfile; } /** * dbRef: studentData/{studentId}/profile */ export interface StudentProfile { id: string; avatar: Image; name: MultiLanguageString | string; fName: MultiLanguageString | string; lName: MultiLanguageString | string; gender: Gender; birthday: Timestamp; educationType: EducationType; grade: StudentGrade; joinedAt: Timestamp; email: string; phoneMobile: string; isUser: boolean; } /** * @deprecated */ export declare enum StudentTypeV2 { BABY = "studentType.baby", TODDLER = "studentType.toddler", KINDY = "studentType.kindy", ELEMENTARY = "studentType.elementary", JHS = "studentType.jhs", HS = "studentType.hs", COLLEGE = "studentType.college", UNI = "studentType.uni", ADULT = "studentType.adult", OTHER = "studentType.other" } /** * dbRef: student/{studentId} * @deprecated */ export interface StudentV2 { cid: ClientId; id: StudentId; medical: StudentMedicalV2; metadata: StudentMetadataV2; profile: StudentProfileV2; } /** * dbRef: student/{studentId}/medical * @deprecated */ export interface StudentMedicalV2 { allergies: { [key: string]: boolean; }; bloodType: HealthBloodType; insuranceCardBackUrl: string; insuranceCardFrontUrl: string; insuranceCardNumber: string; medicalDoctorName: string; medicalHospitalName: string; medicalHospitalPhone: string; proneTo: { [key: string]: boolean; }; } /** * dbRef: student/{studentId}/metadata * @deprecated */ export interface StudentMetadataV2 { active: boolean; cid: ClientId; classes: { [classId: ClassId]: boolean; }; createdAt: Timestamp; createdBy: UserId; fid: FamilyId; family: FamilyId; guardians: { [userId: UserId]: boolean; }; id: StudentId; inviteCodes: { guardian: { code: string; expiresAt: Timestamp; qrCode: string; school: SchoolId; usedCount: number; userType: "guardian"; }; }; isUser: boolean; school: SchoolId; studentType: StudentType; } /** * dbRef: student/{studentId}/profile * @deprecated */ export interface StudentProfileV2 { avatar: ImageV2; firstNameFurigana: string; firstNameKanji: string; firstNameRomaji: string; lastNameFurigana: string; lastNameKanji: string; lastNameRomaji: string; nameFurigana: string; nameKanji: string; nameRomaji: string; primaryGuardianEmail: string; primaryStudentEmail: string; email: string; phoneMobile: string; studentId: string; id: string; name: MultiLanguageString; fName: MultiLanguageString; lName: MultiLanguageString; gender: "male" | "female"; birthday: Timestamp; educationType: EducationType; grade: StudentGrade; joinedAt: Timestamp; }