Aggregate

annotation class Aggregate(val name: String, val tenantId: String = "", val id: String = "", val scopes: Array<String> = [], val packageScopes: Array<KClass<*>> = [])

Defines an aggregate within a bounded context.

Aggregates are clusters of domain objects that can be treated as a single unit for data changes. Each aggregate has a root entity and may contain other entities and value objects.

Properties

Link copied to clipboard
val id: String

Name of a custom ID generator for this aggregate. If empty, the default ID generation strategy will be used.

Link copied to clipboard

The name of the aggregate. Must be unique within the bounded context.

Link copied to clipboard

Package classes that contain the aggregate's implementation.

Link copied to clipboard

Scope identifiers specific to this aggregate.

Link copied to clipboard

Static tenant ID for multi-tenant scenarios. If specified, all instances of this aggregate will belong to this tenant.