package models
|
|
import "basic.com/valib/logc.git"
|
|
type VaSystemLog logc.VaSystemLog
|
type VaSystemProcName struct {
|
ProcName string `gorm:"column:procName" json:"procName"`
|
Desc string `gorm:"column:desc" json:"desc"`
|
}
|
|
type VaSystemQuery struct {
|
TimeStart string `json:"timeStart" example:"2020-01-02 15:04:05"` // 开始时间,不传为结束时间前一个小时
|
TimeEnd string `json:"timeEnd" example:"2020-01-02 16:00:00"` // 结束时间,不传为当前时间
|
ProcName []string `json:"procName" example:"addCamera"` // 功能
|
Level int `json:"level"` // 日志级别
|
FuzzySearch string `json:"fuzzySearch" example:"启动"` // 模糊查询
|
Page int `json:"page" example:"2"` // 页码
|
PageSize int `json:"pageSize" example:"20"` // 分页大小
|
}
|
|
func (VaSystemLog) TableName() string {
|
return "t_vasystem_log"
|
}
|
|
func (v *VaSystemLog) Insert() error {
|
|
result := db.Table(v.TableName()).Create(&v)
|
|
return result.Error
|
}
|