1234567891011121314151617181920212223242526272829303132333435363738394041 |
- // Code generated by gorm.io/gen. DO NOT EDIT.
- // Code generated by gorm.io/gen. DO NOT EDIT.
- // Code generated by gorm.io/gen. DO NOT EDIT.
- package model
- import (
- "time"
- )
- const TableNameAdminLog = "admin_logs"
- // AdminLog mapped from table <admin_logs>
- type AdminLog struct {
- ID int64 `gorm:"column:id;type:bigint(20);primaryKey;autoIncrement:true" json:"id"`
- Environment string `gorm:"column:environment;type:varchar(64);not null;index:environment,priority:1" json:"environment"` // 所在环境
- AdminID int64 `gorm:"column:admin_id;type:bigint(20);index:admin_id,priority:1" json:"admin_id"` // 管理员ID
- AppID string `gorm:"column:app_id;type:varchar(128);index:app_id,priority:1" json:"app_id"` // 所属应用
- UserAgent string `gorm:"column:user_agent;type:varchar(512);not null" json:"user_agent"` // 访问代理
- Method string `gorm:"column:method;type:varchar(64);not null" json:"method"` // 请求方式
- URL string `gorm:"column:url;type:text;not null" json:"url"` // 访问地址
- Host string `gorm:"column:host;type:text;not null" json:"host"` // 服务域
- Path string `gorm:"column:path;type:text;not null" json:"path"` // 访问路径
- GetData string `gorm:"column:get_data;type:json" json:"get_data"`
- PostData string `gorm:"column:post_data;type:mediumtext" json:"post_data"`
- HeaderData string `gorm:"column:header_data;type:json" json:"header_data"`
- AccessIP string `gorm:"column:access_ip;type:varchar(20);not null" json:"access_ip"` // 访问IP
- StatusCode int32 `gorm:"column:status_code;type:int(11);not null" json:"status_code"` // 响应状态码
- ErrorMessage string `gorm:"column:error_message;type:varchar(255)" json:"error_message"` // 错误消息
- Data string `gorm:"column:data;type:mediumtext;not null" json:"data"` // 响应数据
- Latency int32 `gorm:"column:latency;type:int(11)" json:"latency"` // 耗时
- Timestamp time.Time `gorm:"column:timestamp;type:datetime;not null" json:"timestamp"` // 请求时间
- CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null" json:"created_at"` // 创建时间
- Name string `gorm:"column:name;type:varchar(255)" json:"name"`
- Remark string `gorm:"column:remark;type:text" json:"remark"`
- }
- // TableName AdminLog's table name
- func (*AdminLog) TableName() string {
- return TableNameAdminLog
- }
|