uniugm/admin/apps/game/model/server.go
2025-04-28 15:56:04 +08:00

35 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"admin/internal/db"
"time"
)
func init() {
db.RegisterTableModels(Server{})
}
// Server 逻辑服
type Server struct {
ID int `gorm:"primarykey" readonly:"true"`
ProjectId string `gorm:"type:varchar(200);uniqueIndex:idx_server"`
ServerConfID string `gorm:"type:varchar(200);uniqueIndex:idx_server" name:"区服id" required:"true" uneditable:"true"`
Desc string `name:"描述"`
// command_list接口服务器地址为空代表由由项目统一提供command_list.
// 取决于每个项目改造难度:
// 为空就代表项目要实现一个自己统一对外暴露的gm调用服务对内聚合、分发指令执行本后台执行指令只调用一次
// 不为空就代表command_list实现在各个逻辑服由本后台系统在执行指令时聚合、分发指令
// 调用各个逻辑服执行,本后台执行指令需要根据逻辑服数量调用;
//ApiAddr string
CreatedAt time.Time `readonly:"true"`
}
func (lm *Server) TableName() string {
return "server"
}
func (m *Server) GetId() int {
return m.ID
}