修改gorm.Model为自定义的全局global.GVA_MODEL 方便自定义基础参数

This commit is contained in:
pixel
2020-10-29 11:23:34 +08:00
parent 7cb172d60a
commit 10d8d7f28a
24 changed files with 191 additions and 168 deletions
+2 -2
View File
@@ -2,13 +2,13 @@
package model
import (
"gorm.io/gorm"
"gin-vue-admin/global"
"time"
)
// 如果含有time.Time 请自行import time包
type SysOperationRecord struct {
gorm.Model
global.GVA_MODEL
Ip string `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"`
Method string `json:"method" form:"method" gorm:"column:method;comment:请求方法"`
Path string `json:"path" form:"path" gorm:"column:path;comment:请求路径"`