.experience.js 1.1 KB

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