公共 API 参考(@saas/contracts + @core/saas-kit + apps/api 对外接口)
    Preparing search index...

    领域事件元数据信封入参(构造 DomainEvent 的原始 props)。

    The field set (eventId / aggregateId / aggregateType / eventType / eventVersion / occurredAt / correlationId / causationId) is intentionally shaped for a future Event Sourcing store: these are exactly the columns an append-only event table needs, and eventVersion is what an upcaster keys off when the payload schema evolves. For now events are dispatched in-process only (never persisted).

    interface DomainEventProps<TPayload extends object = object> {
        aggregateId: string;
        aggregateType: string;
        causationId?: string;
        correlationId?: string;
        eventId?: string;
        eventType: string;
        eventVersion?: number;
        occurredAt?: Date;
        payload: TPayload;
    }

    Type Parameters

    • TPayload extends object = object
    Index
    aggregateId: string

    事件所属聚合根 id。

    aggregateType: string

    事件所属聚合类型名。

    causationId?: string

    因果链:直接触发本事件的事件 id。

    correlationId?: string

    关联 id:贯穿一次请求链。

    eventId?: string

    事件唯一 id。

    eventType: string

    事件类型名(稳定契约)。

    eventVersion?: number

    事件 schema 版本。

    occurredAt?: Date

    事件发生时间。

    payload: TPayload

    事件负载。