Skip to main content

Data Model: hbf-client-integrations

Domain objects used by this service. Full schemas: docs/domain-model.md

Objects This Service Uses

ObjectAccessKey Fields Used
ChatSessionDTOreads/writes via HTTP to hbf-coreid, messages, status, tags, subscriberHandle
ChatSessionMessageDTOreads via hbf-core-apitype, text
ChatSessionMessageTypereads via hbf-core-apimessage type enum
Subscriberreads via HTTP to hbf-corehandle, tenantId
Tenantreads via HTTP to hbf-coreid, organizationId, content, settings
BotDeploymentreads via HTTP to hbf-coreid, tenantId, settings
Activityreads/writes via HTTP to hbf-coreid, type, tenantId
ActivityCompiledreads via hbf-core-apicompiled activity data
Userreads via HTTP to hbf-core (auth)id, email, roles
Transcriptreads via HTTP to hbf-coresession transcript
AnonymizationNamedEntityTypereads via hbf-core-apianonymization type enum

Local Entities (Client-Specific)

SIXT

EntityTableDBKey Fields
GreetingMessageSIXT_GREETING_MESSAGESMySQLid (PK, external checkout item ID), plate (indexed), phone, status (enum, indexed), resno, agrno, checkoutDate (indexed), checkoutStation, deliveredToChannel, deliveredAt, urlClickedAt, urlClickedTimes, error

Novibet

EntityTableDBKey Fields
NovibetViberContactNOVIBET_VIBER_CONTACTMySQLid (PK, Viber ID), viberUsername, novibetUsername (unique)
NovibetBetNOVIBET_BETMySQLid (auto), option (enum), contact (FK), match (FK). Unique on (contact, match)
NovibetMatchDayNOVIBET_MATCHDAYMySQLid (auto), matchDay (unique), activityId, completed, sentWinningMessages*
NovibetMatchNOVIBET_MATCHMySQLid (auto), activityId, externalId (unique), title, option1/2/3, matchStartDateTime, matchEndDateTime, result, winningOption, league, liveStreamUrl, matchDay (FK)
NovibetLeaderboardNOVIBET_LEADERBOARDMySQLid (auto), title, type (MONTHLY/CUSTOM_RANGE), periodStart, periodEnd, totalParticipants
NovibetLeaderboardEntryNOVIBET_LEADERBOARD_ENTRYMySQLid (auto), leaderboard (FK), contact (FK), position, points, totalBets, correctPredictions, successRate (decimal)
NovibetGenesysQueueNOVIBET_GENESYS_QUEUEMySQLComposite PK (VIP_TYPE, DEPARTMENT, LANGUAGE, COUNTRY), QUEUE_NAME, QUEUE_ID, CALLBACK_QUEUE_NAME, CALLBACK_QUEUE_ID

AIA (Athens International Airport)

EntityTableDBKey Fields
FlightAIA_FLIGHTSMySQLid (PK, FLIGHT_UNIQUE_ID), type (STI discriminator), AIRLINE_IATA_CODE, FLIGHT_NUMBER, FLIGHT_KIND, ORIGIN_AIRPORT, DESTINATION_AIRPORT, REMARK, STATUS, SCHEDULED_TIME
ArrivalFlightAIA_FLIGHTS (STI)MySQLTIME, FIRST_BAG_TIME, LAST_BAG_TIME, BAGGAGE_BELT, EXIT
DepartureFlightAIA_FLIGHTS (STI)MySQLTIME
GateAIA_GATEMySQLid (auto), START_DATE, END_DATE, GATE_NAME, flight (FK, CASCADE)
CheckInAIA_CHECK_INMySQLid (auto), START_DATE, END_DATE, SCHEDULED_OPEN, SCHEDULED_CLOSE, DESK_NO, flight (FK, CASCADE)
AirportAIA_AIRPORTMySQLComposite PK (IATA_CODE, ICAO_CODE), NAME, COUNTRY, NAME_TRANSLATION
AirlineAIA_AIRLINEMySQLIATA_CODE (PK), ICAO_CODE, NAME, LOGO_URL
SubscriberAIA_SUBSCRIBERMySQLid (auto), FACEBOOK_ID, LANGUAGE, flight (FK, CASCADE)
OperationStatusAIA_OPERATION_STATUSMySQLID (auto), OPERATION_NAME, CREATED_AT, DETAILS, STATUS
RelevantFlightrelevant_flightMySQLid (uuid), flight (FK, CASCADE), flightId (unique)

Notes

  • Multi-database architecture: each client distributor (SIXT, Novibet, AIA) has its own MySQL database/connection.
  • AIA flights use single-table inheritance (STI) with a type discriminator column for Arrival vs Departure.
  • Client-specific entities are completely independent from hbf-core domain objects.
  • Accesses hbf-core via direct HTTP calls (not the HBFCoreApi npm client). Defines its own DTO classes for ChatSession, User, etc.
  • Also provides an anonymizer service that uses AnonymizationNamedEntityType from hbf-core-api.
  • Creates custom activities in hbf-core's bot-content-compiled for client-specific flows.