summaryrefslogtreecommitdiffstats
path: root/prisma
diff options
context:
space:
mode:
authorsuhas <hi@suhas.one>2023-11-16 23:00:29 -0600
committersuhas <hi@suhas.one>2023-11-16 23:00:29 -0600
commit2e38b5aefb08abdd34d5244d0998274e5f35ff3e (patch)
treea221637a7eaa9195c8ae5322d8c73c1ad70e90a2 /prisma
parente0ede3dddabf27cde5a1db35e499885ece51f542 (diff)
downloadqbb-2e38b5aefb08abdd34d5244d0998274e5f35ff3e.tar.gz
add stats tracking
Diffstat (limited to 'prisma')
-rw-r--r--prisma/schema.prisma61
1 files changed, 61 insertions, 0 deletions
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
new file mode 100644
index 0000000..576e5ad
--- /dev/null
+++ b/prisma/schema.prisma
@@ -0,0 +1,61 @@
+// This is your Prisma schema file,
+// learn more about it in the docs: https://pris.ly/d/prisma-schema
+
+generator client {
+ provider = "prisma-client-py"
+ recursive_type_depth = 5
+}
+
+datasource db {
+ provider = "sqlite"
+ url = "file:../data/database.db"
+}
+
+model User {
+ id BigInt @id
+ questions_correct Int @default(0)
+ questions_incorrect Int @default(0)
+ category_breakdown CategoryBreakdown?
+}
+
+model CategoryBreakdown {
+ userId BigInt @unique
+ user User @relation(fields: [userId], references: [id])
+ id Int @id @default(autoincrement())
+
+ literature_correct Int @default(0)
+ literature_incorrect Int @default(0)
+
+ history_correct Int @default(0)
+ history_incorrect Int @default(0)
+
+ science_correct Int @default(0)
+ science_incorrect Int @default(0)
+
+ fine_arts_correct Int @default(0)
+ fine_arts_incorrect Int @default(0)
+
+ religion_correct Int @default(0)
+ religion_incorrect Int @default(0)
+
+ mythology_correct Int @default(0)
+ mythology_incorrect Int @default(0)
+
+ philosophy_correct Int @default(0)
+ philosophy_incorrect Int @default(0)
+
+ social_science_correct Int @default(0)
+ social_science_incorrect Int @default(0)
+
+ current_events_correct Int @default(0)
+ current_events_incorrect Int @default(0)
+
+ geography_correct Int @default(0)
+ geography_incorrect Int @default(0)
+
+ other_academic_correct Int @default(0)
+ other_academic_incorrect Int @default(0)
+
+ trash_correct Int @default(0)
+ trash_incorrect Int @default(0)
+}