import { IDomainEvent , DomainEvent } from '@centsideas/event-sourcing' ; import { AuthenticationEventNames } from '@centsideas/enums' ; import { Timestamp } from '@centsideas/types' ; import { SessionModels } from '@centsideas/models' ; @ DomainEvent ( AuthenticationEventNames . SignedOut ) export class SignedOut implements IDomainEvent { constructor ( public readonly signedOutAt ) { } serialize ( ) { return { signedOutAt : this . signedOutAt . toString ( ) , } ; } static deserialize ( { signedOutAt } ) { return new SignedOut ( Timestamp . fromString ( signedOutAt ) ) ; } }