.patentsafeg.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "user_id",
  5. "admin_id",
  6. "create_number",
  7. "name",
  8. "apply_personal",
  9. "type",
  10. "inventor",
  11. "contact",
  12. "phone",
  13. "email",
  14. "questions",
  15. "status",
  16. "file",
  17. ],
  18. },
  19. destroy: {
  20. params: ["!id"],
  21. service: "delete",
  22. },
  23. update: {
  24. params: ["!id"],
  25. requestBody: [
  26. "user_id",
  27. "admin_id",
  28. "create_number",
  29. "name",
  30. "apply_personal",
  31. "type",
  32. "inventor",
  33. "contact",
  34. "phone",
  35. "email",
  36. "questions",
  37. "status",
  38. "file",
  39. ],
  40. },
  41. show: {
  42. parameters: {
  43. params: ["!id"],
  44. },
  45. service: "fetch",
  46. },
  47. index: {
  48. parameters: {
  49. query: {
  50. user_id: "user_id",
  51. admin_id: "admin_id",
  52. create_number: "create_number",
  53. name: "name",
  54. apply_name: "apply_name",
  55. type: "type",
  56. status: "status",
  57. "create_time@start": "create_time@start",
  58. "create_time@end": "create_time@end",
  59. },
  60. // options: {
  61. // "meta.state": 0 // 默认条件
  62. // },
  63. },
  64. service: "query",
  65. options: {
  66. query: ["skip", "limit"],
  67. sort: ["meta.createdAt"],
  68. desc: true,
  69. count: true,
  70. },
  71. },
  72. check: {
  73. requestBody: ["id", "status", "remark", "file"],
  74. },
  75. };