@@ -338,30 +338,30 @@ const timetableSchema = z.object({
338338 ) ,
339339 subjects : z . record (
340340 z . object ( {
341- title : "8 Maths 1" , // title of the class
342- shortTitle : "Ma1" , // corresponds to period.title
343- subject : "Mathematics" , // full name of the subject
344- teacher : "DW" , // teacher code for the class teacher
345- fullTeacher : "Mr R Dow" , // full name of the teacher
346- year : "8" , // year for the class (Note [1])
341+ title : z . string ( ) , // title of the class
342+ shortTitle : z . string ( ) , // corresponds to period.title
343+ subject : z . string ( ) , // full name of the subject
344+ teacher : z . string ( ) , // teacher code for the class teacher
345+ fullTeacher : z . string ( ) , // full name of the teacher
346+ year : z . coerce . string ( ) , // year for the class (Note [1])
347347 } )
348348 ) ,
349- extraSubjects : {
350- // collection of extra subjects
351- "1" : {
349+ extraSubjects : z . record (
350+ z . object ( {
352351 // these subjects have no timetable classes
353- title : "Student Advis" , // title of the class
354- shortTitle : "SA7" , // corresponds to period.title
355- teacher : "DW" , // teacher code for the class teacher
356- fullTeacher : "Mr R Dow" , // full name of the teacher
357- } ,
358- } ,
359- rollcall : {
352+ title : z . string ( ) , // title of the class
353+ shortTitle : z . string ( ) , // corresponds to period.title
354+ teacher : z . string ( ) , // teacher code for the class teacher
355+ fullTeacher : z . string ( ) , // full name of the teacher
356+ } )
357+ ) ,
358+
359+ rollcall : z . object ( {
360360 // roll class details
361- title : "08M" , // title of the class
362- teacher : "DW" , // teacher code for the teacher
363- fullTeacher : "Mr R Dow" , // full name of the teacher
364- room : " " , // roll class room
365- } ,
366- advisor : "Mr R Dowdell" , // year adviser
361+ title : z . string ( ) , // title of the class
362+ teacher : z . string ( ) , // teacher code for the teacher
363+ fullTeacher : z . string ( ) , // full name of the teacher
364+ room : z . string ( ) . nullish ( ) , // roll class room
365+ } ) ,
366+ advisor : z . string ( ) , // year adviser
367367} ) ;
0 commit comments