You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
4.5 KiB
92 lines
4.5 KiB
package db
|
|
|
|
import "time"
|
|
|
|
type Friend struct {
|
|
OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"`
|
|
FriendUserID string `gorm:"column:friend_user_id;primary_key;size:64"`
|
|
Remark string `gorm:"column:remark;size:255"`
|
|
CreateTime time.Time `gorm:"column:create_time"`
|
|
AddSource int32 `gorm:"column:add_source"`
|
|
OperatorUserID string `gorm:"column:operator_user_id;size:64"`
|
|
Ex string `gorm:"column:ex;size:1024"`
|
|
}
|
|
|
|
type FriendRequest struct {
|
|
FromUserID string `gorm:"column:from_user_id;primary_key;size:64"`
|
|
ToUserID string `gorm:"column:to_user_id;primary_key;size:64"`
|
|
HandleResult int32 `gorm:"column:handle_result"`
|
|
ReqMsg string `gorm:"column:req_msg;size:255"`
|
|
CreateTime time.Time `gorm:"column:create_time"`
|
|
HandlerUserID string `gorm:"column:handler_user_id;size:64"`
|
|
HandleMsg string `gorm:"column:handle_msg;size:255"`
|
|
HandleTime time.Time `gorm:"column:handle_time"`
|
|
Ex string `gorm:"column:ex;size:1024"`
|
|
}
|
|
|
|
func (FriendRequest) TableName() string {
|
|
return "friend_requests"
|
|
}
|
|
|
|
type Group struct {
|
|
GroupID string `gorm:"column:group_id;primary_key;size:64" json:"groupID" binding:"required"`
|
|
GroupName string `gorm:"column:name;size:255" json:"groupName"`
|
|
Notification string `gorm:"column:notification;size:255" json:"notification"`
|
|
Introduction string `gorm:"column:introduction;size:255" json:"introduction"`
|
|
FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"`
|
|
CreateTime time.Time `gorm:"column:create_time;index:create_time"`
|
|
Ex string `gorm:"column:ex" json:"ex;size:1024"`
|
|
Status int32 `gorm:"column:status"`
|
|
CreatorUserID string `gorm:"column:creator_user_id;size:64"`
|
|
GroupType int32 `gorm:"column:group_type"`
|
|
NeedVerification int32 `gorm:"column:need_verification"`
|
|
LookMemberInfo int32 `gorm:"column:look_member_info" json:"lookMemberInfo"`
|
|
ApplyMemberFriend int32 `gorm:"column:apply_member_friend" json:"applyMemberFriend"`
|
|
NotificationUpdateTime time.Time `gorm:"column:notification_update_time"`
|
|
NotificationUserID string `gorm:"column:notification_user_id;size:64"`
|
|
}
|
|
|
|
type GroupMember struct {
|
|
GroupID string `gorm:"column:group_id;primary_key;size:64"`
|
|
UserID string `gorm:"column:user_id;primary_key;size:64"`
|
|
Nickname string `gorm:"column:nickname;size:255"`
|
|
FaceURL string `gorm:"column:user_group_face_url;size:255"`
|
|
RoleLevel int32 `gorm:"column:role_level"`
|
|
JoinTime time.Time `gorm:"column:join_time"`
|
|
JoinSource int32 `gorm:"column:join_source"`
|
|
InviterUserID string `gorm:"column:inviter_user_id;size:64"`
|
|
OperatorUserID string `gorm:"column:operator_user_id;size:64"`
|
|
MuteEndTime time.Time `gorm:"column:mute_end_time"`
|
|
Ex string `gorm:"column:ex;size:1024"`
|
|
}
|
|
|
|
type GroupRequest struct {
|
|
UserID string `gorm:"column:user_id;primary_key;size:64"`
|
|
GroupID string `gorm:"column:group_id;primary_key;size:64"`
|
|
HandleResult int32 `gorm:"column:handle_result"`
|
|
ReqMsg string `gorm:"column:req_msg;size:1024"`
|
|
HandledMsg string `gorm:"column:handle_msg;size:1024"`
|
|
ReqTime time.Time `gorm:"column:req_time"`
|
|
HandleUserID string `gorm:"column:handle_user_id;size:64"`
|
|
HandledTime time.Time `gorm:"column:handle_time"`
|
|
JoinSource int32 `gorm:"column:join_source"`
|
|
InviterUserID string `gorm:"column:inviter_user_id;size:64"`
|
|
Ex string `gorm:"column:ex;size:1024"`
|
|
}
|
|
|
|
type User struct {
|
|
UserID string `gorm:"column:user_id;primary_key;size:64"`
|
|
Nickname string `gorm:"column:name;size:255"`
|
|
FaceURL string `gorm:"column:face_url;size:255"`
|
|
Gender int32 `gorm:"column:gender"`
|
|
PhoneNumber string `gorm:"column:phone_number;size:32"`
|
|
Birth time.Time `gorm:"column:birth"`
|
|
Email string `gorm:"column:email;size:64"`
|
|
Ex string `gorm:"column:ex;size:1024"`
|
|
CreateTime time.Time `gorm:"column:create_time;index:create_time"`
|
|
AppMangerLevel int32 `gorm:"column:app_manger_level"`
|
|
GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"`
|
|
|
|
status int32 `gorm:"column:status"`
|
|
}
|