feat: convert to nextjs
This commit is contained in:
34
prisma/schema.prisma
Normal file
34
prisma/schema.prisma
Normal file
@@ -0,0 +1,34 @@
|
||||
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")
|
||||
}
|
||||
Reference in New Issue
Block a user