20 lines
763 B
TypeScript
20 lines
763 B
TypeScript
import { String, Datetime, Boolean, Uint } from 'oak-domain/lib/types/DataType';
|
|
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|
import { Schema as Application } from './Application';
|
|
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
|
|
import { ActionDef } from 'oak-domain/lib/types/Action';
|
|
export interface Schema extends EntityShape {
|
|
text: String<32>;
|
|
application: Application;
|
|
wechatId?: Uint<4>;
|
|
sync?: Boolean;
|
|
syncAt?: Datetime;
|
|
}
|
|
export type IState = 'wait' | 'success' | 'fail';
|
|
export type IAction = 'success' | 'fail';
|
|
export declare const IActionDef: ActionDef<IAction, IState>;
|
|
export type Action = 'sync' | IAction;
|
|
export declare const entityDesc: EntityDesc<Schema, Action, '', {
|
|
iState: IState;
|
|
}>;
|