2026-04-18 15:30:00 +08:00
|
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
|
|
import "blazing/cool"
|
|
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
|
TableNameSptConfig = "config_spt"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// SptConfig SPT展示配置(仅保留前端展示必需字段)。
|
|
|
|
|
|
type SptConfig struct {
|
|
|
|
|
|
*BaseConfig
|
|
|
|
|
|
|
|
|
|
|
|
TaskID uint32 `gorm:"not null;uniqueIndex;comment:'SPT任务ID'" json:"task_id" description:"SPT任务ID"`
|
|
|
|
|
|
Title string `gorm:"type:varchar(64);not null;default:'';comment:'SPT名字'" json:"title" description:"SPT名字"`
|
2026-04-18 16:34:03 +08:00
|
|
|
|
PetID uint32 `gorm:"not null;default:0;comment:'SPT精灵ID'" json:"pet_id" description:"SPT精灵ID"`
|
|
|
|
|
|
Online int32 `gorm:"not null;default:1;comment:'是否开放(1开放/0未开放)'" json:"online" description:"是否开放"`
|
|
|
|
|
|
Level uint32 `gorm:"not null;default:1;comment:'SPT星级'" json:"level" description:"SPT星级"`
|
|
|
|
|
|
EnterID uint32 `gorm:"not null;default:0;comment:'进入地图ID'" json:"enter_id" description:"进入地图ID"`
|
2026-04-18 15:30:00 +08:00
|
|
|
|
Description string `gorm:"type:text;not null;default:'';comment:'SPT描述'" json:"description" description:"SPT描述"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (*SptConfig) TableName() string {
|
|
|
|
|
|
return TableNameSptConfig
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (*SptConfig) GroupName() string {
|
|
|
|
|
|
return "default"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func NewSptConfig() *SptConfig {
|
|
|
|
|
|
return &SptConfig{
|
|
|
|
|
|
BaseConfig: NewBaseConfig(),
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
cool.CreateTable(&SptConfig{})
|
|
|
|
|
|
}
|