This commit is contained in:
aozhiwei 2024-11-17 13:16:04 +08:00
parent eeffcd5df3
commit 26afda8f37
2 changed files with 31 additions and 0 deletions

View 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
}

View File

@ -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
}