sys_oper_log.go 2.2 KB

1234567891011121314151617181920212223242526
  1. package model
  2. import "time"
  3. type SysOperLog struct {
  4. Id int64 `excel:"name=日志主键" xorm:"pk autoincr" json:"id" ` //日志主键
  5. Title string `excel:"name=模块标题" xorm:"varchar(50)" json:"title" binding:"required"` //模块标题
  6. BusinessType int `excel:"name=业务类型" xorm:"int(2)" json:"businessType" ` //业务类型(0其它 1新增 2修改 3删除)
  7. Method string `excel:"name=方法名称" xorm:"varchar(100)" json:"method" ` //方法名称
  8. RequestMethod string `excel:"name=请求方式" xorm:"varchar(10)" json:"requestMethod" ` //请求方式
  9. OperatorType int `excel:"name=操作类别,format=0=后台用户,1=手机端,2=游客" xorm:"int(1)" json:"operatorType" ` //操作类别(0后台用户 1手机端用户 2游客)
  10. OperName string `excel:"name=操作人员" xorm:"varchar(50)" json:"operName" ` //操作人员
  11. DeptName string `excel:"name=部门名称" xorm:"varchar(50)" json:"deptName" ` //部门名称
  12. OperUrl string `excel:"name=请求URL" xorm:"varchar(255)" json:"operUrl" ` //请求URL
  13. OperIp string `excel:"name=主机地址" xorm:"varchar(128)" json:"operIp" ` //主机地址
  14. OperLocation string `excel:"name=操作地点" xorm:"varchar(255)" json:"operLocation" ` //操作地点
  15. OperParam string `excel:"name=请求参数" xorm:"varchar(2000)" json:"operParam" ` //请求参数
  16. JsonResult string `excel:"name=返回参数" xorm:"varchar(2000)" json:"jsonResult" ` //返回参数
  17. Status int `excel:"name=操作状态,format=0=正常,1=异常" xorm:"int(1)" json:"status" ` //操作状态(0正常 1异常)
  18. ErrorMsg string `excel:"name=错误消息" xorm:"varchar(2000)" json:"errorMsg" ` //错误消息
  19. OperTime time.Time `excel:"name=操作时间" xorm:"datetime" json:"operTime" ` //操作时间
  20. }
  21. func (m SysOperLog) TableName() string {
  22. return "sys_oper_log"
  23. }