- 替换 Beego 框架为 GoFrame v2 - 重构项目结构: controller/service/dao/middleware 分层 - 替换自定义 crons 包为 gcron - 模板从 views/ 迁移到 resource/template/ - 配置从 conf/app.conf 迁移到 config.yml - 数据库从 MySQL 切换为 SQLite (modernc.org/sqlite) - 移除 agent/ 远程执行器(待后续迁移) - 移除 crons/ 自定义定时器包 - 静态资源整理到 resource/static/
47 lines
1.9 KiB
Go
47 lines
1.9 KiB
Go
package entity
|
|
|
|
// TaskServer 执行服务器
|
|
type TaskServer struct {
|
|
Id int `orm:"id" json:"id"`
|
|
GroupId int `orm:"group_id" json:"groupId"`
|
|
ConnectionType int `orm:"connection_type" json:"connectionType"`
|
|
ServerName string `orm:"server_name" json:"serverName"`
|
|
ServerAccount string `orm:"server_account" json:"serverAccount"`
|
|
ServerOuterIp string `orm:"server_outer_ip" json:"serverOuterIp"`
|
|
ServerIp string `orm:"server_ip" json:"serverIp"`
|
|
Port int `orm:"port" json:"port"`
|
|
Password string `orm:"password" json:"-"`
|
|
PrivateKeySrc string `orm:"private_key_src" json:"privateKeySrc"`
|
|
PublicKeySrc string `orm:"public_key_src" json:"publicKeySrc"`
|
|
Type int `orm:"type" json:"type"`
|
|
Detail string `orm:"detail" json:"detail"`
|
|
CreateTime int64 `orm:"create_time" json:"createTime"`
|
|
UpdateTime int64 `orm:"update_time" json:"updateTime"`
|
|
Status int `orm:"status" json:"status"`
|
|
}
|
|
|
|
// TaskServerCols 字段常量
|
|
var TaskServerCols = struct {
|
|
Id, GroupId, ConnectionType, ServerName, ServerAccount string
|
|
ServerOuterIp, ServerIp, Port, Password string
|
|
PrivateKeySrc, PublicKeySrc, Type, Detail string
|
|
CreateTime, UpdateTime, Status string
|
|
}{
|
|
Id: "id",
|
|
GroupId: "group_id",
|
|
ConnectionType: "connection_type",
|
|
ServerName: "server_name",
|
|
ServerAccount: "server_account",
|
|
ServerOuterIp: "server_outer_ip",
|
|
ServerIp: "server_ip",
|
|
Port: "port",
|
|
Password: "password",
|
|
PrivateKeySrc: "private_key_src",
|
|
PublicKeySrc: "public_key_src",
|
|
Type: "type",
|
|
Detail: "detail",
|
|
CreateTime: "create_time",
|
|
UpdateTime: "update_time",
|
|
Status: "status",
|
|
}
|