TestSetQuestion.js 520 B

12345678910111213141516171819202122232425
  1. import { Collection, Model } from 'js-abstract-model'
  2. import { Question } from 'src/models/Question.js'
  3. class TestSetQuestion extends Model {
  4. constructor (data) {
  5. super(data, [
  6. { key: 'id' },
  7. { key: 'is_extra_mark' },
  8. { key: 'mark' },
  9. { key: 'question' },
  10. {
  11. key: 'question_info',
  12. relatedModel: Question
  13. }
  14. ])
  15. }
  16. }
  17. class TestSetQuestionList extends Collection {
  18. model () {
  19. return TestSetQuestion
  20. }
  21. }
  22. export { TestSetQuestion, TestSetQuestionList }