fix(admin): 修正接口 schema 与路由不匹配

- classroomSchema 允许 building/status 为 null,教室查看页恢复数据
- 排期 matrix 单元格为对象而非数组,教室排期页恢复渲染
- 押金批量收取改用 /deposits/eligible-students 路由
- 学生下拉 schema 按 /deposits/student-lookups 实际结构校验
- 水电费录入改走 /expenses/student-utility,批量恢复改为 PUT
This commit is contained in:
2026-08-06 11:58:19 +08:00
parent 67e14e357c
commit 2e7bb81ebd
4 changed files with 18 additions and 9 deletions

View File

@@ -4,7 +4,8 @@ export const classroomScheduleSchema = z
.object({
classrooms: z.array(z.record(z.string(), z.unknown())),
organizations: z.array(z.record(z.string(), z.unknown())),
matrix: z.record(z.string(), z.record(z.string(), z.array(z.record(z.string(), z.unknown())))),
// matrix: 教室 id → 日期 → 单条排课/租赁记录(对象,非数组)
matrix: z.record(z.string(), z.record(z.string(), z.record(z.string(), z.unknown()))),
summary: z.record(z.string(), z.record(z.string(), z.unknown())),
days: z.number().optional(),
})