调查包含问题数组。是否可以有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
}
1条答案
按热度按时间5ktev3wc1#
"这就是我最后的答案"