operation_record.go 1.4 KB

1234567891011121314151617181920212223242526
  1. package model
  2. import (
  3. "dy-admin/internal/pcmserver/common"
  4. "time"
  5. )
  6. type OperationRecord struct {
  7. common.Model
  8. Ip string `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"` // 请求ip
  9. Method string `json:"method" form:"method" gorm:"column:method;comment:请求方法"` // 请求方法
  10. Path string `json:"path" form:"path" gorm:"column:path;comment:请求路径"` // 请求路径
  11. Status int `json:"status" form:"status" gorm:"column:status;comment:请求状态"` // 请求状态
  12. Agent string `json:"agent" form:"agent" gorm:"column:agent;comment:代理"` // 代理
  13. ErrorMessage string `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"` // 错误信息
  14. Body string `json:"body" form:"body" gorm:"type:text;column:body;comment:请求Body"` // 请求Body
  15. Resp string `json:"resp" form:"resp" gorm:"type:text;column:resp;comment:响应Body"` // 响应Body
  16. NickName string `json:"nickName" form:"nickName"`
  17. CreatedAt time.Time `json:"createdAt" gorm:"comment:创建时间"`
  18. UpdatedAt time.Time `json:"updatedAt" gorm:"comment:最后更新时间"`
  19. common.ControlBy
  20. }
  21. func (OperationRecord) TableName() string {
  22. return "sys_operation_log"
  23. }