zhangzengfei
2022-01-24 d329992729098670124003a8f8558c9447981e7c
系统日志添加创建时间
1个文件已修改
15 ■■■■ 已修改文件
vaSystemLog.go 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vaSystemLog.go
@@ -3,13 +3,14 @@
import "encoding/json"
type VaSystemLog struct {
    ID        string `gorm:"column:id;primaryKey;unique;autoIncrement" json:"id"` // 主键id
    HostName  string `gorm:"column:hostName" json:"hostName"`                     // 主机名
    ProcName  string `gorm:"column:procName" json:"procName"`                     // 进程名
    ProcID    string `gorm:"column:procID" json:"procID"`                         // 进程pid
    Level     int    `gorm:"column:level" json:"level"`                           // 日志等级
    Info      string `gorm:"column:info" json:"info"`                             // 详情
    Timestamp int64  `gorm:"column:timestamp" json:"timestamp"`                   // 时间戳Unix time
    ID         string `gorm:"column:id;primaryKey;unique;autoIncrement" json:"id"` // 主键id
    HostName   string `gorm:"column:hostName" json:"hostName"`                     // 主机名
    ProcName   string `gorm:"column:procName" json:"procName"`                     // 进程名
    ProcID     string `gorm:"column:procID" json:"procID"`                         // 进程pid
    Level      int    `gorm:"column:level" json:"level"`                           // 日志等级
    Info       string `gorm:"column:info" json:"info"`                             // 详情
    Timestamp  int64  `gorm:"column:timestamp" json:"timestamp"`                   // 时间戳
    CreateDate string `gorm:"column:createDate" json:"createDate"`                 // 创建时间
}
func (v *VaSystemLog) Marshal() ([]byte, error) {