.patent.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. 'create_number',
  5. 'create_date',
  6. 'success_number',
  7. 'success_date',
  8. 'inventor',
  9. 'agent',
  10. 'agent_personal',
  11. 'address',
  12. 'name',
  13. 'apply_personal',
  14. 'term',
  15. 'type',
  16. 'nationality',
  17. 'ipc_type',
  18. 'onlegal_status',
  19. 'legal_status',
  20. 'law_date',
  21. 'on_obligee',
  22. 'apply_address',
  23. 'apply_other',
  24. 'law_num',
  25. 'first_opendate',
  26. 'empower_date',
  27. 'lose_date',
  28. 'examine_date',
  29. 'invention_design',
  30. 'incopat_link',
  31. 'first_ask',
  32. 'first_apply',
  33. 'apply_city',
  34. 'business_code',
  35. 'business_address',
  36. 'first_inventor',
  37. 'shared_value',
  38. 'techol_stable',
  39. 'techol_advanced',
  40. 'pct_apply',
  41. 'pct_publish',
  42. 'status',
  43. 'abstract',
  44. 'img_url',
  45. 'user_id',
  46. 'remark',
  47. ],
  48. },
  49. destroy: {
  50. params: ['!id'],
  51. service: 'delete',
  52. },
  53. update: {
  54. params: ['!id'],
  55. requestBody: [
  56. 'create_number',
  57. 'create_date',
  58. 'success_number',
  59. 'success_date',
  60. 'inventor',
  61. 'agent',
  62. 'agent_personal',
  63. 'address',
  64. 'name',
  65. 'apply_personal',
  66. 'term',
  67. 'type',
  68. 'nationality',
  69. 'ipc_type',
  70. 'onlegal_status',
  71. 'legal_status',
  72. 'law_date',
  73. 'on_obligee',
  74. 'apply_address',
  75. 'apply_other',
  76. 'law_num',
  77. 'first_opendate',
  78. 'empower_date',
  79. 'lose_date',
  80. 'examine_date',
  81. 'invention_design',
  82. 'incopat_link',
  83. 'first_ask',
  84. 'first_apply',
  85. 'apply_city',
  86. 'business_code',
  87. 'business_address',
  88. 'first_inventor',
  89. 'shared_value',
  90. 'techol_stable',
  91. 'techol_advanced',
  92. 'pct_apply',
  93. 'pct_publish',
  94. 'status',
  95. 'abstract',
  96. 'img_url',
  97. 'user_id',
  98. 'remark',
  99. ],
  100. },
  101. show: {
  102. parameters: {
  103. params: ['!id'],
  104. },
  105. service: 'fetch',
  106. },
  107. index: {
  108. parameters: {
  109. query: {
  110. create_number: 'create_number',
  111. success_number: 'success_number',
  112. inventor: 'inventor',
  113. agent: 'agent',
  114. agent_personal: 'agent_personal',
  115. term: 'term',
  116. type: 'type',
  117. nationality: 'nationality',
  118. ipc_type: 'ipc_type',
  119. invention_design: 'invention_design',
  120. first_apply: 'first_apply',
  121. business_code: 'business_code',
  122. law_num: 'law_num',
  123. first_inventor: 'first_inventor',
  124. status: 'status',
  125. 'meta.createdAt@start': 'meta.createdAt@start',
  126. 'meta.createdAt@end': 'meta.createdAt@end',
  127. },
  128. // options: {
  129. // "meta.state": 0 // 默认条件
  130. // },
  131. },
  132. service: 'query',
  133. options: {
  134. query: ['skip', 'limit'],
  135. sort: ['meta.createdAt'],
  136. desc: true,
  137. count: true,
  138. },
  139. },
  140. };