refactor: 重构签到系统和战斗特效逻辑
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
)
|
||||
import "blazing/cool"
|
||||
|
||||
const TableNameSignIn = "config_sign_in"
|
||||
|
||||
// SignIn 签到活动配置表。
|
||||
const (
|
||||
SignTypeTotal uint32 = 1
|
||||
SignTypeContinuous uint32 = 2
|
||||
)
|
||||
|
||||
// SignIn 签到阶段配置表。
|
||||
type SignIn struct {
|
||||
*cool.Model
|
||||
SignInID uint32 `gorm:"not null;index:idx_sign_in_id;comment:'签到活动ID'" json:"sign_in_id"`
|
||||
Status uint32 `gorm:"not null;default:0;comment:'签到状态(0-未启用 1-启用)'" json:"status"`
|
||||
RewardScript string `gorm:"type:varchar(2048);default:'';comment:'签到奖励配置(JSON)'" json:"reward_script"`
|
||||
*BaseConfig
|
||||
SignType uint32 `gorm:"not null;default:1;uniqueIndex:idx_sign_type_stage;comment:'签到类别(1-累计 2-连续)'" json:"sign_type"`
|
||||
StageDays uint32 `gorm:"not null;default:1;uniqueIndex:idx_sign_type_stage;comment:'签到阶段天数(1/3/7/14/30)'" json:"stage_days"`
|
||||
CdkID uint32 `gorm:"not null;uniqueIndex;comment:'绑定的CDK配置ID'" json:"cdk_id"`
|
||||
}
|
||||
|
||||
func (*SignIn) TableName() string {
|
||||
@@ -23,7 +26,7 @@ func (*SignIn) GroupName() string {
|
||||
}
|
||||
|
||||
func NewSignIn() *SignIn {
|
||||
return &SignIn{Model: cool.NewModel()}
|
||||
return &SignIn{BaseConfig: NewBaseConfig()}
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user