2021-05-08 18:00:33 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2022-06-02 17:41:11 +08:00
|
|
|
|
"mayfly-go/pkg/model"
|
2021-05-08 18:00:33 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
type Machine struct {
|
|
|
|
|
|
model.Model
|
2025-01-18 13:43:01 +08:00
|
|
|
|
model.ExtraData
|
2022-10-26 20:49:29 +08:00
|
|
|
|
|
2025-02-13 21:11:23 +08:00
|
|
|
|
Code string `json:"code" gorm:"size:32;comment:code"` // code
|
|
|
|
|
|
Name string `json:"name" gorm:"size:32"` // 名称
|
|
|
|
|
|
Protocol int `json:"protocol" gorm:"default:1;comment:连接协议 1.ssh 2.rdp"` // 连接协议 1.ssh 2.rdp
|
|
|
|
|
|
Ip string `json:"ip" gorm:"not null;size:100;comment:IP地址"` // IP地址
|
|
|
|
|
|
Port int `json:"port" gorm:"not null;comment:端口号"` // 端口号
|
|
|
|
|
|
Status int8 `json:"status" gorm:"not null;default:1;comment:状态 1:启用;2:停用"` // 状态 1:启用;2:停用
|
|
|
|
|
|
Remark string `json:"remark" gorm:"comment:备注"` // 备注
|
|
|
|
|
|
SshTunnelMachineId int `json:"sshTunnelMachineId" gorm:"comment:ssh隧道机器id"` // ssh隧道机器id
|
|
|
|
|
|
EnableRecorder int8 `json:"enableRecorder" gorm:"comment:是否启用终端回放记录"` // 是否启用终端回放记录
|
2021-05-08 18:00:33 +08:00
|
|
|
|
}
|
2022-04-27 10:59:02 +08:00
|
|
|
|
|
|
|
|
|
|
const (
|
2023-03-06 16:59:57 +08:00
|
|
|
|
MachineStatusEnable int8 = 1 // 启用状态
|
|
|
|
|
|
MachineStatusDisable int8 = -1 // 禁用状态
|
2024-04-06 04:03:38 +00:00
|
|
|
|
|
|
|
|
|
|
MachineProtocolSsh = 1
|
|
|
|
|
|
MachineProtocolRdp = 2
|
2024-04-29 12:50:49 +08:00
|
|
|
|
MachineProtocolVnc = 3
|
2022-04-27 10:59:02 +08:00
|
|
|
|
)
|