diff --git a/server/wheelserver/model/log.go b/server/wheelserver/model/log.go new file mode 100644 index 00000000..b479bb29 --- /dev/null +++ b/server/wheelserver/model/log.go @@ -0,0 +1,30 @@ +package model + +import ( + "f5" + "main/constant" +) + +type Log struct { + Idx int64 `gorm:"column:idx;AUTO_INCREMENT;primaryKey"` + AccountId string `gorm:"column:account_id"` + Type string `gorm:"column:type"` + SubType string `gorm:"column:sub_type"` + Param1 string `gorm:"column:param1"` + Param2 string `gorm:"column:param2"` + Param3 string `gorm:"column:param3"` + Param4 string `gorm:"column:param4"` + CreateTime int32 `gorm:"column:createtime;<-:create"` + ModifyTime int32 `gorm:"column:modifytime"` +} + +func (this *Log) TableName() string { + return "t_log" +} + +func (this *Log) Create() error { + if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Create(this); result.Error != nil { + return result.Error + } + return nil +} diff --git a/server/wheelserver/service/log.go b/server/wheelserver/service/log.go index 1b3e5d2d..c56ea6b1 100644 --- a/server/wheelserver/service/log.go +++ b/server/wheelserver/service/log.go @@ -56,5 +56,6 @@ func (this *log) AddAsyncLog(accountId string, logType string, subLogType string } func (this *log) saveNode(node interface{}) bool { + p := node.(*logNode) return true }