Status: Accepted (in force). Reconstructed.

Context

Most operational data in PaidHR lives in a per-tenant TenantDb scoped by CompanyId — people, payroll, assets, requests. EWA could plausibly have followed that pattern: it concerns employees, and employees are tenant data.

Decision

Put the EWA entities in MembershipDb, keyed by OrganisationId:

EwaConfigSetting · EwaConfigSettingStatus · EwaApprover · EwaInitialization · EwaWithdrawal

Rationale

EWA is a commercial arrangement between an organisation and a finance provider, not operational HR data:

MembershipDb is already the home for org-level, cross-tenant concerns (identity, organisations, reference data — see Identity RFD), which is exactly the shape of an EWA contract.

Consequences

Good:

Bad / costs: