63 lines
2.0 KiB
TypeScript
63 lines
2.0 KiB
TypeScript
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
|
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
|
import { Action, ParticularAction, IState } from "./Action";
|
|
import { String } from "oak-domain/lib/types/DataType";
|
|
export type OpSchema = EntityShape & {
|
|
channel: String<32>;
|
|
applicationId?: ForeignKey<"application"> | null;
|
|
data?: Object | null;
|
|
messageSystemId: ForeignKey<"messageSystem">;
|
|
data1?: Object | null;
|
|
data2?: Object | null;
|
|
templateId?: String<128> | null;
|
|
iState: IState;
|
|
} & {
|
|
[A in ExpressionKey]?: any;
|
|
};
|
|
export type OpAttr = keyof OpSchema;
|
|
export type OpFilter = {
|
|
id: Q_StringValue;
|
|
$$createAt$$: Q_DateValue;
|
|
$$seq$$: Q_NumberValue;
|
|
$$updateAt$$: Q_DateValue;
|
|
channel: Q_StringValue;
|
|
applicationId: Q_StringValue;
|
|
data: Object;
|
|
messageSystemId: Q_StringValue;
|
|
data1: Object;
|
|
data2: Object;
|
|
templateId: Q_StringValue;
|
|
iState: Q_EnumValue<IState>;
|
|
} & ExprOp<OpAttr | string>;
|
|
export type OpProjection = {
|
|
"#id"?: NodeId;
|
|
[k: string]: any;
|
|
id?: number;
|
|
$$createAt$$?: number;
|
|
$$updateAt$$?: number;
|
|
$$seq$$?: number;
|
|
channel?: number;
|
|
applicationId?: number;
|
|
data?: number | Object;
|
|
messageSystemId?: number;
|
|
data1?: number | Object;
|
|
data2?: number | Object;
|
|
templateId?: number;
|
|
iState?: number;
|
|
} & Partial<ExprOp<OpAttr | string>>;
|
|
export type OpSortAttr = Partial<{
|
|
id: number;
|
|
$$createAt$$: number;
|
|
$$seq$$: number;
|
|
$$updateAt$$: number;
|
|
channel: number;
|
|
applicationId: number;
|
|
messageSystemId: number;
|
|
templateId: number;
|
|
iState: number;
|
|
[k: string]: any;
|
|
} | ExprOp<OpAttr | string>>;
|
|
export type OpAction = OakMakeAction<Action | string>;
|
|
export type OpUpdateAction = "update" | ParticularAction | string;
|