UNPKG

@jokio/datastore

Version:

Helper library for Google Cloud Datastore

22 lines (21 loc) 634 B
import { AggregateRoot, Entity, DomainEvent } from "../../"; export declare class AccountAggregate extends AggregateRoot<AccountState> { static Events: { Registered: DomainEvent<RegisteredEvent>; }; constructor(datastore: any, parentTransaction: any); register(props: RegisterProps): Promise<AccountState>; } export interface AccountState extends Entity { customerId: string; currency: string; amount: number; } export interface RegisterProps { customerId: string; currency: string; } export interface RegisteredEvent { customerId: string; accountId: string; }