71 lines
2.1 KiB
TypeScript
71 lines
2.1 KiB
TypeScript
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|
import { Q_DateValue, Q_BooleanValue, 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 } from "./Action";
|
|
import { String, Boolean } from "oak-domain/lib/types/DataType";
|
|
export type OpSchema = EntityShape & {
|
|
org?: String<128> | null;
|
|
name: String<64>;
|
|
code: String<64>;
|
|
ofSystemId: ForeignKey<"system">;
|
|
data?: Object | null;
|
|
channelId: ForeignKey<"withdrawChannel">;
|
|
entity: "system" | "user" | string;
|
|
entityId: String<64>;
|
|
isDefault: Boolean;
|
|
enabled: Boolean;
|
|
} & {
|
|
[A in ExpressionKey]?: any;
|
|
};
|
|
export type OpAttr = keyof OpSchema;
|
|
export type OpFilter = {
|
|
id: Q_StringValue;
|
|
$$createAt$$: Q_DateValue;
|
|
$$seq$$: Q_NumberValue;
|
|
$$updateAt$$: Q_DateValue;
|
|
org: Q_StringValue;
|
|
name: Q_StringValue;
|
|
code: Q_StringValue;
|
|
ofSystemId: Q_StringValue;
|
|
data: Object;
|
|
channelId: Q_StringValue;
|
|
entity: Q_EnumValue<"system" | "user" | string>;
|
|
entityId: Q_StringValue;
|
|
isDefault: Q_BooleanValue;
|
|
enabled: Q_BooleanValue;
|
|
} & ExprOp<OpAttr | string>;
|
|
export type OpProjection = {
|
|
"#id"?: NodeId;
|
|
[k: string]: any;
|
|
id?: number;
|
|
$$createAt$$?: number;
|
|
$$updateAt$$?: number;
|
|
$$seq$$?: number;
|
|
org?: number;
|
|
name?: number;
|
|
code?: number;
|
|
ofSystemId?: number;
|
|
data?: number | Object;
|
|
channelId?: number;
|
|
entity?: number;
|
|
entityId?: number;
|
|
isDefault?: number;
|
|
enabled?: number;
|
|
} & Partial<ExprOp<OpAttr | string>>;
|
|
export type OpSortAttr = Partial<{
|
|
id: number;
|
|
$$createAt$$: number;
|
|
$$seq$$: number;
|
|
$$updateAt$$: number;
|
|
org: number;
|
|
name: number;
|
|
code: number;
|
|
entity: number;
|
|
entityId: number;
|
|
isDefault: number;
|
|
enabled: number;
|
|
[k: string]: any;
|
|
} | ExprOp<OpAttr | string>>;
|
|
export type OpAction = OakMakeAction<Action | string>;
|
|
export type OpUpdateAction = "update" | ParticularAction | string;
|