Μετάβαση στο περιεχόμενο

ApplyMutationOptions

Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.

Defined in: packages/core/domain/decorators/apply-mutation.decorator.ts:28

Configuration for a declarative aggregate mutation and domain event application.

TEntity

The aggregate the decorated method belongs to.

readonly event: (entity) => NonEmptyEventArray | SingleEvent

Defined in: packages/core/domain/decorators/apply-mutation.decorator.ts:37

Factory for the domain event(s) recorded once the mutation has completed. It receives the aggregate after the patch, onUpdate() and the version/timestamp advance, ensuring event payload and metadata snapshot the post-mutation version and updatedAt.

Must return a single domain event object or a non-empty array of domain events.

TEntity

NonEmptyEventArray | SingleEvent