feat: 实现每日签到功能并优化战斗和道具逻辑
This commit is contained in:
31
modules/config/model/sign.go
Normal file
31
modules/config/model/sign.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
)
|
||||
|
||||
const TableNameSignIn = "config_sign_in"
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (*SignIn) TableName() string {
|
||||
return TableNameSignIn
|
||||
}
|
||||
|
||||
func (*SignIn) GroupName() string {
|
||||
return "default"
|
||||
}
|
||||
|
||||
func NewSignIn() *SignIn {
|
||||
return &SignIn{Model: cool.NewModel()}
|
||||
}
|
||||
|
||||
func init() {
|
||||
cool.CreateTable(&SignIn{})
|
||||
}
|
||||
Reference in New Issue
Block a user