123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- module.exports = {
- create: {
- requestBody: ['name', 'contacts', 'phone', 'passwd', 'email', 'address', 'juris', 'industry'],
- },
- destroy: {
- params: ['!id'],
- service: 'delete',
- },
- update: {
- params: ['!id'],
- requestBody: ['name', 'contacts', 'phone', 'email', 'address', 'industry', 'juris', 'status'],
- },
- show: {
- parameters: {
- params: ['!id'],
- },
- service: 'fetch',
- },
- index: {
- parameters: {
- query: {
- name: 'name',
- industry: 'industry',
- juris: 'juris',
- 'create_time@start': 'create_time@start',
- 'create_time@end': 'create_time@end',
- },
- // options: {
- // "meta.state": 0 // 默认条件
- // },
- options: {
- isdel: '0', // 默认条件
- },
- },
- service: 'query',
- options: {
- query: ['skip', 'limit'],
- sort: ['meta.createdAt'],
- desc: true,
- count: true,
- },
- },
- //修改密码
- password: {
- params: ['!id'],
- requestBody: ['passwd'],
- service: 'password',
- },
- // 登陆
- login: {
- requestBody: ['phone', 'passwd'],
- service: 'login',
- },
- };
|