Μετάβαση στο περιεχόμενο
Από την έκδοση 0.5.0 τα πακέτα συνεχίζουν ως @cqrs-ddd, με τεκμηρίωση στο aristoteliss.github.io/ddd-cqrs· οι εφαρμογές NestJS προσθέτουν το @cqrs-ddd/nestjs. Αυτός ο ιστότοπος τεκμηριώνει τη σειρά 0.4.x.

ApplyMutationOptions

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

Defined in: packages/ddd-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/ddd-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