2025-08-16 02:39:25 +00:00
|
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"blazing/cool"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
|
TableNameMonsterRefresh = "monster_refresh" // 怪物刷新规则表
|
|
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// MonsterRefresh 怪物刷新规则模型(对应XML中的<monster>标签)
|
|
|
|
|
|
type MonsterRefresh struct {
|
|
|
|
|
|
*cool.Model
|
2025-08-30 21:59:52 +08:00
|
|
|
|
|
|
|
|
|
|
MonsterID int32 `gorm:"not null;comment:'对应原怪物唯一编号'" json:"monster_id"`
|
|
|
|
|
|
ShinyID int32 `gorm:"not null;uniqueIndex;comment:'异色唯一标识ID'" json:"shiny_id"`
|
|
|
|
|
|
RefreshScript string `gorm:"type:text;not null;comment:'刷新脚本(JS格式,可包含时间/天气/地形等条件)'" json:"refresh_script"`
|
|
|
|
|
|
|
|
|
|
|
|
ShinyFilter string `gorm:"type:text;not null;comment:'异色滤镜效果(文本描述或配置参数)'" json:"shiny_filter"`
|
|
|
|
|
|
ShinyEffect string `gorm:"type:text;not null;comment:'异色光效效果(文本描述或配置参数)'" json:"shiny_effect"`
|
|
|
|
|
|
// TODO: 增加ruffle的显示异色效果
|
2025-08-16 02:39:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TableName MonsterRefresh's table name
|
|
|
|
|
|
func (*MonsterRefresh) TableName() string {
|
|
|
|
|
|
return TableNameMonsterRefresh
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GroupName MonsterRefresh's table group
|
|
|
|
|
|
func (*MonsterRefresh) GroupName() string {
|
|
|
|
|
|
return "default"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// NewMonsterRefresh create a new MonsterRefresh
|
|
|
|
|
|
func NewMonsterRefresh() *MonsterRefresh {
|
|
|
|
|
|
return &MonsterRefresh{
|
|
|
|
|
|
Model: cool.NewModel(),
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化表结构
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
|
|
|
|
|
|
cool.CreateTable(&MonsterRefresh{})
|
|
|
|
|
|
|
|
|
|
|
|
}
|