29 lines
2.3 KiB
Go
29 lines
2.3 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// AgoraErrorLog stores client-reported Agora room connection errors.
|
|
type AgoraErrorLog struct {
|
|
ID int64 `gorm:"column:id;primaryKey"` // 主键ID
|
|
SysOrigin string `gorm:"column:sys_origin;size:32"` // 系统来源
|
|
UserID int64 `gorm:"column:user_id"` // 上报用户ID
|
|
RoomID string `gorm:"column:room_id;size:64"` // 房间ID
|
|
AgoraUID string `gorm:"column:agora_uid;size:64"` // Agora UID
|
|
ErrorCodeType string `gorm:"column:error_code_type;size:128"` // Agora ErrorCodeType
|
|
ConnectionChangedReasonType string `gorm:"column:connection_changed_reason_type;size:128"` // Agora ConnectionChangedReasonType
|
|
BannedByServer bool `gorm:"column:banned_by_server"` // 是否 BannedByServer/kicking-rule
|
|
IsTimeout bool `gorm:"column:is_timeout"` // 是否超时
|
|
TokenRequestSuccess *bool `gorm:"column:token_request_success"` // token 请求是否成功
|
|
NetworkType string `gorm:"column:network_type;size:64"` // 网络类型
|
|
ReqClient string `gorm:"column:req_client;size:32"` // 请求客户端
|
|
ReqAppIntel string `gorm:"column:req_app_intel;size:255"` // App 版本信息请求头
|
|
ClientIP string `gorm:"column:client_ip;size:64"` // 客户端IP
|
|
UserAgent string `gorm:"column:user_agent;size:255"` // User-Agent
|
|
RawPayload string `gorm:"column:raw_payload;type:mediumtext"` // 原始上报内容
|
|
CreateTime time.Time `gorm:"column:create_time"` // 创建时间
|
|
UpdateTime time.Time `gorm:"column:update_time"` // 更新时间
|
|
}
|
|
|
|
// TableName returns the Agora error log table name.
|
|
func (AgoraErrorLog) TableName() string { return "agora_error_log" }
|