Data Layer low complexity backend
0
Dependencies
2
Dependents
2
Entities
0
Integrations

Description

Data access layer for the organization_settings table, which has a one-to-one relationship with the organizations table. Handles upsert semantics for settings rows and exposes typed query methods. Decrypts sensitive fields on read using the platform encryption key before returning data to the service layer.

Feature: Organization Settings

organization-repository

Responsibilities

  • Read organization settings row for a given org ID with decrypted sensitive fields
  • Upsert organization settings using parameterized SQL to prevent injection
  • Map raw database rows to typed OrganizationSettings domain objects
  • Expose transaction support for atomic settings updates

Interfaces

findByOrgId(orgId: string): Promise<OrganizationSettings | null>
upsert(orgId: string, data: Partial<OrganizationSettings>): Promise<OrganizationSettings>
findOrganizationById(orgId: string): Promise<Organization | null>

Relationships

Dependents (2)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component