feat: Implement document upload and verification workflow by expanding document statuses, adding verification metadata, and introducing a mandatory flag for documents.
This commit is contained in:
@@ -14,6 +14,7 @@ type Document @table(name: "documents") {
|
||||
name: String!
|
||||
description: String
|
||||
documentType: DocumentType!
|
||||
isMandatory: Boolean @default(expr: "false")
|
||||
createdAt: Timestamp @default(expr: "request.time")
|
||||
updatedAt: Timestamp @default(expr: "request.time")
|
||||
createdBy: String
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
enum DocumentStatus {
|
||||
UPLOADED
|
||||
PENDING
|
||||
PROCESSING
|
||||
AUTO_PASS
|
||||
AUTO_FAIL
|
||||
NEEDS_REVIEW
|
||||
APPROVED
|
||||
REJECTED
|
||||
ERROR
|
||||
UPLOADED
|
||||
EXPIRING
|
||||
MISSING
|
||||
VERIFIED
|
||||
@@ -12,9 +19,16 @@ type StaffDocument @table(name: "staff_documents", key: ["staffId", "documentId"
|
||||
staffName: String!
|
||||
documentId: UUID!
|
||||
document: Document! @ref(fields: "documentId", references: "id")
|
||||
status: DocumentStatus!
|
||||
|
||||
status: DocumentStatus! @default(expr: "'PENDING'")
|
||||
documentUrl: String
|
||||
expiryDate: Timestamp
|
||||
|
||||
# Verification Metadata (Align with Attire flow)
|
||||
verificationId: String
|
||||
verifiedAt: Timestamp
|
||||
rejectionReason: String
|
||||
|
||||
createdAt: Timestamp @default(expr: "request.time")
|
||||
updatedAt: Timestamp @default(expr: "request.time")
|
||||
createdBy: String
|
||||
|
||||
Reference in New Issue
Block a user