31 lines
720 B
Go
31 lines
720 B
Go
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
|
|
}
|