This commit is contained in:
wangchuxiao
2022-01-25 19:18:04 +08:00
parent 82c8ace8df
commit cdc2428aca
30 changed files with 3731 additions and 1613 deletions
+5
View File
@@ -4,3 +4,8 @@ type RequestPagination struct {
PageNumber int `form:"page_number" binding:"required"`
ShowNumber int `form:"show_number" binding:"required"`
}
type ResponsePagination struct {
CurrentPage int `json:"current_number" binding:"required"`
ShowNumber int `json:"show_number" binding:"required"`
}
+85 -15
View File
@@ -1,20 +1,90 @@
package cms_api_struct
type SearchGroupsResponse struct {
GroupList []struct {
GroupNickName string `json:"group_nick_name"`
GroupID int `json:"group_id"`
MasterName string `json:"master_name"`
MasterId int `json:"master_id"`
CreatTime string `json:"creat_time"`
} `json:"group_list"`
type GroupResponse struct {
GroupName string `json:"group_name"`
GroupID string `json:"group_id"`
GroupMasterName string `json:"group_master_name"`
GroupMasterId string `json:"group_master_id"`
CreateTime string `json:"create_time"`
isBanChat bool `json:"is_ban_chat"`
isBanPrivateChat bool `json:"is_ban_private_chat"`
}
type SearchGroupMemberResponse struct {
GroupMemberList []struct {
MemberPosition int `json:"member_position"`
MemberNickName string `json:"member_nick_name"`
MemberId int `json:"member_id"`
JoinTime string `json:"join_time"`
} `json:"group_member_list"`
type GetGroupRequest struct {
GroupName string `form:"group_name"`
}
type GetGroupResponse struct {
GroupResponse
}
type GetGroupsRequest struct {
RequestPagination
}
type GetGroupsResponse struct {
Groups []GroupResponse `json:"groups"`
GroupNums int `json:"group_nums"`
ResponsePagination
}
type CreateGroupRequest struct {
GroupName string `json:"group_name"`
GroupMasterId string `json:"group_master_id"`
GroupMembers []string `json:"group_members"`
}
type CreateGroupResponse struct {
}
type SetGroupMasterRequest struct {
GroupId string `json:"group_id"`
UserId string `json:"user_id"`
}
type SetGroupMasterResponse struct {
}
type BanGroupChatRequest struct {
GroupId string `json:"group_id"`
}
type BanGroupChatResponse struct {
}
type BanPrivateChatRequest struct {
GroupId string `json:"group_id"`
}
type BanPrivateChatResponse struct {
}
type DeleteGroupRequest struct {
GroupId string `json:"group_id"`
}
type DeleteGroupResponse struct {
}
type GetGroupMemberRequest struct {
GroupId string `json:"group_id"`
}
type GroupMemberResponse struct {
MemberPosition int `json:"member_position"`
MemberNickName string `json:"member_nick_name"`
MemberId int `json:"member_id"`
JoinTime string `json:"join_time"`
}
type GetGroupMemberResponse struct {
GroupMemberList []GroupMemberResponse `json:"group_member_list"`
GroupMemberNums int `json:"group_member_nums"`
ResponsePagination
}
+11 -12
View File
@@ -1,27 +1,26 @@
package cms_api_struct
type CommonMessage struct {
ChatType int `json:"chat_type"`
MessageType int `json:"message_type"`
SenderNickName string `json:"sender_nick_name"`
SenderId int `json:"sender_id"`
SearchContent string `json:"search_content"`
WholeContent string `json:"whole_content"`
}
type SearchMessageByUserResponse struct {
MessageList []struct {
ChatType int `json:"chat_type"`
MessageType int `json:"message_type"`
SenderNickName string `json:"sender_nick_name"`
SenderId int `json:"sender_id"`
CommonMessage
ReceiverNickName string `json:"receiver_nick_name"`
ReceiverID int `json:"receiver_id"`
SearchContent string `json:"search_content"`
WholeContent string `json:"whole_content"`
Date string `json:"date"`
} `json:"massage_list"`
}
type SearchMessageByGroupResponse struct {
MessageList []struct {
ChatType int `json:"chat_type"`
MessageType int `json:"message_type"`
SenderNickName string `json:"sender_nick_name"`
SenderId int `json:"sender_id"`
SearchContent string `json:"search_content"`
WholeContent string `json:"whole_content"`
CommonMessage
Date string `json:"date"`
} `json:"massage_list"`
}
+13 -3
View File
@@ -5,10 +5,11 @@ type UserResponse struct {
Nickname string `json:"nick_name"`
UserId string `json:"user_id"`
CreateTime string `json:"create_time"`
IsBlock bool `json:"is_block"`
}
type GetUserRequest struct {
UserId string `form:"user_id"`
UserId string `form:"user_id" binding:"required"`
}
type GetUserResponse struct {
@@ -21,6 +22,8 @@ type GetUsersRequest struct {
type GetUsersResponse struct {
Users []*UserResponse `json:"users"`
UserNum int `json:"user_num"`
ResponsePagination
}
type ResignUserRequest struct {
@@ -38,20 +41,24 @@ type AlterUserResponse struct {
}
type AddUserRequest struct {
PhoneNumber string `json:"phone_number" binding:"required"`
UserId string `json:"user_id" binding:"required"`
Name string `json:"name" binding:"required"`
}
type AddUserResponse struct {
}
type BlockUserRequest struct {
UserId string `json:"user_id"`
UserId string `json:"user_id" binding:"required"`
EndDisableTime string `json:"end_disable_time" binding:"required"`
}
type BlockUserResponse struct {
}
type UnblockUserRequest struct {
UserId string `json:"user_id"`
UserId string `json:"user_id" binding:"required"`
}
type UnBlockUserResponse struct {
@@ -62,4 +69,7 @@ type GetBlockUsersRequest struct {
}
type GetBlockUsersResponse struct {
BlockUsers []UserResponse `json:"block_users"`
BlockUserNum int `json:"block_user_num"`
ResponsePagination
}