1f7c491048
- 实现文件系统日志(FilesystemLog)记录文件管理器操作 - 实现操作日志(OperationLog)记录用户操作行为 - 实现数据库SQL日志(DatabaseSQLLog)模型和API - 实现SSH会话命令记录(SessionCommand)含命令输出和风险等级 - 添加IP提取服务支持X-Real-IP和X-Forwarded-For - 添加日志自动清理功能 - 修复ProFormSwitch required验证问题 - 修复设置页面默认值问题 - 修复文件上传错误检测逻辑 - 修复资产树key前缀问题 - 添加VNC/RDP设置默认值 - 修复文件管理标题翻译
19 lines
556 B
Go
19 lines
556 B
Go
package model
|
|
|
|
import (
|
|
"next-terminal/server/common"
|
|
)
|
|
|
|
type SessionCommand struct {
|
|
ID string `gorm:"primary_key,type:varchar(36)" json:"id"`
|
|
SessionId string `gorm:"index,type:varchar(36)" json:"sessionId"`
|
|
RiskLevel int `json:"riskLevel"`
|
|
Command string `gorm:"type:text" json:"command"`
|
|
Output string `gorm:"type:text" json:"output"`
|
|
Created common.JsonTime `gorm:"type:datetime;index" json:"createdAt"`
|
|
}
|
|
|
|
func (r *SessionCommand) TableName() string {
|
|
return "session_commands"
|
|
}
|