yanghui
2021-06-16 584e19a2cd83a305c14ad7460e97bf4e49805fff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package logc
 
import "encoding/json"
 
type ScheduleLog struct {
    ID        string `gorm:"column:id;primaryKey;unique;autoIncrement" json:"id"` // 主键id
    Timestamp int64  `gorm:"column:timestamp" json:"timestamp"`                   // 时间戳Unix time
    ProcName  string `gorm:"column:procName" json:"procName"`
    ProcID    string `gorm:"column:procID" json:"procID"`
    Level     int    `gorm:"column:level" json:"level"`       // 日志等级
    Type      int    `gorm:"column:type" json:"type"`         // 操作类型:人工操作,登录退出,轮循摄像机及对应算法,数据栈处理情况,异常情况等
    Info      string `gorm:"column:info" json:"info"`         // 详情
}
 
func (l * ScheduleLog)Marshal()([]byte, error) {
    return json.Marshal(l)
}
 
func (l * ScheduleLog)Topic() string {
    return ScheduleLogTopic
}