123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- module.exports = {
- create: {
- requestBody: [
- "demand",
- "type",
- "purchase_type",
- "money",
- "contacts",
- "phone",
- "email",
- "user_id",
- "status",
- ],
- },
- destroy: {
- params: ["!id"],
- service: "delete",
- },
- update: {
- params: ["!id"],
- requestBody: [
- "demand",
- "type",
- "purchase_type",
- "money",
- "contacts",
- "phone",
- "email",
- "user_id",
- "status",
- ],
- },
- show: {
- parameters: {
- params: ["!id"],
- },
- service: "fetch",
- },
- index: {
- parameters: {
- query: {
- code: "code",
- user_id: "user_id",
- status: "status",
- type: "type",
- purchase_type: "purchase_type",
- contacts: "contacts",
- "money@start": "money@start",
- "money@end": "money@end",
- },
- // options: {
- // "meta.state": 0 // 默认条件
- // },
- },
- service: "query",
- options: {
- query: ["skip", "limit"],
- sort: ["meta.createdAt"],
- desc: true,
- count: true,
- },
- },
- };
|