ContentCategory.js 509 B

1234567891011121314151617181920212223242526
  1. import { Collection, Model } from 'js-abstract-model'
  2. class ContentCategory extends Model {
  3. constructor (data) {
  4. super(data, [
  5. { key: 'id' },
  6. { key: 'title' },
  7. { key: 'thumbnail' },
  8. { key: 'description' },
  9. { key: 'parent' },
  10. { key: 'parent_info' },
  11. {
  12. key: 'children',
  13. defalut: []
  14. }
  15. ])
  16. }
  17. }
  18. class ContentCategoryList extends Collection {
  19. model () {
  20. return ContentCategory
  21. }
  22. }
  23. export { ContentCategory, ContentCategoryList }