1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- module.exports = {
- create: {
- requestBody: ['buy_limit', 'limit_num', 'leader_price', 'sort', 'file', 'can_group', 'group_config', 'sell_money', 'flow_money', 'freight', 'goods', 'name', 'num', 'status'],
- },
- destroy: {
- params: ['!id'],
- service: 'delete',
- },
- update: {
- params: ['!id'],
- requestBody: ['buy_limit', 'limit_num', 'leader_price', 'sort', 'file', 'can_group', 'group_config', 'sell_money', 'flow_money', 'freight', 'goods', 'name', 'num', 'status'],
- },
- show: {
- parameters: {
- params: ['!id'],
- },
- service: 'fetch',
- },
- index: {
- parameters: {
- query: {
- 'meta.createdAt@start': 'meta.createdAt@start',
- 'meta.createdAt@end': 'meta.createdAt@end',
- goods: 'goods',
- name: '%name%',
- status: 'status',
- can_group: 'can_group',
- sort: 'sort',
- buy_limit: 'buy_limit',
- },
- // options: {
- // "meta.state": 0 // 默认条件
- // },
- },
- service: 'query',
- options: {
- query: ['skip', 'limit'],
- // sort: [{ sort: -1 }, { 'meta.createdAt': -1 }],
- sort: { sort: -1, 'meta.createdAt': -1 },
- desc: true,
- count: true,
- },
- },
- };
|