123456789101112131415161718192021222324252627282930313233343536373839404142 |
- module.exports = {
- create: {
- requestBody: ['name', 'parent_id', 'order_num', 'path', 'component', 'type', 'status', 'icon'],
- },
- destroy: {
- params: ['!id'],
- service: 'delete',
- },
- update: {
- params: ['!id'],
- requestBody: ['name', 'parent_id', 'order_num', 'path', 'component', 'type', 'status', 'icon'],
- },
- show: {
- parameters: {
- params: ['!id'],
- },
- service: 'fetch',
- },
- index: {
- parameters: {
- query: {
- name: 'name',
- parent_id: 'parent_id',
- path: 'path',
- type: 'type',
- 'meta.createdAt@start': 'meta.createdAt@start',
- 'meta.createdAt@end': 'meta.createdAt@end',
- },
- // options: {
- // "meta.state": 0 // 默认条件
- // },
- },
- service: 'query',
- options: {
- query: ['skip', 'limit'],
- sort: ['meta.createdAt'],
- desc: true,
- count: true,
- },
- },
- getUserMenu: {},
- };
|