调查包含一系列问题。是否可以有一个 InputType 或 Question 数组?
@InputType()
export class SurveyInput {
@Field(() => String)
name: string
@Field(() => String)
status: string
@Field(() => String)
category: string
@Field(() => String)
initiativeId: string
@Field(() => QuestionInput)
questions: QuestionInput[]
}
@InputType()
export class QuestionInput {
@Field(() => String)
question: string
@Field(() => String)
maxPoint: number
}