20 lines
655 B
TypeScript
20 lines
655 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 Order } from './Order';
|
|
export interface Schema extends EntityShape {
|
|
when?: Datetime;
|
|
order: Order;
|
|
price: Price;
|
|
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 {};
|