feat: citizenship applications
This commit is contained in:
+43
-1
@@ -24,12 +24,14 @@ model User {
|
||||
firstName String
|
||||
secondName String
|
||||
sex Sex
|
||||
birthDate DateTime
|
||||
birthDate DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
isAdmin Boolean @default(false)
|
||||
|
||||
pages Page[] @relation("PageAuthor")
|
||||
editedPages Page[] @relation("PageEditor")
|
||||
|
||||
citizenshipApplications CitizenshipApplication[]
|
||||
}
|
||||
|
||||
enum PageStatus {
|
||||
@@ -88,4 +90,44 @@ model NavLink {
|
||||
pageId String?
|
||||
page Page? @relation(fields: [pageId], references: [id], onDelete: SetNull)
|
||||
href String?
|
||||
}
|
||||
|
||||
enum CitizenshipApplicationStatus {
|
||||
PENDING
|
||||
APPROVED
|
||||
REJECTED
|
||||
}
|
||||
|
||||
enum ApplicationType {
|
||||
PREVIOUS_CITIZENSHIP
|
||||
BORN_IN_TERRITORY
|
||||
NATURALIZATION
|
||||
}
|
||||
|
||||
model CitizenshipApplication {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
surname String
|
||||
givenNames String
|
||||
sex Sex
|
||||
birthDate DateTime
|
||||
|
||||
applicationType ApplicationType
|
||||
|
||||
previousCountry String?
|
||||
previousRegion String?
|
||||
birthRegion String?
|
||||
naturalizationReason String?
|
||||
|
||||
address String
|
||||
height String
|
||||
eyeColor String
|
||||
|
||||
status CitizenshipApplicationStatus @default(PENDING)
|
||||
rejectionReason String?
|
||||
reviewedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
Reference in New Issue
Block a user