.patenttrans.js 1.3 KB

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