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
|
2022-10-26 20:49:29 +08:00
|
|
|
|
|
2023-12-05 23:03:51 +08:00
|
|
|
|
Code string `json:"code"`
|
2022-07-23 16:41:04 +08:00
|
|
|
|
Name string `json:"name"`
|
2024-04-06 04:03:38 +00:00
|
|
|
|
Protocol int `json:"protocol"` // 连接协议 1.ssh 2.rdp
|
2023-12-05 23:03:51 +08:00
|
|
|
|
Ip string `json:"ip"` // IP地址
|
|
|
|
|
|
Port int `json:"port"` // 端口号
|
2022-07-23 16:41:04 +08:00
|
|
|
|
Status int8 `json:"status"` // 状态 1:启用;2:停用
|
|
|
|
|
|
Remark string `json:"remark"` // 备注
|
2023-03-06 16:59:57 +08:00
|
|
|
|
SshTunnelMachineId int `json:"sshTunnelMachineId"` // ssh隧道机器id
|
2022-08-29 21:43:24 +08:00
|
|
|
|
EnableRecorder int8 `json:"enableRecorder"` // 是否启用终端回放记录
|
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
|
|
|
|
)
|