1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- module.exports = {
- create: {
- requestBody: ['customer', 'name', 'phone', 'province', 'city', 'area', 'address', 'is_default'],
- },
- destroy: {
- params: ['!id'],
- service: 'delete',
- },
- update: {
- params: ['!id'],
- requestBody: ['customer', 'name', 'phone', 'province', 'city', 'area', 'address', 'is_default'],
- },
- show: {
- parameters: {
- params: ['!id'],
- },
- service: 'fetch',
- },
- index: {
- parameters: {
- query: {
- 'meta.createdAt@start': 'meta.createdAt@start',
- 'meta.createdAt@end': 'meta.createdAt@end',
- customer: 'customer',
- name: 'name',
- phone: 'phone',
- is_default: 'is_default',
- },
- // options: {
- // "meta.state": 0 // 默认条件
- // },
- },
- service: 'query',
- options: {
- query: ['skip', 'limit'],
- sort: ['meta.createdAt'],
- desc: true,
- count: true,
- },
- },
- toDefault: {
- params: ['!id'],
- },
- };
|