.trainmodel.js 1.0 KB

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