12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- 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",
- },
- };
|