25 lines
1.3 KiB
Go
25 lines
1.3 KiB
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
|
)
|
|
|
|
// MonitorConfig 监控配置 结构体
|
|
type MonitorConfig struct {
|
|
global.GVA_MODEL
|
|
BusinessDB *string `json:"businessDB" form:"businessDB" gorm:"column:business_db;comment:;"` //业务库名
|
|
Database *string `json:"database" form:"database" gorm:"column:database;comment:;" binding:"required"` //数据库名
|
|
Table *string `json:"table" form:"table" gorm:"column:db_table;comment:;" binding:"required"` //表名
|
|
Columns []string `json:"columns" form:"columns" gorm:"column:columns;type:json;serializer:json;comment:;" binding:"required"` //字段
|
|
IsEnable *bool `json:"isEnable" form:"isEnable" gorm:"column:is_enable;comment:;" binding:"required"` //是否启用
|
|
StartTime *time.Time `json:"startTime" form:"startTime" gorm:"column:start_time;comment:;"` //开始时间
|
|
EndTime *time.Time `json:"endTime" form:"endTime" gorm:"column:end_time;comment:;"` //结束时间
|
|
}
|
|
|
|
// TableName 监控配置 MonitorConfig自定义表名 monitor_config
|
|
func (MonitorConfig) TableName() string {
|
|
return "monitor_config"
|
|
}
|