From 75f02abb87a7e4207d32a17e12c04ec28add7e6d Mon Sep 17 00:00:00 2001
From: yanghui <yanghui@aiotlink.com>
Date: 星期三, 16 六月 2021 19:21:02 +0800
Subject: [PATCH] ok
---
operationlog.go | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/operationlog.go b/operationlog.go
index b6d8563..019fec6 100644
--- a/operationlog.go
+++ b/operationlog.go
@@ -1,10 +1,14 @@
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
UserName string `gorm:"column:userName" json:"userName"` // 鐢ㄦ埛鍚嶅瓧
Module string `gorm:"column:module" json:"module"` // 妯″潡
+ ProcName string `gorm:"column:procName" json:"procName"`
+ ProcID string `gorm:"column:procID" json:"procID"`
Function string `gorm:"column:function" json:"function"` // 鍔熻兘
Result string `gorm:"column:result" json:"result"` // 鎿嶄綔缁撴灉
Para string `gorm:"column:para" json:"para"` // 鍙傛暟
@@ -12,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