From 584e19a2cd83a305c14ad7460e97bf4e49805fff Mon Sep 17 00:00:00 2001
From: yanghui <yanghui@aiotlink.com>
Date: 星期三, 16 六月 2021 19:15:06 +0800
Subject: [PATCH] test
---
operationlog.go | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/operationlog.go b/operationlog.go
index 083e228..019fec6 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
@@ -14,4 +16,12 @@
Ip string `gorm:"column:ip" json:"ip"` // 璇︽儏
}
+func (l * OperationLog)Marshal()([]byte, error) {
+ return json.Marshal(l)
+}
+
+func (l * OperationLog)Topic() string {
+ return OperationLogTopic
+}
+
--
Gitblit v1.8.0