From 59ac3141ef3e9eb741c2927a7adfd3cb52b21741 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 31 八月 2021 15:03:39 +0800
Subject: [PATCH] use fjt c_bhomebus

---
 operationlog.go |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/operationlog.go b/operationlog.go
index 083e228..980a9d0 100644
--- a/operationlog.go
+++ b/operationlog.go
@@ -1,5 +1,7 @@
 package logc
 
+import "encoding/json"
+
 type OperationLog struct {
 	ID        string `gorm:"column:id;primaryKey;unique;autoIncrement" json:"id"` // 涓婚敭id
 	Timestamp int64  `gorm:"column:timestamp" json:"timestamp"`                   // 鏃堕棿鎴砋nix time
@@ -12,6 +14,15 @@
 	Para      string `gorm:"column:para" json:"para"`                             // 鍙傛暟
 	Msg       string `gorm:"column:msg" json:"msg"`                               // 閿欒娑堟伅
 	Ip        string `gorm:"column:ip" json:"ip"`                                 // 璇︽儏
+	AddTime   string `gorm:"column:add_time" json:"add_time"`                                 // 璇︽儏
+}
+
+func (l * OperationLog)Marshal()([]byte, error) {
+	return json.Marshal(l)
+}
+
+func (l * OperationLog)Topic() string {
+	return OperationLogTopic
 }
 
 

--
Gitblit v1.8.0