fix(openflare): serialize access log snowflake IDs as strings

- Return AccessLogView.id as string to avoid JS Number precision loss
- Store OpenFlareAccessLog IDs as uint64 with json id,string
- Update frontend AccessLogItem.id type to string
This commit is contained in:
ryan
2026-06-19 17:40:30 +08:00
parent 3187934f72
commit b6c4181c70
12 changed files with 4556 additions and 678 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ func (OpenFlareRequestReport) TableName() string {
// OpenFlareAccessLog stores a single access log row in ClickHouse (database: openflare, table: of_node_access_logs).
// ClickHouse DDL is managed by goose; reads/writes go through internal/repository/analytics.
type OpenFlareAccessLog struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
ID uint64 `json:"id,string" gorm:"column:id"`
NodeID string `json:"node_id" gorm:"index;size:64;not null"`
LoggedAt time.Time `json:"logged_at" gorm:"index"`
RemoteAddr string `json:"remote_addr" gorm:"index;size:128"`