SessionTemplate.js 745 B

1234567891011121314151617181920212223242526272829303132
  1. import { Unit } from 'src/models/Unit.js'
  2. import { Model, Collection } from 'js-abstract-model'
  3. class SessionTemplate extends Model {
  4. constructor (data) {
  5. super(data, [
  6. { key: 'id' },
  7. { key: 'unit' },
  8. {
  9. key: 'unit_info',
  10. relatedModel: Unit
  11. },
  12. { key: 'title' },
  13. { key: 'syllabus' },
  14. { key: 'description' },
  15. { key: 'beginning_time' },
  16. { key: 'ending_time' },
  17. { key: 'question' },
  18. { key: 'answer' },
  19. { key: 'question_info' },
  20. { key: 'creation_time' },
  21. { key: 'last_modification_time' }
  22. ])
  23. }
  24. }
  25. class SessionTemplateList extends Collection {
  26. model () {
  27. return SessionTemplate
  28. }
  29. }
  30. export { SessionTemplate, SessionTemplateList }