events
Component Detail
Data Layer
low complexity
mobilebackend
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Drift table and repository adapter for the events entity, providing offline-capable CRUD operations against the local SQLCipher database and mapping to/from the API JSON contract. Scoped to the user's organisation and feeds the event listing and sign-up flows.
events
Sources & reasoning
Events require a local Drift table for offline-first support and a repository interface consumed by both Event Service (writes) and the event listing flow (reads). This is the authoritative data layer for the events entity within the mobile client.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Define the local Drift table schema for events (id, org_id, title, date, time, duration, location, summary, sync_status)
- Provide insert and update methods for new and edited events
- Expose a stream of organisation-scoped events for the listing flow
- Track sync status for outbox integration
Interfaces
insertEvent(event: EventEntity): Future<int>
watchOrganisationEvents(orgId: String): Stream<List<EventEntity>>
updateSyncStatus(id: int, status: SyncStatus): Future<void>
getEventById(id: int): Future<EventEntity?>