@studious-lms/server 1.0.2 → 1.0.3
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 -6
- package/prisma/schema.prisma +228 -0
- package/src/exportType.ts +9 -0
- package/src/index.ts +94 -0
- package/src/lib/fileUpload.ts +163 -0
- package/src/lib/googleCloudStorage.ts +94 -0
- package/src/lib/prisma.ts +16 -0
- package/src/lib/thumbnailGenerator.ts +185 -0
- package/src/logger.ts +163 -0
- package/src/middleware/auth.ts +191 -0
- package/src/middleware/logging.ts +54 -0
- package/src/routers/_app.ts +34 -0
- package/src/routers/agenda.ts +79 -0
- package/src/routers/announcement.ts +134 -0
- package/src/routers/assignment.ts +1614 -0
- package/src/routers/attendance.ts +284 -0
- package/src/routers/auth.ts +286 -0
- package/src/routers/class.ts +753 -0
- package/src/routers/event.ts +509 -0
- package/src/routers/file.ts +96 -0
- package/src/routers/section.ts +138 -0
- package/src/routers/user.ts +82 -0
- package/src/socket/handlers.ts +143 -0
- package/src/trpc.ts +90 -0
- package/src/types/trpc.ts +15 -0
- package/src/utils/email.ts +11 -0
- package/src/utils/generateInviteCode.ts +8 -0
- package/src/utils/logger.ts +156 -0
- package/tsconfig.json +17 -0
- package/generated/prisma/client.d.ts +0 -1
- package/generated/prisma/client.js +0 -4
- package/generated/prisma/default.d.ts +0 -1
- package/generated/prisma/default.js +0 -4
- package/generated/prisma/edge.d.ts +0 -1
- package/generated/prisma/edge.js +0 -389
- package/generated/prisma/index-browser.js +0 -375
- package/generated/prisma/index.d.ts +0 -34865
- package/generated/prisma/index.js +0 -410
- package/generated/prisma/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/generated/prisma/package.json +0 -140
- package/generated/prisma/runtime/edge-esm.js +0 -34
- package/generated/prisma/runtime/edge.js +0 -34
- package/generated/prisma/runtime/index-browser.d.ts +0 -370
- package/generated/prisma/runtime/index-browser.js +0 -16
- package/generated/prisma/runtime/library.d.ts +0 -3647
- package/generated/prisma/runtime/library.js +0 -146
- package/generated/prisma/runtime/react-native.js +0 -83
- package/generated/prisma/runtime/wasm.js +0 -35
- package/generated/prisma/schema.prisma +0 -304
- package/generated/prisma/wasm.d.ts +0 -1
- package/generated/prisma/wasm.js +0 -375
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
// This is your Prisma schema file,
|
|
2
|
-
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
-
|
|
4
|
-
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
|
|
5
|
-
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
|
|
6
|
-
|
|
7
|
-
generator client {
|
|
8
|
-
provider = "prisma-client-js"
|
|
9
|
-
output = "../generated/prisma"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
datasource db {
|
|
13
|
-
provider = "postgresql"
|
|
14
|
-
url = env("DATABASE_URL")
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
enum AssignmentType {
|
|
18
|
-
HOMEWORK
|
|
19
|
-
QUIZ
|
|
20
|
-
TEST
|
|
21
|
-
PROJECT
|
|
22
|
-
ESSAY
|
|
23
|
-
DISCUSSION
|
|
24
|
-
PRESENTATION
|
|
25
|
-
LAB
|
|
26
|
-
OTHER
|
|
27
|
-
ANNOUNCEMENT
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
model Institution {
|
|
31
|
-
id String @id @default(uuid())
|
|
32
|
-
name String
|
|
33
|
-
settings Json? @default("{}")
|
|
34
|
-
address String?
|
|
35
|
-
phone String?
|
|
36
|
-
email String?
|
|
37
|
-
website String?
|
|
38
|
-
logo String? // URL to logo image
|
|
39
|
-
academicYear String? // Current academic year
|
|
40
|
-
term String? // Current term/semester
|
|
41
|
-
startDate DateTime?
|
|
42
|
-
endDate DateTime?
|
|
43
|
-
|
|
44
|
-
// Academic Settings
|
|
45
|
-
gradingSystem Json? // Store grading scale, GPA calculation rules
|
|
46
|
-
attendancePolicy Json? // Store attendance rules and policies
|
|
47
|
-
academicCalendar Json? // Store academic calendar events
|
|
48
|
-
|
|
49
|
-
// Financial Settings
|
|
50
|
-
tuitionRates Json? // Store tuition and fee information
|
|
51
|
-
paymentSchedule Json? // Store payment due dates and schedules
|
|
52
|
-
|
|
53
|
-
// Communication Settings
|
|
54
|
-
notificationPreferences Json? // Store notification settings
|
|
55
|
-
communicationTemplates Json? // Store email/SMS templates
|
|
56
|
-
|
|
57
|
-
classes Class[]
|
|
58
|
-
|
|
59
|
-
students User[] @relation("InstitutionMembers")
|
|
60
|
-
admins User[] @relation("InstitutionAdmins")
|
|
61
|
-
teachers User[] @relation("InstitutionTeachers")
|
|
62
|
-
primaryTeachers User[] @relation("InstitutionPrimaryTeachers")
|
|
63
|
-
|
|
64
|
-
// New relations
|
|
65
|
-
departments Department[]
|
|
66
|
-
courses Course[]
|
|
67
|
-
schedules Schedule[]
|
|
68
|
-
events Event[]
|
|
69
|
-
announcements Announcement[]
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
model Department {
|
|
73
|
-
id String @id @default(uuid())
|
|
74
|
-
name String
|
|
75
|
-
description String?
|
|
76
|
-
head User? @relation("DepartmentHead", fields: [headId], references: [id])
|
|
77
|
-
headId String? @unique
|
|
78
|
-
institution Institution @relation(fields: [institutionId], references: [id])
|
|
79
|
-
institutionId String
|
|
80
|
-
courses Course[]
|
|
81
|
-
teachers User[] @relation("DepartmentTeachers")
|
|
82
|
-
createdAt DateTime @default(now())
|
|
83
|
-
updatedAt DateTime @updatedAt
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
model Course {
|
|
87
|
-
id String @id @default(uuid())
|
|
88
|
-
code String // Course code (e.g., MATH101)
|
|
89
|
-
name String
|
|
90
|
-
description String?
|
|
91
|
-
credits Int
|
|
92
|
-
department Department @relation(fields: [departmentId], references: [id])
|
|
93
|
-
departmentId String
|
|
94
|
-
institution Institution @relation(fields: [institutionId], references: [id])
|
|
95
|
-
institutionId String
|
|
96
|
-
prerequisites Json? // Store prerequisite course IDs
|
|
97
|
-
syllabus Json? // Store course syllabus
|
|
98
|
-
createdAt DateTime @default(now())
|
|
99
|
-
updatedAt DateTime @updatedAt
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
model Schedule {
|
|
103
|
-
id String @id @default(uuid())
|
|
104
|
-
name String
|
|
105
|
-
startDate DateTime
|
|
106
|
-
endDate DateTime
|
|
107
|
-
institution Institution @relation(fields: [institutionId], references: [id])
|
|
108
|
-
institutionId String
|
|
109
|
-
type String // e.g., "ACADEMIC", "EXAM", "BREAK"
|
|
110
|
-
description String?
|
|
111
|
-
createdAt DateTime @default(now())
|
|
112
|
-
updatedAt DateTime @updatedAt
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
model User {
|
|
116
|
-
id String @id @default(uuid())
|
|
117
|
-
username String
|
|
118
|
-
password String
|
|
119
|
-
profile Json? @default("{}")
|
|
120
|
-
|
|
121
|
-
teacherIn Class[] @relation("UserTeacherToClass")
|
|
122
|
-
studentIn Class[] @relation("UserStudentToClass")
|
|
123
|
-
|
|
124
|
-
submissions Submission[]
|
|
125
|
-
sessions Session[]
|
|
126
|
-
files File[]
|
|
127
|
-
assignments Assignment[]
|
|
128
|
-
events Event[]
|
|
129
|
-
announcements Announcement[]
|
|
130
|
-
|
|
131
|
-
institution Institution? @relation("InstitutionPrimaryTeachers", fields: [institutionId], references: [id])
|
|
132
|
-
institutionId String?
|
|
133
|
-
|
|
134
|
-
studentAt Institution[] @relation("InstitutionMembers")
|
|
135
|
-
adminAt Institution[] @relation("InstitutionAdmins")
|
|
136
|
-
teacherAt Institution[] @relation("InstitutionTeachers")
|
|
137
|
-
|
|
138
|
-
presentAttendance Attendance[] @relation("PresentAttendance")
|
|
139
|
-
lateAttendance Attendance[] @relation("LateAttendance")
|
|
140
|
-
absentAttendance Attendance[] @relation("AbsentAttendance")
|
|
141
|
-
|
|
142
|
-
// New relations
|
|
143
|
-
departmentHead Department? @relation("DepartmentHead")
|
|
144
|
-
departmentTeacher Department[] @relation("DepartmentTeachers")
|
|
145
|
-
|
|
146
|
-
// Additional fields
|
|
147
|
-
role String @default("STUDENT") // STUDENT, TEACHER, ADMIN, STAFF
|
|
148
|
-
status String @default("ACTIVE") // ACTIVE, INACTIVE, SUSPENDED
|
|
149
|
-
enrollmentDate DateTime?
|
|
150
|
-
graduationDate DateTime?
|
|
151
|
-
studentId String? @unique // Student ID number
|
|
152
|
-
employeeId String? @unique // Employee ID number
|
|
153
|
-
emergencyContact Json? // Store emergency contact information
|
|
154
|
-
medicalInfo Json? // Store medical information
|
|
155
|
-
academicInfo Json? // Store academic information (GPA, credits, etc.)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
model Class {
|
|
159
|
-
id String @id @default(uuid())
|
|
160
|
-
name String
|
|
161
|
-
subject String
|
|
162
|
-
section String
|
|
163
|
-
teachers User[] @relation("UserTeacherToClass")
|
|
164
|
-
students User[] @relation("UserStudentToClass")
|
|
165
|
-
|
|
166
|
-
assignments Assignment[]
|
|
167
|
-
sessions Session[]
|
|
168
|
-
events Event[]
|
|
169
|
-
sections Section[]
|
|
170
|
-
announcements Announcement[]
|
|
171
|
-
attendance Attendance[]
|
|
172
|
-
|
|
173
|
-
institution Institution? @relation(fields: [institutionId], references: [id])
|
|
174
|
-
institutionId String?
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
model File {
|
|
178
|
-
id String @id @default(uuid())
|
|
179
|
-
name String
|
|
180
|
-
path String
|
|
181
|
-
size Int?
|
|
182
|
-
type String
|
|
183
|
-
user User? @relation(fields: [userId], references: [id])
|
|
184
|
-
userId String?
|
|
185
|
-
uploadedAt DateTime? @default(now())
|
|
186
|
-
|
|
187
|
-
// Thumbnail relationship
|
|
188
|
-
thumbnail File? @relation("Thumbnail", fields: [thumbnailId], references: [id])
|
|
189
|
-
thumbnailId String? @unique
|
|
190
|
-
originalFile File? @relation("Thumbnail")
|
|
191
|
-
|
|
192
|
-
assignment Assignment? @relation(fields: [assignmentId], references: [id], onDelete: Cascade)
|
|
193
|
-
assignmentId String?
|
|
194
|
-
|
|
195
|
-
submission Submission? @relation("SubmissionFile", fields: [submissionId], references: [id], onDelete: Cascade)
|
|
196
|
-
submissionId String?
|
|
197
|
-
|
|
198
|
-
annotations Submission? @relation("SubmissionAnnotations", fields: [annotationId], references: [id], onDelete: Cascade)
|
|
199
|
-
annotationId String?
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
model Assignment {
|
|
203
|
-
id String @id @default(uuid())
|
|
204
|
-
title String
|
|
205
|
-
instructions String
|
|
206
|
-
dueDate DateTime
|
|
207
|
-
createdAt DateTime? @default(now())
|
|
208
|
-
modifiedAt DateTime? @updatedAt
|
|
209
|
-
teacher User @relation(fields: [teacherId], references: [id], onDelete: NoAction)
|
|
210
|
-
teacherId String
|
|
211
|
-
class Class @relation(fields: [classId], references: [id], onDelete: Cascade)
|
|
212
|
-
classId String
|
|
213
|
-
attachments File[]
|
|
214
|
-
submissions Submission[]
|
|
215
|
-
section Section? @relation(fields: [sectionId], references: [id], onDelete: Cascade)
|
|
216
|
-
sectionId String?
|
|
217
|
-
graded Boolean @default(false)
|
|
218
|
-
maxGrade Int? @default(0)
|
|
219
|
-
weight Float @default(1)
|
|
220
|
-
type AssignmentType @default(HOMEWORK)
|
|
221
|
-
rubric Json? // For storing rubric data
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
model Announcement {
|
|
225
|
-
id String @id @default(uuid())
|
|
226
|
-
remarks String
|
|
227
|
-
teacher User @relation(fields: [teacherId], references: [id])
|
|
228
|
-
teacherId String
|
|
229
|
-
createdAt DateTime @default(now())
|
|
230
|
-
class Class @relation(fields: [classId], references: [id], onDelete: Cascade)
|
|
231
|
-
classId String
|
|
232
|
-
institution Institution? @relation(fields: [institutionId], references: [id])
|
|
233
|
-
institutionId String?
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
model Submission {
|
|
237
|
-
id String @id @default(uuid())
|
|
238
|
-
createdAt DateTime @default(now())
|
|
239
|
-
modifiedAt DateTime @default(now())
|
|
240
|
-
|
|
241
|
-
assignment Assignment @relation(fields: [assignmentId], references: [id], onDelete: Cascade)
|
|
242
|
-
assignmentId String
|
|
243
|
-
|
|
244
|
-
student User @relation(fields: [studentId], references: [id])
|
|
245
|
-
studentId String
|
|
246
|
-
|
|
247
|
-
attachments File[] @relation("SubmissionFile")
|
|
248
|
-
annotations File[] @relation("SubmissionAnnotations")
|
|
249
|
-
|
|
250
|
-
gradeReceived Int?
|
|
251
|
-
|
|
252
|
-
submittedAt DateTime?
|
|
253
|
-
submitted Boolean? @default(false)
|
|
254
|
-
returned Boolean? @default(false)
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
model Section {
|
|
258
|
-
id String @id @default(uuid())
|
|
259
|
-
name String
|
|
260
|
-
classId String
|
|
261
|
-
class Class @relation(fields: [classId], references: [id], onDelete: Cascade)
|
|
262
|
-
assignments Assignment[]
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
model Session {
|
|
266
|
-
id String @id @default(uuid())
|
|
267
|
-
createdAt DateTime? @default(now())
|
|
268
|
-
expiresAt DateTime?
|
|
269
|
-
userId String?
|
|
270
|
-
user User? @relation(fields: [userId], references: [id], onDelete: NoAction)
|
|
271
|
-
classId String?
|
|
272
|
-
class Class? @relation(fields: [classId], references: [id], onDelete: Cascade)
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
model Event {
|
|
276
|
-
id String @id @default(uuid())
|
|
277
|
-
name String?
|
|
278
|
-
startTime DateTime
|
|
279
|
-
endTime DateTime
|
|
280
|
-
location String?
|
|
281
|
-
remarks String?
|
|
282
|
-
userId String?
|
|
283
|
-
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
284
|
-
classId String?
|
|
285
|
-
class Class? @relation(fields: [classId], references: [id], onDelete: Cascade)
|
|
286
|
-
institution Institution? @relation(fields: [institutionId], references: [id])
|
|
287
|
-
institutionId String?
|
|
288
|
-
attendance Attendance[]
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
model Attendance {
|
|
292
|
-
id String @id @default(uuid())
|
|
293
|
-
date DateTime @default(now())
|
|
294
|
-
|
|
295
|
-
class Class @relation(fields: [classId], references: [id], onDelete: Cascade)
|
|
296
|
-
classId String
|
|
297
|
-
|
|
298
|
-
event Event? @relation(fields: [eventId], references: [id], onDelete: Cascade)
|
|
299
|
-
eventId String?
|
|
300
|
-
|
|
301
|
-
present User[] @relation("PresentAttendance")
|
|
302
|
-
late User[] @relation("LateAttendance")
|
|
303
|
-
absent User[] @relation("AbsentAttendance")
|
|
304
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./index"
|
package/generated/prisma/wasm.js
DELETED
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* !!! This is code generated by Prisma. Do not edit directly. !!!
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
Decimal,
|
|
9
|
-
objectEnumValues,
|
|
10
|
-
makeStrictEnum,
|
|
11
|
-
Public,
|
|
12
|
-
getRuntime,
|
|
13
|
-
skip
|
|
14
|
-
} = require('./runtime/index-browser.js')
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const Prisma = {}
|
|
18
|
-
|
|
19
|
-
exports.Prisma = Prisma
|
|
20
|
-
exports.$Enums = {}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Prisma Client JS version: 6.7.0
|
|
24
|
-
* Query Engine version: 3cff47a7f5d65c3ea74883f1d736e41d68ce91ed
|
|
25
|
-
*/
|
|
26
|
-
Prisma.prismaVersion = {
|
|
27
|
-
client: "6.7.0",
|
|
28
|
-
engine: "3cff47a7f5d65c3ea74883f1d736e41d68ce91ed"
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
Prisma.PrismaClientKnownRequestError = () => {
|
|
32
|
-
const runtimeName = getRuntime().prettyName;
|
|
33
|
-
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
34
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
35
|
-
)};
|
|
36
|
-
Prisma.PrismaClientUnknownRequestError = () => {
|
|
37
|
-
const runtimeName = getRuntime().prettyName;
|
|
38
|
-
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
39
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
40
|
-
)}
|
|
41
|
-
Prisma.PrismaClientRustPanicError = () => {
|
|
42
|
-
const runtimeName = getRuntime().prettyName;
|
|
43
|
-
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
44
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
45
|
-
)}
|
|
46
|
-
Prisma.PrismaClientInitializationError = () => {
|
|
47
|
-
const runtimeName = getRuntime().prettyName;
|
|
48
|
-
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
49
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
50
|
-
)}
|
|
51
|
-
Prisma.PrismaClientValidationError = () => {
|
|
52
|
-
const runtimeName = getRuntime().prettyName;
|
|
53
|
-
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
54
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
55
|
-
)}
|
|
56
|
-
Prisma.Decimal = Decimal
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Re-export of sql-template-tag
|
|
60
|
-
*/
|
|
61
|
-
Prisma.sql = () => {
|
|
62
|
-
const runtimeName = getRuntime().prettyName;
|
|
63
|
-
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
64
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
65
|
-
)}
|
|
66
|
-
Prisma.empty = () => {
|
|
67
|
-
const runtimeName = getRuntime().prettyName;
|
|
68
|
-
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
69
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
70
|
-
)}
|
|
71
|
-
Prisma.join = () => {
|
|
72
|
-
const runtimeName = getRuntime().prettyName;
|
|
73
|
-
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
74
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
75
|
-
)}
|
|
76
|
-
Prisma.raw = () => {
|
|
77
|
-
const runtimeName = getRuntime().prettyName;
|
|
78
|
-
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
79
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
80
|
-
)}
|
|
81
|
-
Prisma.validator = Public.validator
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Extensions
|
|
85
|
-
*/
|
|
86
|
-
Prisma.getExtensionContext = () => {
|
|
87
|
-
const runtimeName = getRuntime().prettyName;
|
|
88
|
-
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
89
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
90
|
-
)}
|
|
91
|
-
Prisma.defineExtension = () => {
|
|
92
|
-
const runtimeName = getRuntime().prettyName;
|
|
93
|
-
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
94
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
95
|
-
)}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Shorthand utilities for JSON filtering
|
|
99
|
-
*/
|
|
100
|
-
Prisma.DbNull = objectEnumValues.instances.DbNull
|
|
101
|
-
Prisma.JsonNull = objectEnumValues.instances.JsonNull
|
|
102
|
-
Prisma.AnyNull = objectEnumValues.instances.AnyNull
|
|
103
|
-
|
|
104
|
-
Prisma.NullTypes = {
|
|
105
|
-
DbNull: objectEnumValues.classes.DbNull,
|
|
106
|
-
JsonNull: objectEnumValues.classes.JsonNull,
|
|
107
|
-
AnyNull: objectEnumValues.classes.AnyNull
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Enums
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
117
|
-
ReadUncommitted: 'ReadUncommitted',
|
|
118
|
-
ReadCommitted: 'ReadCommitted',
|
|
119
|
-
RepeatableRead: 'RepeatableRead',
|
|
120
|
-
Serializable: 'Serializable'
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
exports.Prisma.InstitutionScalarFieldEnum = {
|
|
124
|
-
id: 'id',
|
|
125
|
-
name: 'name',
|
|
126
|
-
settings: 'settings',
|
|
127
|
-
address: 'address',
|
|
128
|
-
phone: 'phone',
|
|
129
|
-
email: 'email',
|
|
130
|
-
website: 'website',
|
|
131
|
-
logo: 'logo',
|
|
132
|
-
academicYear: 'academicYear',
|
|
133
|
-
term: 'term',
|
|
134
|
-
startDate: 'startDate',
|
|
135
|
-
endDate: 'endDate',
|
|
136
|
-
gradingSystem: 'gradingSystem',
|
|
137
|
-
attendancePolicy: 'attendancePolicy',
|
|
138
|
-
academicCalendar: 'academicCalendar',
|
|
139
|
-
tuitionRates: 'tuitionRates',
|
|
140
|
-
paymentSchedule: 'paymentSchedule',
|
|
141
|
-
notificationPreferences: 'notificationPreferences',
|
|
142
|
-
communicationTemplates: 'communicationTemplates'
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
exports.Prisma.DepartmentScalarFieldEnum = {
|
|
146
|
-
id: 'id',
|
|
147
|
-
name: 'name',
|
|
148
|
-
description: 'description',
|
|
149
|
-
headId: 'headId',
|
|
150
|
-
institutionId: 'institutionId',
|
|
151
|
-
createdAt: 'createdAt',
|
|
152
|
-
updatedAt: 'updatedAt'
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
exports.Prisma.CourseScalarFieldEnum = {
|
|
156
|
-
id: 'id',
|
|
157
|
-
code: 'code',
|
|
158
|
-
name: 'name',
|
|
159
|
-
description: 'description',
|
|
160
|
-
credits: 'credits',
|
|
161
|
-
departmentId: 'departmentId',
|
|
162
|
-
institutionId: 'institutionId',
|
|
163
|
-
prerequisites: 'prerequisites',
|
|
164
|
-
syllabus: 'syllabus',
|
|
165
|
-
createdAt: 'createdAt',
|
|
166
|
-
updatedAt: 'updatedAt'
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
exports.Prisma.ScheduleScalarFieldEnum = {
|
|
170
|
-
id: 'id',
|
|
171
|
-
name: 'name',
|
|
172
|
-
startDate: 'startDate',
|
|
173
|
-
endDate: 'endDate',
|
|
174
|
-
institutionId: 'institutionId',
|
|
175
|
-
type: 'type',
|
|
176
|
-
description: 'description',
|
|
177
|
-
createdAt: 'createdAt',
|
|
178
|
-
updatedAt: 'updatedAt'
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
exports.Prisma.UserScalarFieldEnum = {
|
|
182
|
-
id: 'id',
|
|
183
|
-
username: 'username',
|
|
184
|
-
password: 'password',
|
|
185
|
-
profile: 'profile',
|
|
186
|
-
institutionId: 'institutionId',
|
|
187
|
-
role: 'role',
|
|
188
|
-
status: 'status',
|
|
189
|
-
enrollmentDate: 'enrollmentDate',
|
|
190
|
-
graduationDate: 'graduationDate',
|
|
191
|
-
studentId: 'studentId',
|
|
192
|
-
employeeId: 'employeeId',
|
|
193
|
-
emergencyContact: 'emergencyContact',
|
|
194
|
-
medicalInfo: 'medicalInfo',
|
|
195
|
-
academicInfo: 'academicInfo'
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
exports.Prisma.ClassScalarFieldEnum = {
|
|
199
|
-
id: 'id',
|
|
200
|
-
name: 'name',
|
|
201
|
-
subject: 'subject',
|
|
202
|
-
section: 'section',
|
|
203
|
-
institutionId: 'institutionId'
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
exports.Prisma.FileScalarFieldEnum = {
|
|
207
|
-
id: 'id',
|
|
208
|
-
name: 'name',
|
|
209
|
-
path: 'path',
|
|
210
|
-
size: 'size',
|
|
211
|
-
type: 'type',
|
|
212
|
-
userId: 'userId',
|
|
213
|
-
uploadedAt: 'uploadedAt',
|
|
214
|
-
thumbnailId: 'thumbnailId',
|
|
215
|
-
assignmentId: 'assignmentId',
|
|
216
|
-
submissionId: 'submissionId',
|
|
217
|
-
annotationId: 'annotationId'
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
exports.Prisma.AssignmentScalarFieldEnum = {
|
|
221
|
-
id: 'id',
|
|
222
|
-
title: 'title',
|
|
223
|
-
instructions: 'instructions',
|
|
224
|
-
dueDate: 'dueDate',
|
|
225
|
-
createdAt: 'createdAt',
|
|
226
|
-
modifiedAt: 'modifiedAt',
|
|
227
|
-
teacherId: 'teacherId',
|
|
228
|
-
classId: 'classId',
|
|
229
|
-
sectionId: 'sectionId',
|
|
230
|
-
graded: 'graded',
|
|
231
|
-
maxGrade: 'maxGrade',
|
|
232
|
-
weight: 'weight',
|
|
233
|
-
type: 'type',
|
|
234
|
-
rubric: 'rubric'
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
exports.Prisma.AnnouncementScalarFieldEnum = {
|
|
238
|
-
id: 'id',
|
|
239
|
-
remarks: 'remarks',
|
|
240
|
-
teacherId: 'teacherId',
|
|
241
|
-
createdAt: 'createdAt',
|
|
242
|
-
classId: 'classId',
|
|
243
|
-
institutionId: 'institutionId'
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
exports.Prisma.SubmissionScalarFieldEnum = {
|
|
247
|
-
id: 'id',
|
|
248
|
-
createdAt: 'createdAt',
|
|
249
|
-
modifiedAt: 'modifiedAt',
|
|
250
|
-
assignmentId: 'assignmentId',
|
|
251
|
-
studentId: 'studentId',
|
|
252
|
-
gradeReceived: 'gradeReceived',
|
|
253
|
-
submittedAt: 'submittedAt',
|
|
254
|
-
submitted: 'submitted',
|
|
255
|
-
returned: 'returned'
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
exports.Prisma.SectionScalarFieldEnum = {
|
|
259
|
-
id: 'id',
|
|
260
|
-
name: 'name',
|
|
261
|
-
classId: 'classId'
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
exports.Prisma.SessionScalarFieldEnum = {
|
|
265
|
-
id: 'id',
|
|
266
|
-
createdAt: 'createdAt',
|
|
267
|
-
expiresAt: 'expiresAt',
|
|
268
|
-
userId: 'userId',
|
|
269
|
-
classId: 'classId'
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
exports.Prisma.EventScalarFieldEnum = {
|
|
273
|
-
id: 'id',
|
|
274
|
-
name: 'name',
|
|
275
|
-
startTime: 'startTime',
|
|
276
|
-
endTime: 'endTime',
|
|
277
|
-
location: 'location',
|
|
278
|
-
remarks: 'remarks',
|
|
279
|
-
userId: 'userId',
|
|
280
|
-
classId: 'classId',
|
|
281
|
-
institutionId: 'institutionId'
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
exports.Prisma.AttendanceScalarFieldEnum = {
|
|
285
|
-
id: 'id',
|
|
286
|
-
date: 'date',
|
|
287
|
-
classId: 'classId',
|
|
288
|
-
eventId: 'eventId'
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
exports.Prisma.SortOrder = {
|
|
292
|
-
asc: 'asc',
|
|
293
|
-
desc: 'desc'
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
exports.Prisma.NullableJsonNullValueInput = {
|
|
297
|
-
DbNull: Prisma.DbNull,
|
|
298
|
-
JsonNull: Prisma.JsonNull
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
exports.Prisma.QueryMode = {
|
|
302
|
-
default: 'default',
|
|
303
|
-
insensitive: 'insensitive'
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
exports.Prisma.JsonNullValueFilter = {
|
|
307
|
-
DbNull: Prisma.DbNull,
|
|
308
|
-
JsonNull: Prisma.JsonNull,
|
|
309
|
-
AnyNull: Prisma.AnyNull
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
exports.Prisma.NullsOrder = {
|
|
313
|
-
first: 'first',
|
|
314
|
-
last: 'last'
|
|
315
|
-
};
|
|
316
|
-
exports.AssignmentType = exports.$Enums.AssignmentType = {
|
|
317
|
-
HOMEWORK: 'HOMEWORK',
|
|
318
|
-
QUIZ: 'QUIZ',
|
|
319
|
-
TEST: 'TEST',
|
|
320
|
-
PROJECT: 'PROJECT',
|
|
321
|
-
ESSAY: 'ESSAY',
|
|
322
|
-
DISCUSSION: 'DISCUSSION',
|
|
323
|
-
PRESENTATION: 'PRESENTATION',
|
|
324
|
-
LAB: 'LAB',
|
|
325
|
-
OTHER: 'OTHER',
|
|
326
|
-
ANNOUNCEMENT: 'ANNOUNCEMENT'
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
exports.Prisma.ModelName = {
|
|
330
|
-
Institution: 'Institution',
|
|
331
|
-
Department: 'Department',
|
|
332
|
-
Course: 'Course',
|
|
333
|
-
Schedule: 'Schedule',
|
|
334
|
-
User: 'User',
|
|
335
|
-
Class: 'Class',
|
|
336
|
-
File: 'File',
|
|
337
|
-
Assignment: 'Assignment',
|
|
338
|
-
Announcement: 'Announcement',
|
|
339
|
-
Submission: 'Submission',
|
|
340
|
-
Section: 'Section',
|
|
341
|
-
Session: 'Session',
|
|
342
|
-
Event: 'Event',
|
|
343
|
-
Attendance: 'Attendance'
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* This is a stub Prisma Client that will error at runtime if called.
|
|
348
|
-
*/
|
|
349
|
-
class PrismaClient {
|
|
350
|
-
constructor() {
|
|
351
|
-
return new Proxy(this, {
|
|
352
|
-
get(target, prop) {
|
|
353
|
-
let message
|
|
354
|
-
const runtime = getRuntime()
|
|
355
|
-
if (runtime.isEdge) {
|
|
356
|
-
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
|
|
357
|
-
- Use Prisma Accelerate: https://pris.ly/d/accelerate
|
|
358
|
-
- Use Driver Adapters: https://pris.ly/d/driver-adapters
|
|
359
|
-
`;
|
|
360
|
-
} else {
|
|
361
|
-
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
message += `
|
|
365
|
-
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
|
|
366
|
-
|
|
367
|
-
throw new Error(message)
|
|
368
|
-
}
|
|
369
|
-
})
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
exports.PrismaClient = PrismaClient
|
|
374
|
-
|
|
375
|
-
Object.assign(exports, Prisma)
|