import { z } from "zod"

/** 生成学生个人诊断报告 */
export const GenerateStudentReportSchema = z.object({
  studentId: z.string().min(1),
  period: z.string().min(1),
})

export type GenerateStudentReportInput = z.infer<typeof GenerateStudentReportSchema>

/** 生成班级诊断报告 */
export const GenerateClassReportSchema = z.object({
  classId: z.string().min(1),
  period: z.string().min(1),
})

export type GenerateClassReportInput = z.infer<typeof GenerateClassReportSchema>

/** 发布诊断报告 */
export const PublishReportSchema = z.object({
  id: z.string().min(1),
})

export type PublishReportInput = z.infer<typeof PublishReportSchema>

/** 删除诊断报告 */
export const DeleteReportSchema = z.object({
  id: z.string().min(1),
})

export type DeleteReportInput = z.infer<typeof DeleteReportSchema>

/** 查询诊断报告列表 */
export const GetDiagnosticReportsSchema = z.object({
  studentId: z.string().optional(),
  reportType: z.enum(["individual", "class", "grade"]).optional(),
  status: z.enum(["draft", "published", "archived"]).optional(),
  period: z.string().optional(),
})

export type GetDiagnosticReportsInput = z.infer<typeof GetDiagnosticReportsSchema>

/** 获取诊断报告详情 */
export const GetDiagnosticReportByIdSchema = z.object({
  id: z.string().min(1),
})

export type GetDiagnosticReportByIdInput = z.infer<typeof GetDiagnosticReportByIdSchema>
