module.exports = { create: { requestBody: ['name', 'phone', 'password', 'icon', 'birth', 'gender', 'email', 'openid', 'status'], }, destroy: { params: ['!id'], service: 'delete', }, update: { params: ['!id'], requestBody: ['name', 'phone', 'password', 'icon', 'birth', 'gender', 'email', 'openid', 'status'], }, show: { parameters: { params: ['!id'], }, service: 'fetch', }, index: { parameters: { query: { 'meta.createdAt@start': 'meta.createdAt@start', 'meta.createdAt@end': 'meta.createdAt@end', name: 'name', phone: 'phone', gender: 'gender', email: 'email', openid: 'openid', status: 'status', }, // options: { // "meta.state": 0 // 默认条件 // }, }, service: 'query', options: { query: ['skip', 'limit'], sort: ['meta.createdAt'], desc: true, count: true, }, }, resetPwd: { params: ['!id'], requestBody: ['!password'], }, login: { requestBody: ['!phone', '!password'], }, wxLogin: { requestBody: ['!openid'], }, toBindEmail: { requestBody: ['!id', '!email'], }, checkBindEmail: { requestBody: ['!code', '!id', '!email'], }, toBindPhone: { requestBody: ['!id', '!phone'], }, };