Intial Version
This commit is contained in:
1
backend/prisma/migrations/.gitkeep
Normal file
1
backend/prisma/migrations/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
# Migrations directory
|
||||
51
backend/prisma/schema.prisma
Normal file
51
backend/prisma/schema.prisma
Normal 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")
|
||||
}
|
||||
Reference in New Issue
Block a user