|
@@ -1,54 +1,87 @@
|
|
|
module.exports = {
|
|
|
create: {
|
|
|
- requestBody: ['expert_id', 'expert_name', 'phone', 'password', 'company', 'group_zw', 'major', 'now_major', 'zw', 'zc', 'apply_id', 'score', 'desc', 'type'],
|
|
|
+ requestBody: [
|
|
|
+ "expert_id",
|
|
|
+ "expert_name",
|
|
|
+ "phone",
|
|
|
+ "password",
|
|
|
+ "company",
|
|
|
+ "group_zw",
|
|
|
+ "major",
|
|
|
+ "now_major",
|
|
|
+ "zw",
|
|
|
+ "zc",
|
|
|
+ "apply_id",
|
|
|
+ "score",
|
|
|
+ "desc",
|
|
|
+ "type",
|
|
|
+ "status",
|
|
|
+ ],
|
|
|
},
|
|
|
destroy: {
|
|
|
- params: ['!id'],
|
|
|
- service: 'delete',
|
|
|
+ params: ["!id"],
|
|
|
+ service: "delete",
|
|
|
},
|
|
|
update: {
|
|
|
- params: ['!id'],
|
|
|
- requestBody: ['expert_id', 'expert_name', 'phone', 'password', 'company', 'group_zw', 'major', 'now_major', 'zw', 'zc', 'apply_id', 'score', 'desc', 'type'],
|
|
|
+ params: ["!id"],
|
|
|
+ requestBody: [
|
|
|
+ "expert_id",
|
|
|
+ "expert_name",
|
|
|
+ "phone",
|
|
|
+ "password",
|
|
|
+ "company",
|
|
|
+ "group_zw",
|
|
|
+ "major",
|
|
|
+ "now_major",
|
|
|
+ "zw",
|
|
|
+ "zc",
|
|
|
+ "apply_id",
|
|
|
+ "score",
|
|
|
+ "desc",
|
|
|
+ "type",
|
|
|
+ "status",
|
|
|
+ ],
|
|
|
},
|
|
|
show: {
|
|
|
parameters: {
|
|
|
- params: ['!id'],
|
|
|
+ params: ["!id"],
|
|
|
},
|
|
|
- service: 'fetch',
|
|
|
+ service: "fetch",
|
|
|
},
|
|
|
index: {
|
|
|
parameters: {
|
|
|
query: {
|
|
|
- expert_id: 'expert_id',
|
|
|
- expert_name: 'expert_name',
|
|
|
- apply_id: 'apply_id',
|
|
|
- score: 'score',
|
|
|
- desc: 'desc',
|
|
|
- type: 'type',
|
|
|
- 'meta.createdAt@start': 'meta.createdAt@start',
|
|
|
- 'meta.createdAt@end': 'meta.createdAt@end',
|
|
|
+ expert_id: "expert_id",
|
|
|
+ expert_name: "expert_name",
|
|
|
+ apply_id: "apply_id",
|
|
|
+ score: "score",
|
|
|
+ desc: "desc",
|
|
|
+ type: "type",
|
|
|
+ status:"status",
|
|
|
+ "meta.createdAt@start": "meta.createdAt@start",
|
|
|
+ "meta.createdAt@end": "meta.createdAt@end",
|
|
|
},
|
|
|
// options: {
|
|
|
// "meta.state": 0 // 默认条件
|
|
|
// },
|
|
|
},
|
|
|
- service: 'query',
|
|
|
+ service: "query",
|
|
|
options: {
|
|
|
- query: ['skip', 'limit'],
|
|
|
- sort: ['meta.createdAt'],
|
|
|
+ query: ["skip", "limit"],
|
|
|
+ sort: ["meta.createdAt"],
|
|
|
desc: true,
|
|
|
count: true,
|
|
|
},
|
|
|
},
|
|
|
// 登陆
|
|
|
login: {
|
|
|
- requestBody: ['!phone', '!password'],
|
|
|
- service: 'login',
|
|
|
+ requestBody: ["!phone", "!password"],
|
|
|
+ service: "login",
|
|
|
},
|
|
|
//修改密码
|
|
|
password: {
|
|
|
- params: ['!id'],
|
|
|
- requestBody: ['password'],
|
|
|
- service: 'password',
|
|
|
+ params: ["!id"],
|
|
|
+ requestBody: ["password"],
|
|
|
+ service: "password",
|
|
|
},
|
|
|
};
|