|
@@ -10,15 +10,16 @@ import (
|
|
)
|
|
)
|
|
|
|
|
|
type User struct {
|
|
type User struct {
|
|
- ID int `json:"id" db:"id"`
|
|
|
|
- CreateTime time.Time `json:"create_time" db:"create_time"`
|
|
|
|
- UserID string `json:"user_id" db:"user_id"`
|
|
|
|
- FriendIDs json.RawMessage `json:"friend_ids" db:"friend_ids"` // 使用json.RawMessage处理JSON数据
|
|
|
|
- Head string `json:"head" db:"head"`
|
|
|
|
- Coin int `json:"coin" db:"coin"`
|
|
|
|
- Name string `json:"name" db:"name"`
|
|
|
|
- Account string `json:"account" db:"account"`
|
|
|
|
- Password string `json:"-" db:"password"` // json:"-" 表示不序列化密码
|
|
|
|
|
|
+ ID int `json:"id" db:"id"`
|
|
|
|
+ CreateTime time.Time `json:"create_time" db:"create_time"`
|
|
|
|
+ UserID string `json:"user_id" db:"user_id"`
|
|
|
|
+ FriendIDs json.RawMessage `json:"friend_ids" db:"friend_ids"` // 使用json.RawMessage处理JSON数据
|
|
|
|
+ Head string `json:"head" db:"head"`
|
|
|
|
+ Coin int `json:"coin" db:"coin"`
|
|
|
|
+ Name string `json:"name" db:"name"`
|
|
|
|
+ Account string `json:"account" db:"account"`
|
|
|
|
+ Password string `json:"-" db:"password"` // json:"-" 表示不序列化密码
|
|
|
|
+ OnlineStatus int `json:"online_status" db:"online_status"`
|
|
}
|
|
}
|
|
|
|
|
|
// GetUsersByIDs 根据用户ID数组批量获取用户信息
|
|
// GetUsersByIDs 根据用户ID数组批量获取用户信息
|