88 lines
2.2 KiB
Go
88 lines
2.2 KiB
Go
package wx_helper_sdk
|
|
|
|
import "encoding/json"
|
|
|
|
// CommonResponse
|
|
// @description: 公共返回
|
|
type CommonResponse struct {
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data any `json:"data"`
|
|
}
|
|
|
|
func (r *CommonResponse) String() string {
|
|
data, _ := json.Marshal(r)
|
|
return string(data)
|
|
}
|
|
|
|
// UserInfo
|
|
// @description: 当前用户信息
|
|
type UserInfo struct {
|
|
Account string `json:"account"`
|
|
City string `json:"city"`
|
|
Country string `json:"country"`
|
|
CurrentDataPath string `json:"currentDataPath"`
|
|
DataSavePath string `json:"dataSavePath"`
|
|
DbKey string `json:"dbKey"`
|
|
HeadImage string `json:"headImage"`
|
|
Mobile string `json:"mobile"`
|
|
Name string `json:"name"`
|
|
Province string `json:"province"`
|
|
Signature string `json:"signature"`
|
|
Wxid string `json:"wxid"`
|
|
}
|
|
|
|
func (r *UserInfo) String() string {
|
|
data, _ := json.Marshal(r)
|
|
return string(data)
|
|
}
|
|
|
|
// Friend
|
|
// @description: 朋友信息
|
|
type Friend struct {
|
|
CustomAccount string `json:"customAccount"`
|
|
EncryptName string `json:"encryptName"`
|
|
Nickname string `json:"nickname"`
|
|
Pinyin string `json:"pinyin"`
|
|
PinyinAll string `json:"pinyinAll"`
|
|
Reserved1 int `json:"reserved1"`
|
|
Reserved2 int `json:"reserved2"`
|
|
Type int `json:"type"`
|
|
VerifyFlag int `json:"verifyFlag"`
|
|
Wxid string `json:"wxid"`
|
|
}
|
|
|
|
func (r *Friend) String() string {
|
|
data, _ := json.Marshal(r)
|
|
return string(data)
|
|
}
|
|
|
|
// ChatRoomDetail
|
|
// @description: 群聊详情
|
|
type ChatRoomDetail struct {
|
|
ChatRoomId string `json:"chatRoomId"`
|
|
Notice string `json:"notice"`
|
|
Admin string `json:"admin"`
|
|
Xml string `json:"xml"`
|
|
}
|
|
|
|
func (r *ChatRoomDetail) String() string {
|
|
data, _ := json.Marshal(r)
|
|
return string(data)
|
|
}
|
|
|
|
// ChatRoomMembers
|
|
// @description: 群聊人员信息
|
|
type ChatRoomMembers struct {
|
|
Admin string `json:"admin"`
|
|
AdminNickname string `json:"adminNickname"`
|
|
ChatRoomId string `json:"chatRoomId"`
|
|
MemberNickname string `json:"memberNickname"`
|
|
Members string `json:"members"`
|
|
}
|
|
|
|
func (r *ChatRoomMembers) String() string {
|
|
data, _ := json.Marshal(r)
|
|
return string(data)
|
|
}
|