oplog.go 1.1 KB

1234567891011121314151617181920212223242526
  1. package model
  2. // TOprLog 操作记录表结构
  3. type TOprLog struct {
  4. GvaModel
  5. Ip string `json:"ip" form:"ip" db:"ip"` // 请求ip
  6. Method string `json:"method" form:"method" db:"method"` // 请求方法
  7. Path string `json:"path" form:"path" db:"path"` // 请求路径
  8. Status uint64 `json:"status" form:"status" db:"status"` // 请求状态
  9. Latency string `json:"latency" form:"latency" db:"latency"` // 延迟
  10. Agent string `json:"agent" form:"agent" db:"agent"` // 代理
  11. ErrorMessage string `json:"error_message" db:"error_message"` // 错误信息
  12. Body string `json:"body" form:"body" db:"body"` // 请求Body
  13. Resp string `json:"resp" form:"resp" db:"resp"` // 响应Body
  14. UserId int64 `json:"user_id" form:"user_id" db:"user_id"` // 用户Id
  15. UserName string `json:"user_name" form:"user_name" db:"user_name"` // 用户账号
  16. }
  17. func (TOprLog) TableName() string {
  18. return "crazy_cms.cms_opr_log"
  19. }
  20. type SearchOprLog struct {
  21. TOprLog
  22. PageInfo
  23. }