From fa7f3004fa419810c2f6bc75f6be415590787f1e Mon Sep 17 00:00:00 2001 From: Spacelord Date: Sun, 9 Mar 2025 23:07:26 +0100 Subject: [PATCH] DB schema updates --- prisma/schema.prisma | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 6d1872c..fd4c6fb 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -22,7 +22,7 @@ model user { // TODO: Prüfen ob nötig, erstmal vorbereitet. transactions transactions[] - @@fulltext([name]) + @@fulltext([name, email]) } model transactions { @@ -33,9 +33,9 @@ model transactions { user user @relation(fields: [userId], references: [id]) userId Int - total Float + total Decimal @db.Decimal(5,2) paid Boolean @default(false) - paidAt Boolean? + paidAt DateTime? createdAt DateTime @default(now()) } @@ -55,7 +55,7 @@ model products { id Int @id @unique @default(autoincrement()) gtin String @unique // Dont try to use BigInt -> https://github.com/prisma/studio/issues/614 name String @unique - price Decimal @db.Decimal(5,2) // FIXME: input: 77.80 -> output: 77.8 + price Decimal @db.Decimal(5,2) stock Int visible Boolean @default(true)