wx_card_visit.api 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. import "../base.api"
  2. import "./wx_card.api"
  3. type (
  4. // The data of wx card visit information | WxCardVisit信息
  5. WxCardVisitInfo {
  6. BaseIDInfo
  7. // user表ID
  8. UserId *uint64 `json:"userId,optional"`
  9. // 被访ID
  10. BotId *uint64 `json:"botId,optional"`
  11. // 类型:1-微信 2-小程序 3-智能体
  12. BotType *uint8 `json:"botType,optional"`
  13. CardInfo WxCardSimpleInfo `json:"cardInfo,optional,omitempty"`
  14. }
  15. WxCardVisitReq {
  16. BaseIDInfo
  17. // user表ID
  18. UserId *uint64 `json:"userId,optional"`
  19. // 被访ID
  20. BotId *uint64 `json:"botId,optional"`
  21. // 类型:1-微信 2-小程序 3-智能体
  22. BotType *uint8 `json:"botType,optional"`
  23. }
  24. WxCardVisitSingleInfo {
  25. BaseIDInfo
  26. // user表ID
  27. UserId *uint64 `json:"userId,optional"`
  28. // 被访ID
  29. BotId *uint64 `json:"botId,optional"`
  30. // 类型:1-微信 2-小程序 3-智能体
  31. BotType *uint8 `json:"botType,optional"`
  32. CardInfo WxCardInfo `json:"cardInfo,optional"`
  33. }
  34. // The response data of wx card visit list | WxCardVisit列表数据
  35. WxCardVisitListResp {
  36. BaseDataInfo
  37. // WxCardVisit list data | WxCardVisit列表数据
  38. Data WxCardVisitListInfo `json:"data"`
  39. }
  40. // WxCardVisit list data | WxCardVisit列表数据
  41. WxCardVisitListInfo {
  42. BaseListInfo
  43. // The API list data | WxCardVisit列表数据
  44. Data []WxCardVisitInfo `json:"data"`
  45. }
  46. // Get wx card visit list request params | WxCardVisit列表请求参数
  47. WxCardVisitListReq {
  48. PageInfo
  49. }
  50. // WxCardVisit information response | WxCardVisit信息返回体
  51. WxCardVisitInfoResp {
  52. BaseDataInfo
  53. // WxCardVisit information | WxCardVisit数据
  54. Data WxCardVisitInfo `json:"data"`
  55. }
  56. )
  57. @server(
  58. jwt: Auth
  59. group: wxcardvisit
  60. middleware: Miniprogram
  61. )
  62. service Wechat {
  63. // Create wx card visit information | 创建WxCardVisit
  64. @handler submitApiWxCardVisit
  65. post /api/card/visit (WxCardVisitInfo) returns (BaseMsgResp)
  66. // Get wx card visit information | 获取WxCardVisit列表
  67. @handler getApiWxCardVisitList
  68. post /api/card/visit/history (WxCardVisitListReq) returns (WxCardVisitListResp)
  69. }
  70. @server(
  71. jwt: Auth
  72. group: wxcardvisit
  73. middleware: Authority
  74. )
  75. service Wechat {
  76. // Create wx card visit information | 创建WxCardVisit
  77. @handler createWxCardVisit
  78. post /wx_card_visit/create (WxCardVisitReq) returns (BaseMsgResp)
  79. // Update wx card visit information | 更新WxCardVisit
  80. @handler updateWxCardVisit
  81. post /wx_card_visit/update (WxCardVisitReq) returns (BaseMsgResp)
  82. // Delete wx card visit information | 删除WxCardVisit信息
  83. @handler deleteWxCardVisit
  84. post /wx_card_visit/delete (IDsReq) returns (BaseMsgResp)
  85. // Get wx card visit list | 获取WxCardVisit列表
  86. @handler getWxCardVisitList
  87. post /wx_card_visit/list (WxCardVisitListReq) returns (WxCardVisitListResp)
  88. // Get wx card visit by ID | 通过ID获取WxCardVisit
  89. @handler getWxCardVisitById
  90. post /wx_card_visit (IDReq) returns (WxCardVisitInfoResp)
  91. }