🎉 first commit

This commit is contained in:
李寻欢
2023-09-21 17:33:59 +08:00
commit 744fb7b1d0
18 changed files with 648 additions and 0 deletions

36
model/friend.go Normal file
View File

@@ -0,0 +1,36 @@
package model
// FriendItem
// @description: 好友列表数据
type FriendItem 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"` // 微信原始Id
}
// GroupUser
// @description: 群成员返回结果
type GroupUser struct {
Admin string `json:"admin"` // 群主微信
AdminNickname string `json:"adminNickname"` // 群主昵称
ChatRoomId string `json:"chatRoomId"` // 群Id
MemberNickname string `json:"memberNickname"` // 成员昵称 `^G`切割
Members string `json:"members"` // 成员Id `^G`切割
}
// ContactProfile
// @description: 好友资料
type ContactProfile struct {
Account string `json:"account"` // 账号
HeadImage string `json:"headImage"` // 头像
Nickname string `json:"nickname"` // 昵称
V3 string `json:"v3"` // v3
Wxid string `json:"wxid"` // 微信Id
}

18
model/message.go Normal file
View File

@@ -0,0 +1,18 @@
package model
import "go-wechat/types"
// Message
// @description: 消息
type Message struct {
MsgId int64 `json:"msgId" gorm:"primarykey"`
CreateTime int `json:"createTime"`
Content string `json:"content"`
DisplayFullContent string `json:"displayFullContent" gorm:"-"`
FromUser string `json:"fromUser"`
MsgSequence int `json:"msgSequence"`
Pid int `json:"pid"`
Signature string `json:"signature"`
ToUser string `json:"toUser"`
Type types.MessageType `json:"type"`
}

9
model/response.go Normal file
View File

@@ -0,0 +1,9 @@
package model
// Response
// @description: 基础返回结构体
type Response[T any] struct {
Code int `json:"code"` // 状态码
Data T `json:"data"` // 数据
Msg string `json:"msg"` // 消息
}