Asset Integration Contracts
Summary
The six cross-service integration contracts defined in HrSuit.Contracts.Events, emitted by asset-service through the outbox. All six share an identical field set so one consumer can render every asset event.
Audience
Engineering, integration, QA, architecture, security, and product reviewers.
Reference Content
Verified totals
| Measure | Verified total |
|---|---|
| Outbound integration contracts | 6 |
| Inbound integration contracts consumed by asset-service | 0 |
| Shared envelope base | 1 (IntegrationEvent) |
| Contract schema version | 1 |
The six contracts
AssetRequestedEvent, AssetAssignedEvent, AssetReturnedEvent, AssetRejectedEvent, AssetLostOrDamagedEvent, and AssetRetiredEvent — each a sealed record deriving from IntegrationEvent.
Envelope fields (from IntegrationEvent)
EventId, EventType, OccurredAtUtc, CorrelationId, CausationId, TenantId (GUID, nullable), UserId (GUID, nullable), SourceService, and SchemaVersion. Asset events set the GUID TenantId/UserId to null; numeric tenant and identity references travel in the payload instead.
Payload fields (uniform across all six)
TenantRefId, TenantKey, AssetId (GUID), AssetCompatId (numeric), AssetCode, AssetName, AssetType, AssignedToUserId, LegacyEmployeeId, Status, Condition, Notes, ReturnDueDate, and RecipientEmail.
AssetCompatIdmay be0for a record whose database key is assigned in the same transaction (for exampleAssetRequestedraised at create); consumers key onAssetCode.RecipientEmailisnullwhen emitted; a downstream enrichment step populates it for email delivery.
Ownership
The contracts live in the shared contracts assembly and are therefore a cross-service coupling surface. Consumers depend on the same assembly. Contract governance and versioning policy require confirmation.
Source References
microservices/src/contracts/Events/AssetLifecycleEvents.csmicroservices/src/contracts/Events/IntegrationEvent.csmicroservices/src/asset-service/Infrastructure/AssetDbContext.cs
Related Articles
See Also
Keywords
- Integration contracts
- Event envelope
- Uniform payload
Revision Information
- Status: Draft
- Last reviewed: 2026-07-17
- Review cycle: Quarterly