AnswerSheet.js 604 B

123456789101112131415161718192021222324252627
  1. import { Collection, Model } from 'js-abstract-model'
  2. import { TestSetQuestion } from 'src/models/TestSetQuestion.js'
  3. class AnswerSheet extends Model {
  4. constructor (data) {
  5. super(data, [
  6. { key: 'id' },
  7. { key: 'answer_text' },
  8. { key: 'answer_attachment' },
  9. { key: 'answer_choice_index' },
  10. { key: 'score' },
  11. { key: 'test_question' },
  12. {
  13. key: 'test_question_info',
  14. relatedModel: TestSetQuestion
  15. }
  16. ])
  17. }
  18. }
  19. class AnswerSheetList extends Collection {
  20. model () {
  21. return AnswerSheet
  22. }
  23. }
  24. export { AnswerSheet, AnswerSheetList }