.tNewsCenter.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. '!title',
  5. 'image',
  6. 'brief_introduction',
  7. '!description',
  8. 'publish_time',
  9. 'publish_state',
  10. 'publish_state_description',
  11. 'source',
  12. 'hot'
  13. ]
  14. },
  15. destroy: {
  16. params: ['!id'],
  17. service: 'delete'
  18. },
  19. update: {
  20. params: ['!id'],
  21. requestBody: [
  22. 'title',
  23. 'image',
  24. 'brief_introduction',
  25. 'description',
  26. 'publish_time',
  27. 'publish_state',
  28. 'publish_state_description',
  29. 'source',
  30. 'hot'
  31. ]
  32. },
  33. show: {
  34. parameters: {
  35. params: ['!id']
  36. },
  37. service: 'fetch'
  38. },
  39. index: {
  40. parameters: {
  41. query: {
  42. title:'%title%',
  43. image:'image',
  44. brief_introduction:'%brief_introduction%',
  45. description:'description',
  46. publish_time:'publish_time',
  47. publish_state:'%publish_state%',
  48. publish_state_description:'publish_state_description',
  49. source:'source',
  50. hot:'hot'
  51. }
  52. },
  53. service: 'query',
  54. options: {
  55. query: ['skip', 'limit'],
  56. sort: ['meta.createdAt'],
  57. desc: true,
  58. count: true
  59. }
  60. },
  61. };