.train_chat.js 708 B

12345678910111213141516171819202122232425262728293031
  1. module.exports = {
  2. create: {
  3. requestBody: ["sender_id", "sender_name", "!content", "send_time", "role", "unit_id"],
  4. },
  5. destroy: {
  6. params: ["!id"],
  7. service: "delete",
  8. },
  9. update: {
  10. params: ["!id"],
  11. requestBody: ["sender_id", "sender_name", "content", "send_time", "role", "unit_id"],
  12. },
  13. show: {
  14. parameters: {
  15. params: ["!id"],
  16. },
  17. service: "fetch",
  18. },
  19. index: {
  20. parameters: {
  21. query: ["sender_id", "sender_name", "content", "send_time", "role", "unit_id"],
  22. },
  23. service: "query",
  24. options: {
  25. query: ["skip", "limit"],
  26. sort: ["meta.createdAt"],
  27. desc: true,
  28. count: true,
  29. },
  30. },
  31. };