2021-07-28 18:03:19 +08:00
|
|
|
|
package form
|
|
|
|
|
|
|
|
|
|
|
|
type DbForm struct {
|
2023-03-06 16:59:57 +08:00
|
|
|
|
Id uint64
|
|
|
|
|
|
Name string `binding:"required" json:"name"`
|
|
|
|
|
|
Type string `binding:"required" json:"type"` // 类型,mysql oracle等
|
|
|
|
|
|
Host string `binding:"required" json:"host"`
|
|
|
|
|
|
Port int `binding:"required" json:"port"`
|
|
|
|
|
|
Username string `binding:"required" json:"username"`
|
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
|
Params string `json:"params"`
|
|
|
|
|
|
Database string `json:"database"`
|
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
|
TagId uint64 `json:"tagId"`
|
|
|
|
|
|
TagPath string `json:"tagPath"`
|
|
|
|
|
|
SshTunnelMachineId int `json:"sshTunnelMachineId"`
|
2021-07-28 18:03:19 +08:00
|
|
|
|
}
|
2022-06-16 15:55:18 +08:00
|
|
|
|
|
2022-07-04 20:21:24 +08:00
|
|
|
|
type DbSqlSaveForm struct {
|
2023-02-13 21:11:16 +08:00
|
|
|
|
Name string `binding:"required"`
|
2022-07-04 20:21:24 +08:00
|
|
|
|
Sql string `binding:"required"`
|
|
|
|
|
|
Type int `binding:"required"`
|
|
|
|
|
|
Db string `binding:"required"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-06-16 15:55:18 +08:00
|
|
|
|
// 数据库SQL执行表单
|
|
|
|
|
|
type DbSqlExecForm struct {
|
|
|
|
|
|
Db string `binding:"required" json:"db"` //数据库名
|
|
|
|
|
|
Sql string `binding:"required" json:"sql"` // 执行sql
|
|
|
|
|
|
Remark string `json:"remark"` // 执行备注
|
|
|
|
|
|
}
|