import { z } from "zod"
import { QuestionTypeEnum } from "./schema"

export type QuestionType = z.infer<typeof QuestionTypeEnum>

export interface Question {
  id: string
  content: unknown
  type: QuestionType
  difficulty: number
  createdAt: Date
  updatedAt: Date
  author: {
    id: string
    name: string | null
    image: string | null
  } | null
  knowledgePoints: {
    id: string
    name: string
  }[]
  childrenCount?: number
}

export type KnowledgePointOption = {
  id: string
  name: string
  chapterId: string | null
  chapterTitle: string | null
  textbookId: string | null
  textbookTitle: string | null
  subject: string | null
  grade: string | null
}
