oak-pay-business/lib/entities/Settlement.d.ts

23 lines
799 B
TypeScript

import { Price, Datetime } from 'oak-domain/lib/types/DataType';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { EntityDesc, ActionDef } from 'oak-domain/lib/types';
import { Schema as Account } from './Account';
import { Schema as SettlePlan } from './SettlePlan';
import { Schema as AccountOper } from './AccountOper';
export interface Schema extends EntityShape {
account: Account;
plan: SettlePlan;
price: Price;
opers?: AccountOper[];
settledAt?: Datetime;
closedAt?: Datetime;
}
type IState = 'unsettled' | 'settled' | 'closed';
type IAction = 'settle' | 'close';
export declare const IActionDef: ActionDef<IAction, IState>;
type Action = IAction;
export declare const entityDesc: EntityDesc<Schema, Action, '', {
iState: IState;
}>;
export {};