yanghui
2021-04-27 1cdf9c1408fc13df677e9f738e59fe46df86fc20
scheduleLog.go
@@ -1,5 +1,7 @@
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
@@ -9,3 +11,11 @@
   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
}