From e07a9459cd6de567352f59e2eb5ab3797e8ba04e Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 15 Jul 2026 08:03:57 +0200 Subject: [PATCH] feat(inventory-go): store od_rating at ingest + schema column Co-Authored-By: Claude Sonnet 5 --- go-services/inventory-go/process.go | 4 ++++ go-services/inventory-go/schema.go | 1 + 2 files changed, 5 insertions(+) diff --git a/go-services/inventory-go/process.go b/go-services/inventory-go/process.go index 4a377309..a0f0ddbf 100644 --- a/go-services/inventory-go/process.go +++ b/go-services/inventory-go/process.go @@ -136,6 +136,10 @@ func (s *Server) processItem(raw map[string]any) map[string]any { "remaining_lifespan": nilNeg(ivI(iv, "268", -1)), } + if od, ok := computeOD(raw); ok { + items["od_rating"] = od + } + // combat (sentinel defaults), then base values merged. wt := ivI(iv, "218103835", -1) if wt > 100 { diff --git a/go-services/inventory-go/schema.go b/go-services/inventory-go/schema.go index 43950bbb..bf8b0511 100644 --- a/go-services/inventory-go/schema.go +++ b/go-services/inventory-go/schema.go @@ -38,6 +38,7 @@ func initSchema(ctx context.Context, pool *pgxpool.Pool, log *slog.Logger) { rare_id INTEGER, lifespan INTEGER, remaining_lifespan INTEGER, + od_rating DOUBLE PRECISION, has_id_data BOOLEAN DEFAULT false, last_id_time BIGINT DEFAULT 0, CONSTRAINT uq_char_item UNIQUE (character_name, item_id)