import { DomainEvent } from './domain-event.base';

export class KYCSubmittedEvent extends DomainEvent {
  constructor(
    public readonly userId: string,
    public readonly realName: string,
    public readonly idCardNumber: string,
  ) {
    super();
  }

  get eventType(): string {
    return 'KYCSubmitted';
  }

  get aggregateId(): string {
    return this.userId;
  }

  get aggregateType(): string {
    return 'UserAccount';
  }

  toPayload(): object {
    return {
      userId: this.userId,
      realName: this.realName,
      idCardNumber: this.idCardNumber,
    };
  }
}
