feat(config): 添加服务器登录配置字段和商店商品ID字段

- 在ServerList模型中新增LoginAddr、Account、Password字段用于服务器登录配置
- 在Shiny模型中新增VoteCount字段用于记录投票次数
- 在ShopConfig模型中新增ProductID字段作为商品唯一标识
- 移除ShopConfig中不必要的CategoryID、IconURL、时间验证相关字段
- 删除ShopConfig的Validate和时间验证相关方法,简化模型
This commit is contained in:
2026-01-05 01:04:52 +08:00
parent 9c3fadbd9c
commit 43bec155e1
6 changed files with 72 additions and 98 deletions

View File

@@ -10,10 +10,16 @@ const TableNameServerList = "server_list"
// ServerList mapped from table <server_list>
type ServerList struct {
*cool.Model
OnlineID uint16 `gorm:"column:online_id;comment:'在线ID';uniqueIndex" json:"online_id"`
IP string `gorm:"type:string;comment:'服务器IP'" json:"ip"`
Port uint16 `gorm:"comment:'端口号,通常是小整数'" json:"port"`
IsOpen bool `gorm:"default:true;not null;comment:'服务器是否开启,默认为开启状态'" json:"is_open"`
OnlineID uint16 `gorm:"column:online_id;comment:'在线ID';uniqueIndex" json:"online_id"`
IP string `gorm:"type:string;comment:'服务器IP'" json:"ip"`
Port uint16 `gorm:"comment:'端口号,通常是小整数'" json:"port"`
IsOpen bool `gorm:"default:true;not null;comment:'服务器是否开启,默认为开启状态'" json:"is_open"`
//登录地址
LoginAddr string `gorm:"type:string;comment:'登录地址'" json:"login_addr"`
//账号
Account string `gorm:"type:string;comment:'账号'" json:"account"`
//密码
Password string `gorm:"type:string;comment:'密码'" json:"password"`
CanPort []uint32 `gorm:"type:jsonb;comment:'可连接端口'" json:"can_port"`
IsVip uint32 `gorm:"default:0;not null;comment:'是否为VIP服务器'" json:"is_vip"`
//服务器异色概率设定ServerList