35 lines
821 B
Go
35 lines
821 B
Go
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名字"`
|
||
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{})
|
||
}
|