Skip to content

Commit 26b8c22

Browse files
Merge pull request #61 from NYCU-SDC/feat/add-questions-field-to-section-model
Add Questions Field to ResponseSection model
2 parents 31859aa + bac335d commit 26b8c22

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/responses/models.tsp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ namespace CoreSystem.Responses {
243243

244244
@doc("The answering progress of this section.")
245245
progress: SectionProgress;
246+
247+
@doc("The questions of the section.")
248+
questions: CoreSystem.Forms.QuestionResponse[];
246249
}
247250

248251
@doc("The current progress of a section")
@@ -256,8 +259,8 @@ namespace CoreSystem.Responses {
256259

257260
@example(#{
258261
sections: #[
259-
#{ id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", title: "Group Info", progress: SectionProgress.submitted },
260-
#{ id: "0f9e8d7c-6b5a-4321-0fed-cba987654321", title: "Self Introduction", progress: SectionProgress.draft }
262+
#{ id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", title: "Group Info", progress: SectionProgress.submitted, questions: #[] },
263+
#{ id: "0f9e8d7c-6b5a-4321-0fed-cba987654321", title: "Self Introduction", progress: SectionProgress.draft, questions: #[] }
261264
],
262265
})
263266
@doc("Response model for listing all sections of a response")

0 commit comments

Comments
 (0)