2025-06-28 16:16:28 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/cool"
|
2026-01-08 03:30:18 +08:00
|
|
|
"blazing/cool/coolconfig"
|
2025-06-28 16:16:28 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const TableNameServerList = "server_list"
|
|
|
|
|
|
2025-12-21 18:13:54 +00:00
|
|
|
// 服务器设置天气地图|地图是否显示其他人,设置异色概率|ip
|
2025-06-28 16:16:28 +08:00
|
|
|
// ServerList mapped from table <server_list>
|
|
|
|
|
type ServerList struct {
|
|
|
|
|
*cool.Model
|
2026-01-08 03:30:18 +08:00
|
|
|
coolconfig.ServerList
|
2026-01-08 05:15:10 +08:00
|
|
|
//isonline
|
|
|
|
|
IsOnline uint8 `gorm:"column:isonline;default:0;comment:'是否在线'" json:"isonline"`
|
2025-06-28 16:16:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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{})
|
|
|
|
|
}
|