35 lines
900 B
Plaintext
35 lines
900 B
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
|
|
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
|
|
}
|
|
|
|
model Consumer {
|
|
id Int @id @default(autoincrement())
|
|
letters String?
|
|
birthday DateTime?
|
|
zipCode String?
|
|
value Json?
|
|
editedValue Json?
|
|
purchaseLists PurchaseList[]
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@map("consumer")
|
|
}
|
|
|
|
model PurchaseList {
|
|
id Int @id @default(autoincrement())
|
|
value Json?
|
|
consumer Consumer @relation(fields: [consumerId], references: [id])
|
|
consumerId Int
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@map("purchases")
|
|
}
|