This commit is contained in:
2026-04-21 16:53:56 +03:00
parent 1346924387
commit 2ccd6831eb
26 changed files with 430403 additions and 3 deletions
@@ -0,0 +1,19 @@
CREATE TABLE "prediction_runs" (
"id" BIGSERIAL NOT NULL,
"match_id" TEXT NOT NULL,
"engine_version" TEXT NOT NULL,
"decision_trace_id" TEXT,
"generated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"odds_snapshot" JSONB,
"payload_summary" JSONB NOT NULL,
"eventual_outcome" TEXT,
"unit_profit" DOUBLE PRECISION,
CONSTRAINT "prediction_runs_pkey" PRIMARY KEY ("id")
);
CREATE INDEX "prediction_runs_match_id_generated_at_idx"
ON "prediction_runs"("match_id", "generated_at" DESC);
CREATE INDEX "prediction_runs_engine_version_generated_at_idx"
ON "prediction_runs"("engine_version", "generated_at" DESC);
+16
View File
@@ -489,6 +489,22 @@ model Prediction {
@@map("predictions")
}
model PredictionRun {
id BigInt @id @default(autoincrement())
matchId String @map("match_id")
engineVersion String @map("engine_version")
decisionTraceId String? @map("decision_trace_id")
generatedAt DateTime @default(now()) @map("generated_at")
oddsSnapshot Json? @map("odds_snapshot")
payloadSummary Json @map("payload_summary")
eventualOutcome String? @map("eventual_outcome")
unitProfit Float? @map("unit_profit")
@@index([matchId, generatedAt(sort: Desc)])
@@index([engineVersion, generatedAt(sort: Desc)])
@@map("prediction_runs")
}
model AiPredictionsLog {
id Int @id @default(autoincrement())
matchId String @map("match_id")