Files
mayfly-go/server/internal/db/domain/entity/query.go

43 lines
1.2 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 entity
import "mayfly-go/pkg/model"
// 数据库实例查询
type InstanceQuery struct {
model.Model
Name string `orm:"column(name)" json:"name" form:"name"`
Type string `orm:"column(type)" json:"type"` // 类型mysql oracle等
Host string `orm:"column(host)" json:"host"`
Port int `orm:"column(port)" json:"port"`
Network string `orm:"column(network)" json:"network"`
Username string `orm:"column(username)" json:"username"`
Password string `orm:"column(password)" json:"-"`
Params string `orm:"column(params)" json:"params"`
Remark string `orm:"column(remark)" json:"remark"`
}
// 数据库查询实体,不与数据库表字段一一对应
type DbQuery struct {
model.Model
Name string `orm:"column(name)" json:"name"`
Database string `orm:"column(database)" json:"database"`
Remark string `json:"remark"`
TagIds []uint64 `orm:"column(tag_id)"`
TagPath string `form:"tagPath"`
InstanceId uint64 `form:"instanceId"`
}
type DbSqlExecQuery struct {
Id uint64 `json:"id" form:"id"`
DbId uint64 `json:"dbId" form:"dbId"`
Db string `json:"db" form:"db"`
Table string `json:"table" form:"table"`
Type int8 `json:"type" form:"type"` // 类型
CreatorId uint64
}