gg
This commit is contained in:
@@ -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);
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user