105 lines
2.5 KiB
Plaintext
105 lines
2.5 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
binaryTargets = ["native", "darwin-arm64", "linux-musl-arm64-openssl-3.0.x"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
relationMode = "prisma"
|
|
}
|
|
|
|
model Application {
|
|
applicationId String @id @default(uuid())
|
|
applicantId String
|
|
applicant User @relation("AppliedApplications", fields: [applicantId], references: [profileId])
|
|
institute Institute
|
|
department String
|
|
applicantName String
|
|
applicationType String
|
|
formData Json
|
|
formName String
|
|
resubmission Boolean @default(false)
|
|
facultyValidation ApplicationStatus?
|
|
hodValidation ApplicationStatus?
|
|
hoiValidation ApplicationStatus?
|
|
vcValidation ApplicationStatus?
|
|
accountsValidation ApplicationStatus?
|
|
rejectionFeedback String?
|
|
totalExpense Float @default(0)
|
|
proofOfTravel Bytes?
|
|
proofOfAccommodation Bytes?
|
|
proofOfAttendance Bytes?
|
|
expenseProof0 Bytes?
|
|
expenseProof1 Bytes?
|
|
expenseProof2 Bytes?
|
|
expenseProof3 Bytes?
|
|
expenseProof4 Bytes?
|
|
expenseProof5 Bytes?
|
|
expenseProof6 Bytes?
|
|
expenseProof7 Bytes?
|
|
expenseProof8 Bytes?
|
|
expenseProof9 Bytes?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
validators User[] @relation("ToValidateApplications")
|
|
|
|
@@index([applicantId])
|
|
@@index([createdAt])
|
|
}
|
|
|
|
model User {
|
|
profileId String @id @default(uuid())
|
|
userName String
|
|
email String @unique @db.Text
|
|
password String?
|
|
|
|
institute Institute?
|
|
department String?
|
|
designation Designation
|
|
|
|
appliedApplications Application[] @relation("AppliedApplications")
|
|
toValidateApplications Application[] @relation("ToValidateApplications")
|
|
OAuth_AccessToken String?
|
|
OAuth_RefreshToken String?
|
|
auth_mode String
|
|
@@index([email])
|
|
}
|
|
|
|
model ToValidateApplications {
|
|
A String
|
|
B String
|
|
|
|
@@unique([A, B], map: "_ToValidateApplications_AB_unique")
|
|
@@index([B], map: "_ToValidateApplications_B_index")
|
|
@@map("_ToValidateApplications")
|
|
}
|
|
|
|
enum ApplicationStatus {
|
|
REJECTED
|
|
ACCEPTED
|
|
PENDING
|
|
}
|
|
|
|
enum Designation {
|
|
HOD
|
|
HOI
|
|
VC
|
|
ACCOUNTS
|
|
FACULTY
|
|
STUDENT
|
|
}
|
|
|
|
enum Institute {
|
|
KJSIDS
|
|
SKSC
|
|
KJSCE
|
|
SIRC
|
|
KJSIM
|
|
SSA
|
|
KJSCEd
|
|
DLIS
|
|
MSSMPA
|
|
}
|