- 新增 action/group_member.go 文件,实现获取群组列表和群成员列表的方法 - 在 constants/uri.go 中定义群组相关的 API 路径常量 - 在 model/group.go 中添加群组和群成员的数据结构定义
48 lines
1.5 KiB
Go
48 lines
1.5 KiB
Go
package model
|
|
|
|
type Group struct {
|
|
GroupID int64 `json:"group_id"`
|
|
GroupName string `json:"group_name"`
|
|
MemberCount int `json:"member_count"`
|
|
MaxMemberCount int `json:"max_member_count"`
|
|
}
|
|
|
|
type GroupListResponse struct {
|
|
Status string `json:"status"`
|
|
Retcode int `json:"retcode"`
|
|
Data []Group `json:"data"`
|
|
Message string `json:"message"`
|
|
Wording string `json:"wording"`
|
|
Echo string `json:"echo"`
|
|
}
|
|
|
|
type GroupMember struct {
|
|
GroupID int64 `json:"group_id"`
|
|
UserID int64 `json:"user_id"`
|
|
Nickname string `json:"nickname"`
|
|
Card string `json:"card"`
|
|
Sex string `json:"sex"`
|
|
Age int `json:"age"`
|
|
Area string `json:"area"`
|
|
Level string `json:"level"`
|
|
QQLevel int `json:"qq_level"`
|
|
JoinTime int `json:"join_time"`
|
|
LastSentTime int `json:"last_sent_time"`
|
|
TitleExpireTime int `json:"title_expire_time"`
|
|
Unfriendly bool `json:"unfriendly"`
|
|
CardChangeable bool `json:"card_changeable"`
|
|
IsRobot bool `json:"is_robot"`
|
|
ShutUpTimestamp int `json:"shut_up_timestamp"`
|
|
Role string `json:"role"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
type GroupMemberListResponse struct {
|
|
Status string `json:"status"`
|
|
Retcode int `json:"retcode"`
|
|
Data []GroupMember `json:"data"`
|
|
Message string `json:"message"`
|
|
Wording string `json:"wording"`
|
|
Echo string `json:"echo"`
|
|
}
|