init: radio init commit

This commit is contained in:
Blizzard
2026-02-28 15:56:26 +08:00
parent fc585fa4df
commit d79beb4663
63 changed files with 2540 additions and 6399 deletions
+29
View File
@@ -0,0 +1,29 @@
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"
}