2025-10-16 13:28:24 +08:00

33 lines
2.1 KiB
Go

// 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 TableNameLogRequest = "log_request"
// LogRequest 请求日志表
type LogRequest struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"` // 主键
Tid string `gorm:"column:tid;not null;comment:请求链路 ID" json:"tid"` // 请求链路 ID
Username string `gorm:"column:username;not null;comment:登录名" json:"username"` // 登录名
Host string `gorm:"column:host;not null;comment:请求 HOST" json:"host"` // 请求 HOST
Path string `gorm:"column:path;not null;comment:请求 Path" json:"path"` // 请求 Path
Method string `gorm:"column:method;not null;comment:请求 Method" json:"method"` // 请求 Method
HTTPCode int32 `gorm:"column:http_code;not null;comment:HTTP 状态码" json:"http_code"` // HTTP 状态码
BusinessCode int32 `gorm:"column:business_code;not null;comment:业务码" json:"business_code"` // 业务码
CostMilliseconds float64 `gorm:"column:cost_milliseconds;not null;default:0.00;comment:耗时(毫秒)" json:"cost_milliseconds"` // 耗时(毫秒)
IsSuccess int32 `gorm:"column:is_success;not null;comment:是否成功(1=是 -1=否)" json:"is_success"` // 是否成功(1=是 -1=否)
Content string `gorm:"column:content;not null;comment:内容" json:"content"` // 内容
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
}
// TableName LogRequest's table name
func (*LogRequest) TableName() string {
return TableNameLogRequest
}