.trainplan.js 876 B

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