Aggregate

data class Aggregate(val scopes: Set<String> = linkedSetOf(), val type: String? = null, val tenantId: String? = null, val id: String? = null, val commands: Set<String> = linkedSetOf(), val events: Set<String> = linkedSetOf()) : NamingScopes, Merge<Aggregate>

Configuration for an aggregate within a bounded context. Defines the aggregate's type, scopes, commands, events, and other metadata.

Parameters

scopes

Set of package scopes that belong to this aggregate.

type

Fully qualified name of the aggregate class.

tenantId

Optional static tenant ID for multi-tenant scenarios.

id

Optional custom ID generator name.

commands

Set of command package scopes handled by this aggregate.

events

Set of event package scopes produced by this aggregate.

Constructors

Link copied to clipboard
constructor(scopes: Set<String> = linkedSetOf(), type: String? = null, tenantId: String? = null, id: String? = null, commands: Set<String> = linkedSetOf(), events: Set<String> = linkedSetOf())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val id: String?

Custom ID generator name

Link copied to clipboard
open override val scopes: Set<String>
Link copied to clipboard

Static tenant ID

Link copied to clipboard
val type: String?

Aggregate type fully qualified name

Functions

Link copied to clipboard
open override fun merge(other: Aggregate): Aggregate

Merges this Aggregate with another, combining scopes, commands, events, and resolving conflicts.