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

23 lines
842 B
TypeScript

import { String, Price } from 'oak-domain/lib/types/DataType';
import { AbleAction, AbleState } from 'oak-domain/lib/actions/action';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { EntityDesc, ActionDef } from 'oak-domain/lib/types';
import { Schema as System } from './System';
import { Schema as Pay } from './Pay';
export interface Schema extends EntityShape {
total: Price;
avail: Price;
refundable: Price;
ofSystem: System;
entity: String<32>;
entityId: String<64>;
pays: Pay[];
}
type IAction = 'deposit' | 'withdraw' | 'withdrawBack' | 'consume' | 'loan' | 'repay';
export type Action = AbleAction | IAction;
export declare const AbleActionDef: ActionDef<AbleAction, AbleState>;
export declare const entityDesc: EntityDesc<Schema, Action, '', {
ableState: AbleState;
}>;
export {};