Data Model: hbf-stats
Domain objects used by this service. Full schemas:
docs/domain-model.md
Objects This Service Uses
| Object | Access | Key Fields Used |
|---|---|---|
| Tenant | reads via hbf-core-api | id, organizationId, tenantStats, tenantStats.lastStatsUpdate |
| Organization | reads via hbf-core-api | id, timezone |
| AnalyticsSummaryDto | reads via hbf-core-api | summary metrics per tenant |
| Stats | writes via hbf-core-api | computed stats object written to tenant document |
Notes
- No local database. Computes statistics and writes them back to tenant documents in hbf-core.
- Polls for tenants whose stats are stale (
statsUpdateLessThanfilter) based onSTATS_LIFESPAN_MINUTES. - Configurable batch size via
NUMBER_OF_TENANTS_TO_BE_UPDATED. - Uses hbf-core-api
HBFCoreApiclient:TenantsClient.list(),TenantsClient.createOrUpdateStats(),OrganizationsClient.find(),AnalyticsClient.getSummary(). - Reads organization timezone to compute date-range-scoped analytics.