oak-general-business/es/oak-app-domain/Oper/_baseSchema.d.ts

70 lines
2.1 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, Datetime } from "../../../node_modules/oak-domain/src/types/DataType";
export type OpSchema = EntityShape & {
action: String<24>;
data: Object;
filter?: Object | null;
extra?: Object | null;
operatorId?: ForeignKey<"user"> | null;
targetEntity: String<32>;
bornAt?: Datetime | null;
logId?: ForeignKey<"log"> | null;
undoData?: Object | null;
iState?: IState | null;
} & {
[A in ExpressionKey]?: any;
};
export type OpAttr = keyof OpSchema;
export type OpFilter = {
id: Q_StringValue;
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
action: Q_StringValue;
data: Object;
filter: Object;
extra: Object;
operatorId: Q_StringValue;
targetEntity: Q_StringValue;
bornAt: Q_DateValue;
logId: Q_StringValue;
undoData: Object;
iState: Q_EnumValue<IState>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
action?: number;
data?: number | Object;
filter?: number | Object;
extra?: number | Object;
operatorId?: number;
targetEntity?: number;
bornAt?: number;
logId?: number;
undoData?: number | Object;
iState?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
action: number;
operatorId: number;
targetEntity: number;
bornAt: number;
logId: number;
iState: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | string>;
export type OpUpdateAction = "update" | ParticularAction | string;