30 lines
1.4 KiB
Go
30 lines
1.4 KiB
Go
package radio
|
|
|
|
import (
|
|
"sundynix-go/global"
|
|
"sundynix-go/model/system"
|
|
)
|
|
|
|
// RadioUser 小程序用户信息表
|
|
type RadioUser struct {
|
|
global.BaseModel
|
|
UserId string `gorm:"size:50;uniqueIndex" json:"userId"` // 关联system用户ID
|
|
OpenId string `gorm:"size:80;uniqueIndex" json:"openId"` // 微信openid
|
|
UnionId string `gorm:"size:80" json:"unionId"` // 微信unionid
|
|
SessionKey string `gorm:"size:200" json:"sessionKey"` // 会话密钥
|
|
NickName string `gorm:"size:50" json:"nickName"` // 昵称
|
|
AvatarId string `gorm:"size:50" json:"avatarId"` // 头像OSS ID
|
|
Avatar *system.Oss `gorm:"foreignKey:AvatarId" json:"avatar"` // 头像OSS
|
|
Gender int `gorm:"default:0" json:"gender"` // 性别 0:未知 1:男 2:女
|
|
Country string `gorm:"size:50" json:"country"` // 国家
|
|
Province string `gorm:"size:50" json:"province"` // 省份
|
|
City string `gorm:"size:50" json:"city"` // 城市
|
|
Language string `gorm:"size:20" json:"language"` // 语言
|
|
IsVip int `gorm:"default:0" json:"isVip"` // 是否VIP 0:否 1:是
|
|
VipExpireAt *int64 `gorm:"type:bigint" json:"vipExpireAt"` // VIP过期时间
|
|
}
|
|
|
|
func (RadioUser) TableName() string {
|
|
return "sundynix_radio_user"
|
|
}
|