You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
498 B

  1. const Model = require('objection').Model
  2. /* global WIKI */
  3. /**
  4. * Navigation model
  5. */
  6. module.exports = class Navigation extends Model {
  7. static get tableName() { return 'navigation' }
  8. static get idColumn() { return 'key' }
  9. static get jsonSchema () {
  10. return {
  11. type: 'object',
  12. required: ['key'],
  13. properties: {
  14. key: {type: 'string'},
  15. config: {type: 'object'}
  16. }
  17. }
  18. }
  19. static async getTree() {
  20. return WIKI.models.navigation.query()
  21. }
  22. }