Part of parent story #36.
🎯 Goal
Implement the core domain entities and lifecycle state machine for the Document Vault reference application.
📋 Specification
- Create
Document model:
- Properties:
title (StringProperty), organizationId (StringProperty), state (StringProperty), fileUri (ObjectUri), financialAmount (NumberProperty).
- Collection name:
'documents'.
- Configure FSM lifecycle via
@quatrain/state-machine:
- States:
DRAFT, IN_REVIEW, APPROVED, REJECTED, ARCHIVED.
- Transition rules: Only author can submit (
DRAFT ➔ IN_REVIEW), only approver can approve/reject.
- Create
AuditLog model for immutable transition history:
- Collection name:
'audit_logs'.
- Properties:
targetUri (ObjectUri), action (StringProperty), actorId (StringProperty), timestamp (DateProperty).
Part of parent story #36.
🎯 Goal
Implement the core domain entities and lifecycle state machine for the Document Vault reference application.
📋 Specification
Documentmodel:title(StringProperty),organizationId(StringProperty),state(StringProperty),fileUri(ObjectUri),financialAmount(NumberProperty).'documents'.@quatrain/state-machine:DRAFT,IN_REVIEW,APPROVED,REJECTED,ARCHIVED.DRAFT➔IN_REVIEW), only approver can approve/reject.AuditLogmodel for immutable transition history:'audit_logs'.targetUri(ObjectUri),action(StringProperty),actorId(StringProperty),timestamp(DateProperty).