package logc
|
|
import "encoding/json"
|
|
type RuleServerLog struct {
|
ID string `gorm:"column:id;primaryKey;unique;autoIncrement" json:"id"` // 主键id
|
Name string `gorm:"column:name" json:"name"`
|
State string `gorm:"column:state" json:"state"`
|
TotalSuccess int `gorm:"column:totalSuccess" json:"totalSuccess"`
|
TotalFailure int `gorm:"column:totalFailure" json:"totalFailure"`
|
TotalCached string `gorm:"column:totalCached" json:"totalCached"`
|
LastSendDate string `gorm:"column:lastSendDate" json:"lastSendDate"`
|
CreateDate string `gorm:"column:createDate" json:"createDate"`
|
}
|
|
type RuleServerPushLog struct {
|
ID string // 主键id
|
TaskName string // 任务名称
|
Type int // 消息类型: 0 更新状态 1 成功+1 2 失败+1 3 缓存上报
|
Info string // 详情
|
}
|
|
func (l *RuleServerPushLog) Marshal() ([]byte, error) {
|
return json.Marshal(l)
|
}
|
|
func (l *RuleServerPushLog) Topic() string {
|
return RuleServerLogTopic
|
}
|