Files
gjs c33fbdb422
CI / changes (push) Successful in 4s
CI / docker-bff (push) Successful in 3m21s
CI / docker-product (push) Successful in 3m39s
CI / docker-admin (push) Successful in 3m34s
CI / docker-user (push) Successful in 3m29s
CI / docker-ad (push) Successful in 3m29s
fix admin login log
2026-08-21 16:07:03 +08:00

31 lines
1.8 KiB
Go

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 int64 `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(255);comment:浏览器名称" json:"browser_name"`
BrowserVersion string `gorm:"column:browser_version;type:varchar(50);comment:版本" json:"browser_version"`
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 ActionType struct {
Id int `json:"id"`
Name string `json:"name"`
}