1
This commit is contained in:
parent
eeffcd5df3
commit
26afda8f37
30
server/wheelserver/model/log.go
Normal file
30
server/wheelserver/model/log.go
Normal file
@ -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
|
||||||
|
}
|
@ -56,5 +56,6 @@ func (this *log) AddAsyncLog(accountId string, logType string, subLogType string
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *log) saveNode(node interface{}) bool {
|
func (this *log) saveNode(node interface{}) bool {
|
||||||
|
p := node.(*logNode)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user