1f7c491048
- 实现文件系统日志(FilesystemLog)记录文件管理器操作 - 实现操作日志(OperationLog)记录用户操作行为 - 实现数据库SQL日志(DatabaseSQLLog)模型和API - 实现SSH会话命令记录(SessionCommand)含命令输出和风险等级 - 添加IP提取服务支持X-Real-IP和X-Forwarded-For - 添加日志自动清理功能 - 修复ProFormSwitch required验证问题 - 修复设置页面默认值问题 - 修复文件上传错误检测逻辑 - 修复资产树key前缀问题 - 添加VNC/RDP设置默认值 - 修复文件管理标题翻译
25 lines
1.0 KiB
Go
25 lines
1.0 KiB
Go
package model
|
|
|
|
import (
|
|
"next-terminal/server/common"
|
|
)
|
|
|
|
type OperationLog struct {
|
|
ID string `gorm:"primary_key,type:varchar(36)" json:"id"`
|
|
AccountId string `gorm:"index,type:varchar(36)" json:"accountId"`
|
|
AccountName string `gorm:"type:varchar(200)" json:"accountName"`
|
|
Action string `gorm:"type:varchar(100);index" json:"action"`
|
|
Content string `gorm:"type:text" json:"content"`
|
|
IP string `gorm:"type:varchar(50);index" json:"ip"`
|
|
Region string `gorm:"type:varchar(200)" json:"region"`
|
|
UserAgent string `gorm:"type:varchar(500)" json:"userAgent"`
|
|
Status string `gorm:"type:varchar(20);index" json:"status"`
|
|
ErrorMessage string `gorm:"type:text" json:"errorMessage"`
|
|
Remark string `gorm:"type:varchar(500)" json:"remark"`
|
|
Created common.JsonTime `gorm:"type:datetime;index" json:"createdAt"`
|
|
}
|
|
|
|
func (r *OperationLog) TableName() string {
|
|
return "operation_logs"
|
|
}
|