export type DepartmentListItem = {
  id: string
  name: string
  description: string | null
  createdAt: string
  updatedAt: string
}

export type AcademicYearListItem = {
  id: string
  name: string
  startDate: string
  endDate: string
  isActive: boolean
  createdAt: string
  updatedAt: string
}

export type SchoolListItem = {
  id: string
  name: string
  code: string | null
  createdAt: string
  updatedAt: string
}

export type StaffOption = {
  id: string
  name: string
  email: string
}

export type GradeListItem = {
  id: string
  school: { id: string; name: string }
  name: string
  order: number
  gradeHead: StaffOption | null
  teachingHead: StaffOption | null
  createdAt: string
  updatedAt: string
}

export type DepartmentInsertData = {
  id: string
  name: string
  description: string | null
}

export type DepartmentUpdateData = {
  name: string
  description: string | null
}

export type SchoolInsertData = {
  id: string
  name: string
  code: string | null
}

export type SchoolUpdateData = {
  name: string
  code: string | null
}

export type GradeInsertData = {
  id: string
  schoolId: string
  name: string
  order: number
  gradeHeadId: string | null
  teachingHeadId: string | null
}

export type GradeUpdateData = {
  schoolId: string
  name: string
  order: number
  gradeHeadId: string | null
  teachingHeadId: string | null
}

export type AcademicYearInsertData = {
  id: string
  name: string
  startDate: Date
  endDate: Date
  isActive: boolean
}

export type AcademicYearUpdateData = {
  name: string
  startDate: Date
  endDate: Date
  isActive: boolean
}

export type OrgTreeNode = {
  id: string
  name: string
  type: "school" | "grade" | "class"
  children?: OrgTreeNode[]
}
