feat(data): 重构颜色矩阵处理逻辑,将GlowFilter和相关功能迁移到common/data包
This commit is contained in:
38
modules/config/model/server_list.go
Normal file
38
modules/config/model/server_list.go
Normal 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{})
|
||||
}
|
||||
Reference in New Issue
Block a user