Data Layer medium complexity backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Handles all persistence operations for workshop records against the database. Provides CRUD access and query capabilities scoped to coordinator ownership. Translates between domain models and storage representations.

Feature: Career Workshops

workshop-repository

Sources & reasoning

Line 100 names the mentorordning with three explicit sub-capabilities for two-day group sessions, establishing Career Workshops as the parent entity. Line 357 places it in Fase 3 under vekst og engasjement, which maps to v1.1 by ordinal (third phase). Career Workshops is the root session record that the other workshop features depend on.

  • **Mentorordning (karriereverksted):** Eget notatverktøy, to-do-lister og deltakerlister for gruppeveiledning over to dager.
  • Mentorordning / Career Workshops (Blindeforbundet)

Responsibilities

  • Insert new workshop records with generated IDs and timestamps
  • Retrieve single workshops by ID with optional relation loading
  • List workshops filtered by coordinator, status, or date range
  • Update mutable fields and status column atomically
  • Soft-delete or hard-delete workshop records on cancellation

Interfaces

findById(workshopId: string): Promise<WorkshopRow | null>
findByCoordinator(coordinatorId: string, filter?: WorkshopFilter): Promise<WorkshopRow[]>
insert(data: NewWorkshopRow): Promise<WorkshopRow>
update(workshopId: string, patch: Partial<WorkshopRow>): Promise<WorkshopRow>
delete(workshopId: string): Promise<void>