.userleader.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "user_id",
  5. "openid",
  6. "name",
  7. "card",
  8. "phone",
  9. "status",
  10. "cause",
  11. ],
  12. },
  13. destroy: {
  14. params: ["!id"],
  15. service: "delete",
  16. },
  17. update: {
  18. params: ["!id"],
  19. requestBody: [
  20. "user_id",
  21. "openid",
  22. "name",
  23. "card",
  24. "phone",
  25. "status",
  26. "cause",
  27. ],
  28. },
  29. show: {
  30. parameters: {
  31. params: ["!id"],
  32. },
  33. service: "fetch",
  34. },
  35. index: {
  36. parameters: {
  37. query: {
  38. "meta.createdAt@start": "meta.createdAt@start",
  39. "meta.createdAt@end": "meta.createdAt@end",
  40. user_id: "user_id",
  41. openid: "openid",
  42. name: "name",
  43. card: "card",
  44. phone: "phone",
  45. status: "status",
  46. },
  47. // options: {
  48. // "meta.state": 0 // 默认条件
  49. // },
  50. },
  51. service: "query",
  52. options: {
  53. query: ["skip", "limit"],
  54. sort: ["meta.createdAt"],
  55. desc: true,
  56. count: true,
  57. },
  58. },
  59. };