feat(data): 重构颜色矩阵处理逻辑,将GlowFilter和相关功能迁移到common/data包

This commit is contained in:
1
2025-12-21 17:18:33 +00:00
parent 90fdb49b92
commit 5965c8319a
50 changed files with 1079 additions and 207 deletions

View File

@@ -0,0 +1,38 @@
package model
import (
"blazing/cool"
)
const TableNameServerList = "server_list"
// ServerList mapped from table <server_list>
type ServerList struct {
*cool.Model
OnlineID uint16 `gorm:"column:online_id;comment:'在线ID';uniqueIndex" json:"online_id"`
//IP string `gorm:"type:varchar(16);comment:'服务器IP'" json:"ip"`
Port uint16 `gorm:"comment:'端口号,通常是小整数'" json:"port"`
//IsOpen bool `gorm:"default:true;not null;comment:'服务器是否开启,默认为开启状态'" json:"is_open"`
}
// TableName ServerList's table name
func (*ServerList) TableName() string {
return TableNameServerList
}
// GroupName ServerList's table group
func (*ServerList) GroupName() string {
return "default"
}
// NewServerList create a new ServerList
func NewServerList() *ServerList {
return &ServerList{
Model: cool.NewModel(),
}
}
// init 创建表
func init() {
cool.CreateTable(&ServerList{})
}