123456789101112131415161718 |
- package model
- type UserOperationLog struct {
- Id interface{} `json:"id" bson:"_id"` // 自增ID
- Username string `json:"user_name" bson:"user_name"` // 用户名
- RoleId string `json:"role_id" bson:"role_id"` // 角色ID
- Path string `json:"url" bson:"url"` // 请求路径
- Method string `json:"method" bson:"method"` // 请求方法
- StatusCode int `json:"status_code" bson:"status_code"` // HTTP状态码
- Dur int64 `json:"dur" bson:"dur"` // 请求耗时(毫秒)
- ClientIP string `json:"client_ip" bson:"client_ip"` // 客户端IP
- ErrorMessage string `json:"error_message" bson:"error_message"` // 错误信息
- CreatedAt int64 `json:"created_at" bson:"created_at"`
- }
- func (m *UserOperationLog) TableName() string {
- return "userOperationLog"
- }
|