Assignment Read
Data Entity
Description
Audit record tracking when a peer mentor opens and reads an encrypted assignment, providing delivery confirmation and read receipt functionality for coordinators dispatching sensitive personal information.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Primary key | PKrequiredunique |
assignment_id |
uuid |
Foreign key to the assignment that was read | required |
user_id |
uuid |
Foreign key to the peer mentor who read the assignment | required |
read_at |
datetime |
Timestamp when the peer mentor first opened and read the assignment | required |
device_info |
json |
Device metadata at time of read (platform, OS version, app version) for audit trail completeness | - |
ip_address |
string |
IP address from which the read occurred, for security audit purposes | - |
is_first_read |
boolean |
Whether this is the first time this user read this assignment (subsequent opens are also recorded but flagged) | required |
read_count |
integer |
Cumulative number of times this user has opened this assignment | required |
created_at |
datetime |
Record creation timestamp | required |
Database Indexes
idx_assignment_reads_assignment_id
Columns: assignment_id
idx_assignment_reads_user_id
Columns: user_id
idx_assignment_reads_assignment_user
Columns: assignment_id, user_id
idx_assignment_reads_read_at
Columns: read_at
Validation Rules
valid_assignment_reference
error
Validation failed
valid_user_reference
error
Validation failed
read_at_not_future
error
Validation failed
read_count_positive
error
Validation failed
Business Rules
read_receipt_on_open
A read record must be created the first time a peer mentor opens an encrypted assignment. This provides the coordinator with delivery confirmation.
threshold_check_on_read
After each new first-read record is created, the assignment threshold service must re-evaluate whether the cumulative assignment count for this user's organization has crossed a billing/honor threshold (e.g., 3rd assignment triggers office fee, 15th triggers higher rate for Blindeforbundet).
immutable_read_record
Read records cannot be modified after creation. They are append-only audit records. Only the read_count may be incremented on subsequent opens.
auto_reminder_on_unread
If no read record exists for an assignment after 10 days, the notification system must trigger an automatic reminder to the peer mentor (Blindeforbundet requirement).
one_first_read_per_user_assignment
Only one record may have is_first_read=true for a given (assignment_id, user_id) pair. Subsequent opens increment read_count on the existing record rather than creating new first-read records.