123456789101112131415161718192021222324252627282930313233343536373839 |
- module.exports = {
- create: {
- requestBody: ['title', 'type', 'score'],
- },
- destroy: {
- params: ['!id'],
- service: 'delete',
- },
- update: {
- params: ['!id'],
- requestBody: ['title', 'type', 'score'],
- },
- show: {
- parameters: {
- params: ['!id'],
- },
- service: 'fetch',
- },
- index: {
- parameters: {
- query: {
- title: 'title',
- 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,
- },
- },
- };
|