44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
// Get a free hosted Postgres database in seconds: `npx create-db`
|
|
|
|
generator client {
|
|
provider = "prisma-client"
|
|
output = "../src/generated/prisma"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
}
|
|
|
|
enum QuoteType {
|
|
BLUE
|
|
BNA
|
|
BELO
|
|
}
|
|
|
|
model Quote {
|
|
id Int @id @default(autoincrement())
|
|
timeStamp DateTime @default(now())
|
|
buy Decimal @db.Money
|
|
sell Decimal @db.Money
|
|
type QuoteType
|
|
difference Decimal @default(0) @db.Decimal(9, 2)
|
|
percentage Decimal @default(0) @db.Decimal(9, 2)
|
|
previousDayDifference Decimal @default(0) @db.Decimal(9, 2)
|
|
previousDayPercentage Decimal @default(0) @db.Decimal(9, 2)
|
|
|
|
@@map("quotes")
|
|
}
|
|
|
|
|
|
model QuoteHistory {
|
|
id Int @id @default(autoincrement())
|
|
timeStamp DateTime @default(now())
|
|
buy Decimal @db.Money
|
|
sell Decimal @db.Money
|
|
type QuoteType
|
|
|
|
@@map("quotes_history")
|
|
} |