Stop dropping the market and the customer account

Fixkamo-shared-library
Ya
26 Agosti 2026, 18:32 UTC
Mwandishi
Kamo
Ahadi ya
7c3eccb

CreateQuoteRequest has always declared marketUid and accountUid and QuoteService.create has never read either, so Quote.market and Quote.customerAccount were NULL on every quote on the platform — QuoteMapper.customerName has been returning null since it was written. With no market there was nothing to derive an engagement type from, so create() hard-coded RETAIL: every service, healthcare and rental quote sat on a RETAIL engagement. EngagementType.fromCommerceType is an exhaustive switch with no default, so adding a CommerceType is now a compile error rather than a runtime failure on whichever tenant uses it first. Both lookups are org-scoped in SQL, through the scoped finders the repositories already expose — findByIdAndOrganizationId and findByUidAndOrganization — so a caller cannot attach another tenant's market or account to their own quote. The RETAIL fallback survives for quotes created without a market, which is every quote that exists today. Whether those rows should be backfilled from their org's markets is an open migration question, not a design choice.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei