lang-database 8.1.2 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/schema.prisma +13 -6
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -18,7 +18,7 @@ model Card {
|
|
|
18
18
|
lastUpdate DateTime @default(now())
|
|
19
19
|
userCards UserCard[]
|
|
20
20
|
speechGenerated Boolean @default(false)
|
|
21
|
-
answers
|
|
21
|
+
answers UserAnswer[]
|
|
22
22
|
|
|
23
23
|
@@unique([packId, front])
|
|
24
24
|
@@unique([packId, back])
|
|
@@ -32,7 +32,7 @@ model UserCard {
|
|
|
32
32
|
cardId String
|
|
33
33
|
currentInterval Int?
|
|
34
34
|
dueDate DateTime?
|
|
35
|
-
done Boolean
|
|
35
|
+
done Boolean @default(false)
|
|
36
36
|
|
|
37
37
|
@@id([userId, cardId])
|
|
38
38
|
@@map("userCards")
|
|
@@ -75,7 +75,7 @@ model User {
|
|
|
75
75
|
purchases Purchase[]
|
|
76
76
|
packs Pack[]
|
|
77
77
|
userCards UserCard[]
|
|
78
|
-
answers
|
|
78
|
+
answers UserAnswer[]
|
|
79
79
|
subscriptionExpire DateTime?
|
|
80
80
|
team Team? @relation(fields: [teamId], references: [id])
|
|
81
81
|
teamId String?
|
|
@@ -133,15 +133,22 @@ model GoogleUser {
|
|
|
133
133
|
@@map("googleUsers")
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
model
|
|
136
|
+
model UserAnswer {
|
|
137
137
|
id String @id @default(cuid())
|
|
138
138
|
user User @relation(fields: [userId], references: [id])
|
|
139
139
|
userId String
|
|
140
140
|
card Card @relation(fields: [cardId], references: [id], onDelete: Cascade)
|
|
141
141
|
cardId String
|
|
142
|
-
|
|
142
|
+
answer Answer
|
|
143
143
|
timestamp DateTime
|
|
144
|
-
@@map("
|
|
144
|
+
@@map("userAnswers")
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
enum Answer {
|
|
148
|
+
KNOWN
|
|
149
|
+
ALMOST_KNOWN
|
|
150
|
+
HARD
|
|
151
|
+
UNKNOWN
|
|
145
152
|
}
|
|
146
153
|
|
|
147
154
|
enum PurchaseStatus {
|