.roomchat.js 820 B

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