Do
Use one canonical row per (
student_applicant,document_type) and treat new uploads as newer evidence for that slot.Use reviewer roles (
Academic AdminorSystem Manager) forreview_statusandis_promotabledecisions.
Track each applicant document type, review status, and promotion relevance with strict immutability and governed file handling.
Applicant Document is the semantic owner of admissions files. It is not a generic attachment row and it is not optional metadata.
Applicant Document is the canonical container between applicant lifecycle and file governance:
Inquiry -> Student Applicant -> Applicant Document -> promotion copy to StudentApplicant DocumentStudent Applicant or Student is forbiddenStudent Applicant.applicant_image remains a specific identity-image exceptionAll admissions evidence files must attach to Applicant Document. Treat any alternative attachment path as an architecture bug.
student_applicant, document_type).student_applicant and document_type are immutable after insert.review_status, reviewer metadata, review notes).is_promotable is valid only when review_status = Approved.| Actor | Allowed | Forbidden |
|---|---|---|
Admissions Applicant (portal) |
list types, list documents, upload document file | approve/reject, edit review fields, change document_type, delete rows |
Admission Officer / Admission Manager |
create/manage rows, operational follow-up | reviewer-only decisions unless also reviewer role |
Academic Admin / System Manager |
reviewer decisions and promotion flags | bypassing immutable field rules |
Use one canonical row per (student_applicant, document_type) and treat new uploads as newer evidence for that slot.
Use reviewer roles (Academic Admin or System Manager) for review_status and is_promotable decisions.
Attach admissions evidence directly to Student Applicant or Student.
Re-link applicant-side File rows to student records during promotion.
Create or resolve a single Applicant Document for (student_applicant, document_type).
Upload files through governed admissions endpoints so files attach to Applicant Document only.
Reviewer roles set review_status, reviewer metadata, and optional review notes.
Mark is_promotable only after approval and set promotion_target where applicable.
Promotion copies approved applicant evidence into new Student files with lineage; applicant-side files remain unchanged.
Promotion must keep admissions and student ownership separated:
Applicant DocumentThis preserves auditability, GDPR-local erasure semantics, and operational traceability.
Applicant Document.validateUPLOAD_ROLES + reviewer-only field guard)Rejected, Promoted)student_applicant, document_type)student_applicant, document_type)is_promotable requires approved + reviewer role)Applicant Document.before_deleteSystem Managerupload_applicant_document)primary_subject_type = Student ApplicantApplicant Documenthas_required_documents)Applicant Document as ref_doctype.DocType schema file: ifitwala_ed/admission/doctype/applicant_document/applicant_document.json
Controller file: ifitwala_ed/admission/doctype/applicant_document/applicant_document.py
Required fields (reqd=1):
student_applicant (Link -> Student Applicant)document_type (Link -> Applicant Document Type)Lifecycle hooks in controller: validate, before_delete
Operational/public methods: get_file_routing_context
DocType: Applicant Document (ifitwala_ed/admission/doctype/applicant_document/)
Autoname: hash
Core field contract:
document_label optional override labelreview_status options: Pending, Approved, Rejected, Superseded (default Pending)is_promotable default 0promotion_target options: Student, Administrative RecordRouting context contract (get_file_routing_context):
root_folder = Home/Admissionssubfolder = Applicant/<student_applicant>/Documents/<doc_type_code>file_category = Admissions Applicant Documentlogical_key = <doc_type_code>Portal/API surfaces:
ifitwala_ed/admission/admissions_portal.py::upload_applicant_documentifitwala_ed/api/admissions_portal.py::list_applicant_documents, list_applicant_document_typesifitwala_ed/api/admissions_portal.py::upload_applicant_documentifitwala_ed/ui-spa/src/pages/admissions/ApplicantDocuments.vueRuntime role guards (controller):
Academic Admin + System Manager + Admissions ApplicantAcademic Admin, System ManagerReadiness and promotion integration:
Student Applicant.has_required_documents()Student Applicant._copy_promotable_documents_to_student()| Role | Read | Write | Create | Delete | Notes |
|---|---|---|---|---|---|
Admission Manager |
Yes | Yes | Yes | Yes | Runtime delete guard applies when files exist |
Admission Officer |
Yes | Yes | Yes | Yes | Runtime reviewer guard still applies |
Academic Admin |
Yes | Yes | Yes | Yes | Reviewer authority |
System Manager |
Yes | Yes | Yes | Yes | Reviewer authority + delete override with attached files |
Curriculum Coordinator |
Yes | Yes | Yes | Yes | Runtime guard limits review semantics |
Admissions Applicant |
Yes | Yes | Yes | No | Portal-scoped behavior still enforced server-side |
Academic Assistant |
Yes | Yes | Yes | Yes | Runtime guard limits review semantics |
Runtime controller rules are authoritative over DocType matrix permissions.