Documents are linked to business entities such as contracts, properties, bills, expenses, and maintenance requests. Future functionality should allow controlled sharing between parties.
Sharing flow
- A user selects a document.
- The user selects one or more recipient parties or users.
- The system creates share records with explicit access levels.
- The recipient sees the document in their portal.
- Access can be revoked or allowed to expire.
Proposed entity: document_shares
| Field | Description |
|---|
id | Primary identifier. |
document_id | Shared document. |
shared_with_party_id | Recipient party. |
shared_with_user_id | Optional specific recipient user. |
shared_by_user_id | User who shared the document. |
access_level | VIEW or DOWNLOAD. |
status | ACTIVE, REVOKED, EXPIRED. |
expires_at | Optional expiration timestamp. |
created_at | Creation timestamp. |
Access levels
| Access level | Behavior |
|---|
VIEW | Recipient can preview the document in the application. |
DOWNLOAD | Recipient can preview and download the file. |
Design notes
- Sharing should not change document ownership.
- Sharing should be auditable.
- Revoked shares should stop access immediately.
- Sensitive documents should require explicit confirmation before sharing.