代码拉取完成,页面将自动刷新
package schema
import (
"gitee.com/linqwen/momo/base"
)
type DataSourceCreateDTO struct {
Alias string `gorm:"column:alias;not null" json:"Alias" form:"Alias" comment:"Alias"`
UserName string `gorm:"column:user_name" json:"UserName" form:"UserName" comment:"用户名"`
Password string `gorm:"column:password" json:"Password" form:"Password" comment:"密码"`
Host string `gorm:"column:host;not null" json:"Host" form:"Host" comment:"主机地址"`
Port int `gorm:"column:port" json:"Port" form:"Port" comment:"端口"`
DriverClass string `gorm:"column:driver_class" json:"DriverClass" form:"DriverClass" comment:"驱动类别"`
DbName string `gorm:"column:db_name" json:"DbName" form:"DbName" comment:"数据库名"`
Status int `gorm:"column:status" json:"Status" form:"Status" comment:"状态"`
}
type DataSourceQueryDTO struct {
Id int64 `gorm:"primaryKey;autoIncrement:false" json:"Id,string"`
Alias string `gorm:"column:alias;not null" json:"Alias" form:"Alias" comment:"Alias"`
UserName string `gorm:"column:user_name" json:"UserName" form:"UserName" comment:"用户名"`
Password string `gorm:"column:password" json:"Password" form:"Password" comment:"密码"`
Host string `gorm:"column:host;not null" json:"Host" form:"Host" comment:"主机地址"`
Port int `gorm:"column:port" json:"Port" form:"Port" comment:"端口"`
DriverClass string `gorm:"column:driver_class" json:"DriverClass" form:"DriverClass" comment:"驱动类别"`
DbName string `gorm:"column:db_name" json:"DbName" form:"DbName" comment:"数据库名"`
Status int `gorm:"column:status" json:"Status" form:"Status" comment:"状态"`
}
type DataSourceVO struct {
Id int64 `gorm:"primaryKey;autoIncrement:false" json:"Id,string"`
Alias string `gorm:"column:alias;not null" json:"Alias" form:"Alias" comment:"Alias"`
UserName string `gorm:"column:user_name" json:"UserName" form:"UserName" comment:"用户名"`
Password string `gorm:"column:password" json:"Password" form:"Password" comment:"密码"`
Host string `gorm:"column:host;not null" json:"Host" form:"Host" comment:"主机地址"`
Port int `gorm:"column:port" json:"Port" form:"Port" comment:"端口"`
DriverClass string `gorm:"column:driver_class" json:"DriverClass" form:"DriverClass" comment:"驱动类别"`
DbName string `gorm:"column:db_name" json:"DbName" form:"DbName" comment:"数据库名"`
Status int `gorm:"column:status" json:"Status" form:"Status" comment:"状态"`
CreatedAt base.ISO8601Time
UpdatedAt base.ISO8601Time
}
func (c DataSourceVO) GetDetailVO() interface{} { return c }
func (c DataSourceVO) GetListVO() interface{} {
return struct {
Id int64 `gorm:"primaryKey;autoIncrement:false" json:"Id,string"`
Alias string `gorm:"column:alias;not null" json:"Alias" form:"Alias" comment:"Alias"`
UserName string `gorm:"column:user_name" json:"UserName" form:"UserName" comment:"用户名"`
Host string `gorm:"column:host;not null" json:"Host" form:"Host" comment:"主机地址"`
Port int `gorm:"column:port" json:"Port" form:"Port" comment:"端口"`
DriverClass string `gorm:"column:driver_class" json:"DriverClass" form:"DriverClass" comment:"驱动类别"`
DbName string `gorm:"column:db_name" json:"DbName" form:"DbName" comment:"数据库名"`
Status int `gorm:"column:status" json:"Status" form:"Status" comment:"状态"`
}{
Id: c.Id,
Alias: c.Alias,
UserName: c.UserName,
Host: c.Host,
Port: c.Port,
DriverClass: c.DriverClass,
DbName: c.DbName,
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。