lang-database 7.2.0 → 8.0.0
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/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +5 -4
- package/schema.prisma +1 -0
- package/generated/prisma-client/index-browser.js +0 -242
- package/generated/prisma-client/index.d.ts +0 -17198
- package/generated/prisma-client/index.js +0 -290
- package/generated/prisma-client/package.json +0 -6
- package/generated/prisma-client/query_engine-windows.dll.node +0 -0
- package/generated/prisma-client/runtime/edge.js +0 -98
- package/generated/prisma-client/runtime/index-browser.d.ts +0 -323
- package/generated/prisma-client/runtime/index-browser.js +0 -2479
- package/generated/prisma-client/runtime/index.d.ts +0 -1566
- package/generated/prisma-client/runtime/index.js +0 -31190
- package/generated/prisma-client/schema.prisma +0 -164
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
generator client {
|
|
2
|
-
provider = "prisma-client-js"
|
|
3
|
-
output = "./generated/prisma-client"
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
datasource db {
|
|
7
|
-
provider = "postgresql"
|
|
8
|
-
url = env("DATABASE_URL")
|
|
9
|
-
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
model Card {
|
|
13
|
-
id String @id @default(cuid())
|
|
14
|
-
pack Pack @relation(fields: [packId], references: [id])
|
|
15
|
-
packId String
|
|
16
|
-
front String
|
|
17
|
-
back String
|
|
18
|
-
lastUpdate DateTime @default(now())
|
|
19
|
-
userCards UserCard[]
|
|
20
|
-
speechGenerated Boolean @default(false)
|
|
21
|
-
answers Answer[]
|
|
22
|
-
|
|
23
|
-
@@unique([packId, front])
|
|
24
|
-
@@unique([packId, back])
|
|
25
|
-
@@map("cards")
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
model UserCard {
|
|
29
|
-
user User @relation(fields: [userId], references: [id])
|
|
30
|
-
userId String
|
|
31
|
-
card Card @relation(fields: [cardId], references: [id], onDelete: Cascade)
|
|
32
|
-
cardId String
|
|
33
|
-
currentInterval Int?
|
|
34
|
-
dueDate DateTime?
|
|
35
|
-
done Boolean
|
|
36
|
-
|
|
37
|
-
@@id([userId, cardId])
|
|
38
|
-
@@map("userCards")
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
model Category {
|
|
42
|
-
id String @id @default(cuid())
|
|
43
|
-
name String
|
|
44
|
-
packs Pack[]
|
|
45
|
-
@@map("categories")
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
model Pack {
|
|
49
|
-
id String @id @default(cuid())
|
|
50
|
-
teacher Teacher @relation(fields: [teacherId], references: [id])
|
|
51
|
-
teacherId String
|
|
52
|
-
name String @default("")
|
|
53
|
-
shortDescription String @default("")
|
|
54
|
-
longDescription String @default("")
|
|
55
|
-
category Category? @relation(fields: [categoryId], references: [id])
|
|
56
|
-
categoryId String?
|
|
57
|
-
published Boolean @default(false)
|
|
58
|
-
currentPrice Decimal
|
|
59
|
-
public Boolean @default(false)
|
|
60
|
-
cards Card[]
|
|
61
|
-
users User[]
|
|
62
|
-
purchases Purchase[]
|
|
63
|
-
teams Team[]
|
|
64
|
-
@@map("packs")
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
model User {
|
|
68
|
-
id String @id @default(cuid())
|
|
69
|
-
email String @unique(map: "IX_Users_Email")
|
|
70
|
-
timestamp DateTime @default(now())
|
|
71
|
-
name String
|
|
72
|
-
password String?
|
|
73
|
-
googleUser GoogleUser?
|
|
74
|
-
achievements Achievement[]
|
|
75
|
-
purchases Purchase[]
|
|
76
|
-
packs Pack[]
|
|
77
|
-
userCards UserCard[]
|
|
78
|
-
answers Answer[]
|
|
79
|
-
team Team? @relation(fields: [teamId], references: [id])
|
|
80
|
-
teamId String?
|
|
81
|
-
passwordActivated Boolean @default(false)
|
|
82
|
-
@@map("users")
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
model Achievement {
|
|
86
|
-
id String @id @default(cuid())
|
|
87
|
-
user User @relation(fields: [userId], references: [id])
|
|
88
|
-
userId String
|
|
89
|
-
badge Boolean
|
|
90
|
-
type AchievementType
|
|
91
|
-
info String
|
|
92
|
-
timestamp DateTime
|
|
93
|
-
dismissed Boolean @default(false)
|
|
94
|
-
@@map("achievements")
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
enum AchievementType {
|
|
98
|
-
Today15Min
|
|
99
|
-
Weekly15Min
|
|
100
|
-
Monthly15Min
|
|
101
|
-
CardDone
|
|
102
|
-
FiveCardsDone
|
|
103
|
-
DeckDone
|
|
104
|
-
DeckAlreadyKnown
|
|
105
|
-
@@map("AchievementType")
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
model Team {
|
|
109
|
-
id String @id @default(cuid())
|
|
110
|
-
name String
|
|
111
|
-
emailPattern String @default("")
|
|
112
|
-
additionalDecks Pack[]
|
|
113
|
-
members User[]
|
|
114
|
-
userCount Int
|
|
115
|
-
subscriptionExpire DateTime?
|
|
116
|
-
@@map("teams")
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
model Teacher {
|
|
120
|
-
id String @id @default(cuid())
|
|
121
|
-
email String @unique(map: "IX_teachers_Email")
|
|
122
|
-
name String
|
|
123
|
-
password String
|
|
124
|
-
packs Pack[]
|
|
125
|
-
@@map("teachers")
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
model GoogleUser {
|
|
129
|
-
id String @id
|
|
130
|
-
user User @relation(fields: [userId], references: [id])
|
|
131
|
-
userId String @unique
|
|
132
|
-
@@map("googleUsers")
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
model Answer {
|
|
136
|
-
id String @id @default(cuid())
|
|
137
|
-
user User @relation(fields: [userId], references: [id])
|
|
138
|
-
userId String
|
|
139
|
-
card Card @relation(fields: [cardId], references: [id], onDelete: Cascade)
|
|
140
|
-
cardId String
|
|
141
|
-
status String
|
|
142
|
-
timestamp DateTime
|
|
143
|
-
@@map("answers")
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
enum PurchaseStatus {
|
|
147
|
-
PENDING
|
|
148
|
-
APPROVED
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
model Purchase {
|
|
152
|
-
id String @id @default(cuid())
|
|
153
|
-
user User @relation(fields: [userId], references: [id])
|
|
154
|
-
userId String
|
|
155
|
-
pack Pack @relation(fields: [packId], references: [id])
|
|
156
|
-
packId String
|
|
157
|
-
currency String
|
|
158
|
-
amount Decimal
|
|
159
|
-
orderDate DateTime
|
|
160
|
-
paymentDate DateTime?
|
|
161
|
-
status PurchaseStatus
|
|
162
|
-
|
|
163
|
-
@@map("purchases")
|
|
164
|
-
}
|