Intial Version

This commit is contained in:
2025-12-03 18:00:10 -05:00
parent 43c4227da7
commit 0b86c88eb4
55 changed files with 8938 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model VendorPrice {
id String @id @default(uuid())
timestamp DateTime @default(now()) @db.Timestamptz(3)
vendor String // 'eldorado' or 'playerauctions'
sellerName String? @map("seller_name")
usdPrice Decimal @map("usd_price") @db.Decimal(12, 2)
auecAmount BigInt @map("auec_amount")
usdPerMillion Decimal @map("usd_per_million") @db.Decimal(12, 8)
deliveryTime String? @map("delivery_time")
url String
@@index([timestamp])
@@index([vendor])
@@index([sellerName])
@@index([usdPerMillion])
@@map("raw_vendor_prices")
}
model PriceIndex {
id String @id @default(uuid())
timestamp DateTime @default(now()) @db.Timestamptz(3)
lowestPrice Decimal @map("lowest_price") @db.Decimal(12, 8)
vendor String
sellerName String? @map("seller_name")
@@index([timestamp])
@@map("price_index")
}
model ScrapeLog {
id String @id @default(uuid())
timestamp DateTime @default(now()) @db.Timestamptz(3)
status String // 'success' or 'failure'
message String?
runtimeMs Int? @map("runtime_ms")
@@index([timestamp])
@@map("scrape_log")
}