module.exports = { create: { requestBody: [ "questionnaire_id", "answer", "user_id", "phone", "contacts", "company", "create_user", "address", "attribute", "category", ], }, destroy: { params: ["!id"], service: "delete", }, update: { params: ["!id"], requestBody: [ "questionnaire_id", "answer", "user_id", "phone", "contacts", "company", "address", "attribute", "category", ], }, show: { parameters: { params: ["!id"], }, service: "fetch", }, index: { parameters: { query: { questionnaire_id: "questionnaire_id", answer: "answer", user_id: "user_id", phone: "phone", contacts: "contacts", company: "company", "create_time@start": "create_time@start", "create_time@end": "create_time@end", }, // options: { // "meta.state": 0 // 默认条件 // }, }, service: "query", options: { query: ["skip", "limit"], sort: ["meta.createdAt"], desc: true, count: true, }, }, getAnswer: { parameters: { query: { questionnaire_id: "questionnaire_id", user_id: "user_id", }, }, service: "findOne", }, };