59 lines
1.8 KiB
TypeScript
59 lines
1.8 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 { GenericAction } from "oak-domain/lib/actions/action";
|
|
import { Text, String, Datetime } from "oak-domain/lib/types/DataType";
|
|
export type Origin = "ali" | "tencent" | "ctyun" | "qiniu";
|
|
export type OpSchema = EntityShape & {
|
|
systemId: ForeignKey<"system">;
|
|
origin: Origin;
|
|
templateName: Text;
|
|
templateCode: String<64>;
|
|
templateContent: Text;
|
|
syncAt: Datetime;
|
|
} & {
|
|
[A in ExpressionKey]?: any;
|
|
};
|
|
export type OpAttr = keyof OpSchema;
|
|
export type OpFilter = {
|
|
id: Q_StringValue;
|
|
$$createAt$$: Q_DateValue;
|
|
$$seq$$: Q_NumberValue;
|
|
$$updateAt$$: Q_DateValue;
|
|
systemId: Q_StringValue;
|
|
origin: Q_EnumValue<Origin>;
|
|
templateName: Q_StringValue;
|
|
templateCode: Q_StringValue;
|
|
templateContent: Q_StringValue;
|
|
syncAt: Q_DateValue;
|
|
} & ExprOp<OpAttr | string>;
|
|
export type OpProjection = {
|
|
"#id"?: NodeId;
|
|
[k: string]: any;
|
|
id?: number;
|
|
$$createAt$$?: number;
|
|
$$updateAt$$?: number;
|
|
$$seq$$?: number;
|
|
systemId?: number;
|
|
origin?: number;
|
|
templateName?: number;
|
|
templateCode?: number;
|
|
templateContent?: number;
|
|
syncAt?: number;
|
|
} & Partial<ExprOp<OpAttr | string>>;
|
|
export type OpSortAttr = Partial<{
|
|
id: number;
|
|
$$createAt$$: number;
|
|
$$seq$$: number;
|
|
$$updateAt$$: number;
|
|
systemId: number;
|
|
origin: number;
|
|
templateName: number;
|
|
templateCode: number;
|
|
templateContent: number;
|
|
syncAt: number;
|
|
[k: string]: any;
|
|
} | ExprOp<OpAttr | string>>;
|
|
export type OpAction = OakMakeAction<GenericAction | string>;
|
|
export type OpUpdateAction = "update" | string;
|