.news.js 1.0 KB

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