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