feat(ST-mgsu85hr): Prisma schema — token-velden op ClaudeJob + ModelPrice model (#112)

- Voeg model_id, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens (nullable) toe aan ClaudeJob
- Voeg nieuw ModelPrice model toe met per-1M prijsvelden en currency default USD
- Migratie 20260506010013_add_token_usage_fields aangemaakt en toegepast
- Seed uitgebreid met standaardprijzen voor claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5-20251001

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-05-06 03:02:00 +02:00 committed by GitHub
parent f360c8fe81
commit 9a733d77bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,24 @@
-- AlterTable
ALTER TABLE "claude_jobs" ADD COLUMN "cache_read_tokens" INTEGER,
ADD COLUMN "cache_write_tokens" INTEGER,
ADD COLUMN "input_tokens" INTEGER,
ADD COLUMN "model_id" TEXT,
ADD COLUMN "output_tokens" INTEGER;
-- CreateTable
CREATE TABLE "model_prices" (
"id" TEXT NOT NULL,
"model_id" TEXT NOT NULL,
"input_price_per_1m" DECIMAL(12,6) NOT NULL,
"output_price_per_1m" DECIMAL(12,6) NOT NULL,
"cache_read_price_per_1m" DECIMAL(12,6) NOT NULL,
"cache_write_price_per_1m" DECIMAL(12,6) NOT NULL,
"currency" TEXT NOT NULL DEFAULT 'USD',
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "model_prices_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "model_prices_model_id_key" ON "model_prices"("model_id");