Data Layer medium complexity mobilebackend
0
Dependencies
2
Dependents
2
Entities
0
Integrations

Description

Data access layer managing persistence and retrieval of organisation-scoped expense type configurations. Stores expense types with their JSON rules field encoding mutual-exclusivity groups, required-documentation flags, and per-type amount thresholds. On the mobile side, caches the active type catalogue fetched at login for offline use and invalidates when rules change.

Feature: Expense Types & Requirements

expense-type-store

Responsibilities

  • Persist expense type records with JSON rules fields per organisation
  • Cache the active expense type catalogue on the mobile client for offline access
  • Invalidate and refresh cache when organisation rules are updated
  • Provide filtered queries by organisation, active status, and type category
  • Store mutual-exclusivity group configurations

Interfaces

getTypesByOrganisation(String orgId): List<ExpenseType>
getActiveTypes(String orgId): List<ExpenseType>
getTypeById(String typeId): ExpenseType?
saveType(ExpenseType type): void
updateType(ExpenseType type): void
deleteType(String typeId): void
cacheTypeCatalogue(String orgId, List<ExpenseType> types): void
getCachedCatalogue(String orgId): List<ExpenseType>?
invalidateCache(String orgId): void
getExclusivityGroups(String orgId): List<ExclusivityGroup>
saveExclusivityGroup(ExclusivityGroup group): void
isCacheStale(String orgId): bool

Relationships

Dependents (2)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component