wx_card.api 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. import "../base.api"
  2. type (
  3. // The data of wx card information | WxCard信息
  4. WxCardInfo {
  5. BaseIDInfo
  6. // user表ID
  7. UserId *uint64 `json:"userId,optional"`
  8. // wx表ID
  9. WxUserId *uint64 `json:"wxUserId,optional"`
  10. // 头像
  11. Avatar *string `json:"avatar,optional"`
  12. // logo
  13. Logo *string `json:"logo,optional"`
  14. // 名称
  15. Name *string `json:"name,optional"`
  16. // 公司
  17. Company *string `json:"company,optional"`
  18. // 地址
  19. Address *string `json:"address,optional"`
  20. // 手机号
  21. Phone *string `json:"phone,optional"`
  22. // 公众号
  23. OfficialAccount *string `json:"officialAccount,optional"`
  24. // 微信号
  25. WechatAccount *string `json:"wechatAccount,optional"`
  26. // 邮箱
  27. Email *string `json:"email,optional"`
  28. // 聊天信息
  29. ApiBase *string `json:"apiBase,optional"`
  30. ApiKey *string `json:"apiKey,optional"`
  31. // AI信息
  32. AiInfo *string `json:"aiInfo,optional"`
  33. // 个人介绍
  34. Intro *string `json:"intro,optional"`
  35. }
  36. WxCardSimpleInfo {
  37. ID *uint64 `json:"id,optional"`
  38. // 头像
  39. Avatar *string `json:"avatar,optional"`
  40. // 名称
  41. Name *string `json:"name,optional"`
  42. }
  43. // The response data of wx card list | WxCard列表数据
  44. WxCardListResp {
  45. BaseDataInfo
  46. // WxCard list data | WxCard列表数据
  47. Data WxCardListInfo `json:"data"`
  48. }
  49. // WxCard list data | WxCard列表数据
  50. WxCardListInfo {
  51. BaseListInfo
  52. // The API list data | WxCard列表数据
  53. Data []WxCardInfo `json:"data"`
  54. }
  55. // Get wx card list request params | WxCard列表请求参数
  56. WxCardListReq {
  57. PageInfo
  58. // 头像
  59. Avatar *string `json:"avatar,optional"`
  60. // logo
  61. Logo *string `json:"logo,optional"`
  62. // 名称
  63. Name *string `json:"name,optional"`
  64. }
  65. // WxCard information response | WxCard信息返回体
  66. WxCardInfoResp {
  67. BaseDataInfo
  68. // WxCard information | WxCard数据
  69. Data WxCardInfo `json:"data"`
  70. }
  71. )
  72. @server(
  73. jwt: Auth
  74. group: wxcard
  75. middleware: Miniprogram
  76. )
  77. service Wechat {
  78. // Get wx card by ID | 通过ID获取WxCard
  79. @handler getApiWxCardDetail
  80. post /api/card/detail (IDReq) returns (WxCardInfoResp)
  81. }
  82. @server(
  83. jwt: Auth
  84. group: wxcard
  85. middleware: Authority
  86. )
  87. service Wechat {
  88. // Create wx card information | 创建WxCard
  89. @handler createWxCard
  90. post /wx_card/create (WxCardInfo) returns (BaseMsgResp)
  91. // Update wx card information | 更新WxCard
  92. @handler updateWxCard
  93. post /wx_card/update (WxCardInfo) returns (BaseMsgResp)
  94. // Delete wx card information | 删除WxCard信息
  95. @handler deleteWxCard
  96. post /wx_card/delete (IDsReq) returns (BaseMsgResp)
  97. // Get wx card list | 获取WxCard列表
  98. @handler getWxCardList
  99. post /wx_card/list (WxCardListReq) returns (WxCardListResp)
  100. // Get wx card by ID | 通过ID获取WxCard
  101. @handler getWxCardById
  102. post /wx_card (IDReq) returns (WxCardInfoResp)
  103. }