Files
bl/modules/blazing/model/sign.go
昔念 174562b895 ```
feat(config): 重构配置结构并添加服务器列表支持

- 重命名PortBL字段为GameOnlineID,改进命名语义
- 添加ServerList结构体用于管理服务器配置
- 移除七牛云配置相关字段
- 更新ID生成器使用GameOnlineID参数

fix(server): 调整服务器启动参数和VIP逻辑

- 将启动参数从-port改为-id,统一参数命名
- 更新服务器启动逻辑,基于GameOnlineID获取服务器信息
- 为VIP服务器启用调试模式
- 优化端口可用性检查逻辑

refactor(model): 统一模型基类结构

- 将各模型中的*cool.Model嵌入改为Base基类
- 移除soul.go
2026-01-08 03:30:18 +08:00

45 lines
1.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"blazing/cool"
)
// 表名常量(遵循小写+下划线的命名规范)
const TableNameSignInRecord = "player_sign_in_record"
// SignInRecord 玩家签到明细记录表
// 记录玩家每一次的签到行为,关联签到活动表
type SignInRecord struct {
Base
// 核心关联字段
PlayerID uint32 `gorm:"not null;index:idx_player_id;comment:'玩家ID'" json:"player_id"`
SignInID uint32 `gorm:"not null;index:idx_sign_in_id;comment:'关联的签到活动ID对应player_sign_in表的SignInID'" json:"sign_in_id"`
IsCompleted bool `gorm:"not null;default:false;comment:'签到是否完成0-未完成 1-已完成)'" json:"is_completed"`
//通过bitset来实现签到的进度记录
SignInProgress []uint32 `gorm:"type:json;not null;comment:'签到进度(状压实现,存储每日签到状态)'" json:"sign_in_progress"`
}
// TableName 指定表名(遵循现有规范)
func (*SignInRecord) TableName() string {
return TableNameSignInRecord
}
// GroupName 指定表分组与现有表保持一致的default分组
func (*SignInRecord) GroupName() string {
return "default"
}
// NewSignInRecord 创建签到明细记录实例初始化基础Model
func NewSignInRecord() *SignInRecord {
return &SignInRecord{
Base: *NewBase(),
}
}
// init 程序启动时自动创建表与现有SignIn表初始化逻辑一致
func init() {
cool.CreateTable(&SignInRecord{})
}