Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
DB 数据库全局变量
Functions ¶
Types ¶
type ChatModel ¶
type ChatModel struct { BaseModel SenderUID uint64 `gorm:"column:sender_uid" json:"sender_uid"` ReceiverUID uint64 `gorm:"column:receiver_uid" json:"receiver_uid"` LastMsgID int `gorm:"column:last_msg_id" json:"last_msg_id"` MsgNum int `gorm:"column:msg_num" json:"msg_num"` IsDelete int `gorm:"column:is_delete" json:"is_delete"` Extra string `gorm:"column:extra" json:"extra"` }
type ChatMsgModel ¶
type ChatMsgModel struct { ID uint64 `gorm:"primary_key;AUTO_INCREMENT;column:id" json:"id"` ChatID uint64 `gorm:"column:chat_id" json:"chat_id"` MsgID uint64 `gorm:"column:msg_id" json:"msg_id"` }
func (*ChatMsgModel) TableName ¶
func (c *ChatMsgModel) TableName() string
TableName sets the insert table name for this struct type
type MsgModel ¶
type MsgModel struct { BaseModel ChatID uint64 `gorm:"column:chat_id" json:"chat_id"` Content string `gorm:"column:content" json:"content"` Extra string `gorm:"column:extra" json:"extra"` LocalMid uint64 `gorm:"column:local_mid" json:"local_mid"` MsgType int `gorm:"column:msg_type" json:"msg_type"` ReceiveType int `gorm:"column:receive_type" json:"receive_type"` UserID uint64 `gorm:"column:user_id" json:"user_id"` }
type SendMsgInput ¶
type SendMsgInput struct { UserId uint64 `json:"user_id"` YUserId uint64 `json:"y_user_id"` ChatId uint64 `json:"chat_id"` LocalMId uint64 `json:"local_m_id"` MsgType int `json:"msg_type"` ReceiveType int `json:"receive_type"` Content string `json:"content"` Width int `json:"width"` Height int `json:"height"` Duration int `json:"duration"` ClassId uint64 `json:"class_id"` }
type UserBaseModel ¶
type UserBaseModel struct { BaseModel Phone int64 `gorm:"column:phone" json:"phone"` Username string `gorm:"column:username" json:"username"` Avatar string `gorm:"column:avatar" json:"avatar"` Password string `gorm:"column:password" json:"password"` OpenID string `gorm:"column:open_id" json:"open_id, omitempty"` UnionID string `gorm:"column:union_id" json:"union_id, omitempty"` Sex int `gorm:"column:sex" json:"sex"` PostCount int `gorm:"column:post_count" json:"post_count"` CommentCount int `gorm:"column:comment_count" json:"comment_count"` ReplyCount int `gorm:"column:reply_count" json:"reply_count"` ClassCount int `gorm:"column:class_count" json:"class_count"` FollowingCount int `gorm:"column:following_count" json:"following_count"` FollowerCount int `gorm:"column:follower_count" json:"follower_count"` Status int `gorm:"column:status" json:"status"` LastLoginIP string `gorm:"column:last_login_ip" json:"last_login_ip"` LastLoginTime time.Time `gorm:"column:last_login_time" json:"last_login_time"` }
func (*UserBaseModel) TableName ¶
func (u *UserBaseModel) TableName() string
TableName sets the insert table name for this struct type
type UserChatModel ¶
type UserChatModel struct { Id uint64 `gorm:"primary_key;AUTO_INCREMENT;column:id" json:"id"` ChatID uint64 `gorm:"column:chat_id" json:"chat_id"` ClearMsgID uint64 `gorm:"column:clear_msg_id" json:"clear_msg_id"` DelMsgID uint64 `gorm:"column:del_msg_id" json:"del_msg_id"` Extra string `gorm:"column:extra" json:"extra"` LastMsgID uint64 `gorm:"column:last_msg_id" json:"last_msg_id"` MsgNum int `gorm:"column:msg_num" json:"msg_num"` UserID uint64 `gorm:"column:user_id" json:"user_id"` YUserID uint64 `gorm:"column:yuser_id" json:"yuser_id"` }
func (*UserChatModel) TableName ¶
func (u *UserChatModel) TableName() string
TableName sets the insert table name for this struct type
type UserInfo ¶
type UserInfo struct { Id uint64 `json:"id"` Phone int `json:"phone"` Username string `json:"username"` Avatar string `json:"avatar"` Sex int `json:"sex"` PostCount int `json:"post_count"` CommentCount int `json:"comment_count"` ReplyCount int `json:"reply_count"` FeedCount int `json:"feed_count"` FollowingCount int `json:"following_count"` FollowerCount int `json:"follower_count"` ClassCount int `json:"class_count"` // 总班级数 LikeCount int `json:"like_count"` // 总的喜欢数 PointCount int `json:"point_count"` // 总的斑点数 ActivityCount int `json:"activity_count"` // 活动数 IsFollow int `json:"is_follow"` // 是否关注用户 IsFollowed int `json:"is_followed"` // 是否被粉丝关注 InviteStatus int `json:"invite_status"` // 邀请状态(在班级中邀请的)) CreatedAt string `json:"created_at"` }
Click to show internal directories.
Click to hide internal directories.