feat: convert to nextjs

This commit is contained in:
2024-12-07 07:45:24 +01:00
parent b248ee80ee
commit 633b8ee207
52 changed files with 4121 additions and 982 deletions

34
prisma/schema.prisma Normal file
View 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")
}