export type ClassType = 'cheap' | 'noble'

export type ClassProfile = {
  id: string
  name: string
  type: ClassType
  familyPhoto?: string
}

export type ChildProfile = {
  id: string
  classId: string
  className: string
  name: string
  englishName: string
  gender: string
  birthday: string
  zodiac: string
  friends: string[]
  hobbies: string[]
  favoriteGames: string[]
  favoriteFoods: string[]
  traits: string
  comment: string
  commentGeneratedAt: string
  importedAt: string
}

export type LoadStudentDataResponse =
  | {
      ok: true
      classes: ClassProfile[]
      profiles: ChildProfile[]
    }
  | {
      ok: false
      message: string
    }

export type ListStudentProfilesInput = {
  page: number
  pageSize: number
  query?: string
  classId?: string
}

export type ListStudentProfilesResponse =
  | {
      ok: true
      profiles: ChildProfile[]
      total: number
      page: number
      pageSize: number
    }
  | {
      ok: false
      message: string
    }

export type UpdateStudentProfileInput = ChildProfile

export type UpdateStudentProfileResponse =
  | {
      ok: true
      profile: ChildProfile
    }
  | {
      ok: false
      message: string
    }

export type GenerateStudentCommentInput = {
  profileId: string
}

export type GenerateStudentCommentResponse =
  | {
      ok: true
      profile: ChildProfile
    }
  | {
      ok: false
      message: string
    }

export type SaveClassesResponse =
  | {
      ok: true
    }
  | {
      ok: false
      message: string
    }

export type ReplaceClassProfilesResponse =
  | {
      ok: true
    }
  | {
      ok: false
      message: string
    }

export type DeleteClassResponse =
  | {
      ok: true
    }
  | {
      ok: false
      message: string
    }

export type DeleteStudentProfileResponse =
  | {
      ok: true
    }
  | {
      ok: false
      message: string
    }
