Development¶
Adding a lifecycle operation¶
- Add an input +
*Validatorin.DomainModel/.DomainModel.Impl. - Extend
TenantLifecycleStatusEnumeration.AllowedTransitionsif a new state/transition is involved. - Add the method to
ITenantsProcessor/DefaultTenantsProcessor, publish the matchingtenants.domain.v1.*event. - Expose over both adapters (
ITenantManagementService-> REST controller +Grpc*adapter). - Add unit + acceptance tests, including cross-adapter parity.
Evolving the aggregate¶
The live aggregate is a single flat TenantEntity. If you introduce documented children (TenantProfile, Contact), keep the one aggregate root rule (ITenant) - the architecture test enforces it - and model children as part of the Tenant aggregate.
Downstream contract stability¶
This service's published language is consumed by Entitlements, Billing, and Metering. CrossRepoPublishedLanguageTests guards the topic/event contracts; coordinate event shape changes across contexts.
Base template¶
The minimal-host matrix (build/DisableMicrosoftExtensionsStackForMinimalHost.TenantsHost.props) controls enabled stacks. See template layering and reuse.