.patent.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "create_number",
  5. "create_date",
  6. "success_number",
  7. "success_date",
  8. "name",
  9. "inventor",
  10. "address",
  11. "apply_personal",
  12. "term",
  13. "type",
  14. "agent_personal",
  15. "agent",
  16. "abstract",
  17. "img_url",
  18. "origin",
  19. ],
  20. },
  21. destroy: {
  22. params: ["!id"],
  23. service: "delete",
  24. },
  25. update: {
  26. params: ["!id"],
  27. requestBody: [
  28. "create_number",
  29. "create_date",
  30. "success_number",
  31. "success_date",
  32. "name",
  33. "inventor",
  34. "address",
  35. "apply_personal",
  36. "term",
  37. "type",
  38. "agent_personal",
  39. "agent",
  40. "abstract",
  41. "img_url",
  42. "origin",
  43. ],
  44. },
  45. show: {
  46. parameters: {
  47. params: ["!id"],
  48. },
  49. service: "fetch",
  50. },
  51. index: {
  52. parameters: {
  53. query: {
  54. create_number: "create_number",
  55. create_date: "create_date",
  56. create_number: "create_number",
  57. success_date: "success_date",
  58. name: "%name%",
  59. inventor: "%inventor%",
  60. address: "address",
  61. apply_personal: "%apply_personal%",
  62. term: "term",
  63. type: "type",
  64. agent_personal: "agent_personal",
  65. agent: "agent",
  66. origin: "%origin%",
  67. code:"code"
  68. },
  69. },
  70. service: "query",
  71. options: {
  72. query: ["skip", "limit"],
  73. sort: ["meta.createdAt"],
  74. desc: true,
  75. count: true,
  76. },
  77. },
  78. toImport: {
  79. requestBody: ["uri", "origin"],
  80. service: "toImport",
  81. },
  82. toExport: {
  83. requestBody: ["user"],
  84. service: "toExport",
  85. },
  86. getByCN: {
  87. parameters: {
  88. params: ["!create_number"],
  89. },
  90. service: "getByCreateNumber",
  91. },
  92. };