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:
Achintha Isuru
2026-02-26 15:45:55 -05:00
parent df71deb698
commit 050072bd93
3 changed files with 85 additions and 2 deletions

View File

@@ -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