.disclosure.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "user_id",
  5. "name",
  6. "apply_name",
  7. "type",
  8. "inventer",
  9. "contact",
  10. "phone",
  11. "email",
  12. "date",
  13. "questions",
  14. "desc",
  15. "admin_id",
  16. "is_mech",
  17. "mechanism_id",
  18. "mechanism_name",
  19. "status",
  20. ],
  21. },
  22. destroy: {
  23. params: ["!id"],
  24. service: "delete",
  25. },
  26. update: {
  27. params: ["!id"],
  28. requestBody: [
  29. "user_id",
  30. "name",
  31. "apply_name",
  32. "type",
  33. "inventer",
  34. "contact",
  35. "phone",
  36. "email",
  37. "date",
  38. "questions",
  39. "desc",
  40. "admin_id",
  41. "is_mech",
  42. "mechanism_id",
  43. "mechanism_name",
  44. "status",
  45. ],
  46. },
  47. show: {
  48. parameters: {
  49. params: ["!id"],
  50. },
  51. service: "fetch",
  52. },
  53. index: {
  54. parameters: {
  55. query: {
  56. user_id: "user_id",
  57. admin_id: "admin_id",
  58. name: "name",
  59. apply_name: "apply_name",
  60. status: "status",
  61. is_mech: "is_mech",
  62. mechanism_id: "mechanism_id",
  63. mechanism_name: "mechanism_name",
  64. type: "type",
  65. "create_time@start": "create_time@start",
  66. "create_time@end": "create_time@end",
  67. },
  68. // options: {
  69. // "meta.state": 0 // 默认条件
  70. // },
  71. },
  72. service: "query",
  73. options: {
  74. query: ["skip", "limit"],
  75. sort: ["meta.createdAt"],
  76. desc: true,
  77. count: true,
  78. },
  79. },
  80. check: {
  81. requestBody: ["id", "status", "remark"],
  82. },
  83. import: {
  84. requestBody: ["uri"],
  85. },
  86. cacheImport: {
  87. requestBody: ["data", "temp_id"],
  88. },
  89. toExport: {
  90. requestBody: ["id"],
  91. },
  92. };