import { IDomainEvent } from '@server/shared/src/core/domain/events/IDomainEvent' ; import { UniqueEntityID } from '@server/shared/src/core/domain/UniqueEntityID' ; import { User } from '../User' ; import { UserEmail } from '../UserEmail' ; export class UserEmailChangedEvent implements IDomainEvent { public dateTimeOccurred : Date ; public lastEmail : UserEmail ; public user : User ; constructor ( user , lastEmail ? ) { this . dateTimeOccurred = new Date ( ) ; this . user = user ; this . lastEmail = lastEmail ; } getAggregateId ( ) { return this . user . id ; } }