- Add getUncommittedEvents() and commit() to AggregateRoot base class - Create 6 new domain events: SubscriptionExpired, SubscriptionRenewed, ListingStatusChanged, UserKycUpdated, UserDeactivated, PaymentRefunded - Wire events into entity state changes: SubscriptionEntity (markExpired, renewPeriod), ListingEntity (all transitions), UserEntity (KYC, deactivate), PaymentEntity (markRefunded) - Add 7 new event listeners across notifications, admin, and search modules (25 total @OnEvent handlers) - Fix ReviewDeletedListener to handle LISTING target type - Restore watcher notifications in ListingSoldListener - Update barrel exports and module registrations Resolves: TEC-1564 Co-Authored-By: Paperclip <noreply@paperclip.ing>
16 lines
471 B
TypeScript
16 lines
471 B
TypeScript
import { type PlanTier } from '@prisma/client';
|
|
import { type DomainEvent } from '@modules/shared';
|
|
|
|
export class SubscriptionRenewedEvent implements DomainEvent {
|
|
readonly eventName = 'subscription.renewed';
|
|
readonly occurredAt = new Date();
|
|
|
|
constructor(
|
|
public readonly aggregateId: string,
|
|
public readonly userId: string,
|
|
public readonly planTier: PlanTier,
|
|
public readonly newPeriodStart: Date,
|
|
public readonly newPeriodEnd: Date,
|
|
) {}
|
|
}
|