fab7bd21dd
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
1.1 KiB
Go
22 lines
1.1 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// ErrorReport 客户端错误上报记录(系统级,不做多租户隔离)
|
|
type ErrorReport struct {
|
|
ID uint64 `gorm:"primaryKey;autoIncrement" json:"id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
ErrorType string `gorm:"size:30;not null;index" json:"error_type"` // flutter_error / zone_error / caught_exception
|
|
AppVersion string `gorm:"size:30" json:"app_version"`
|
|
Platform string `gorm:"size:20" json:"platform"` // ios/android/web/windows/macos
|
|
Username string `gorm:"size:50;index" json:"username"`
|
|
ShopID uint64 `gorm:"index" json:"shop_id"`
|
|
ShopNo string `gorm:"size:50" json:"shop_no"`
|
|
Role string `gorm:"size:20" json:"role"`
|
|
ProductInfo string `gorm:"size:200" json:"product_info"`
|
|
ClientIP string `gorm:"size:60" json:"client_ip"`
|
|
ErrorMsg string `gorm:"type:text;not null" json:"error_msg"`
|
|
StackTrace string `gorm:"type:text" json:"stack_trace"`
|
|
OccurredAt time.Time `json:"occurred_at"`
|
|
}
|