58 lines
1.7 KiB
Go
58 lines
1.7 KiB
Go
package entity
|
|
|
|
import (
|
|
"gitea.com/red-future/common/beans"
|
|
)
|
|
|
|
type asynchOpLogCol struct {
|
|
beans.SQLBaseCol
|
|
IP string
|
|
UserAgent string
|
|
APIPath string
|
|
HttpMethod string
|
|
BizName string
|
|
ModelName string
|
|
TaskID string
|
|
OpType string
|
|
Success string
|
|
ErrorMsg string
|
|
CostMs string
|
|
RequestPayload string
|
|
ResponsePayload string
|
|
}
|
|
|
|
var AsynchOpLogCol = asynchOpLogCol{
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|
IP: "ip",
|
|
UserAgent: "user_agent",
|
|
APIPath: "api_path",
|
|
HttpMethod: "http_method",
|
|
BizName: "biz_name",
|
|
ModelName: "model_name",
|
|
TaskID: "task_id",
|
|
OpType: "op_type",
|
|
Success: "success",
|
|
ErrorMsg: "error_msg",
|
|
CostMs: "cost_ms",
|
|
RequestPayload: "request_payload",
|
|
ResponsePayload: "response_payload",
|
|
}
|
|
|
|
// AsynchOpLog 操作日志(创建任务等)
|
|
type AsynchOpLog struct {
|
|
beans.SQLBaseDO `orm:",inline"`
|
|
IP string `orm:"ip" json:"ip"`
|
|
UserAgent string `orm:"user_agent" json:"userAgent"`
|
|
APIPath string `orm:"api_path" json:"apiPath"`
|
|
HttpMethod string `orm:"http_method" json:"httpMethod"`
|
|
BizName string `orm:"biz_name" json:"bizName"`
|
|
ModelName string `orm:"model_name" json:"modelName"`
|
|
TaskID string `orm:"task_id" json:"taskId"`
|
|
OpType string `orm:"op_type" json:"opType"`
|
|
Success int `orm:"success" json:"success"`
|
|
ErrorMsg string `orm:"error_msg" json:"errorMsg"`
|
|
CostMs int64 `orm:"cost_ms" json:"costMs"`
|
|
RequestPayload any `orm:"request_payload" json:"requestPayload"`
|
|
ResponsePayload any `orm:"response_payload" json:"responsePayload"`
|
|
}
|