change layout
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package dao
|
||||
|
||||
import "lone-services/pkg/utils"
|
||||
|
||||
// ActionLog 操作日志表
|
||||
type ActionLog struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:ID" json:"id"`
|
||||
Content string `gorm:"column:content;type:text;comment:内容;NOT NULL" json:"content"`
|
||||
AdminId int `gorm:"column:admin_id;type:int(11);comment:操作人;NOT NULL" json:"admin_id"`
|
||||
AdminName string `gorm:"column:admin_name;type:varchar(255);comment:真实姓名" json:"admin_name"`
|
||||
Type uint8 `gorm:"column:type;type:smallint(3);comment:类型,以常量配置文件为准,目前,1为添加,2为编辑,3为删除,4为强退,5为下载;NOT NULL" json:"type"`
|
||||
ModuleName string `gorm:"column:module_name;type:varchar(255);comment:操作模块名,如管理员;NOT NULL" json:"module_name"`
|
||||
Ip string `gorm:"column:ip;type:varchar(20);comment:IP;NOT NULL" json:"ip"`
|
||||
BrowserInfo string `gorm:"column:browser_info;type:varchar(255);comment:浏览器详细信息" json:"browser_info"`
|
||||
BrowserName string `gorm:"column:browser_name;type:varchar(50);comment:浏览器名称" json:"browser_name"`
|
||||
BrowserVersion string `gorm:"column:browser_version;type:varchar(50);comment:版本" json:"browser_version"`
|
||||
ServiceId int `gorm:"column:service_id;type:int(11);default:0;comment:项目ID" json:"service_id"`
|
||||
Reason string `gorm:"column:reason;type:varchar(255);comment:原因" json:"reason"`
|
||||
CreateTime utils.CustomTime `gorm:"column:create_time;type:datetime;default:NULL;comment:添加时间;NOT NULL" json:"create_time"`
|
||||
}
|
||||
|
||||
type ActionItems struct {
|
||||
Items []ActionLog `json:"items"`
|
||||
Count int64 `json:"count"`
|
||||
Type []ActionType `json:"type"`
|
||||
}
|
||||
|
||||
type ActionAdd struct {
|
||||
NewContent interface{} `json:"new_content"`
|
||||
OldContent interface{} `json:"old_content"`
|
||||
ServiceId int `json:"service_id"`
|
||||
Reason string `json:"reason"`
|
||||
Type uint8 `json:"type"`
|
||||
ModuleName string `json:"module_name"`
|
||||
}
|
||||
|
||||
type ActionType struct {
|
||||
Id int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
Reference in New Issue
Block a user