Data Layer low complexity mobile
0
Dependencies
4
Dependents
0
Entities
0
Integrations

Description

Drift table and repository adapter for workshop session records containing title, description, date range, location, and coordinator foreign key. Provides offline-capable read/write via the SQLCipher-encrypted local database and exposes a watch stream for reactive UI updates.

Feature: Career Workshops

workshops

Sources & reasoning

The workshops table is the canonical data store for session records. A Drift DAO is required to provide offline-first access with reactive streams, consistent with the platform's Drift/SQLCipher persistence strategy described in the implementation notes.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Persist workshop records locally in Drift/SQLCipher
  • Expose watchAll and watchById streams for reactive Riverpod providers
  • Sync create/update/delete mutations through the mutation outbox
  • Map between Dart data classes and database row representations

Interfaces

watchWorkshops(orgId: String) → Stream<List<WorkshopRow>>
insertWorkshop(row: WorkshopCompanion) → Future<int>
updateWorkshop(row: WorkshopCompanion) → Future<bool>
deleteWorkshop(id: String) → Future<int>
getWorkshopById(id: String) → Future<WorkshopRow?>