58 lines
1.9 KiB
TypeScript
58 lines
1.9 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 { String, Text } from "oak-domain/lib/types/DataType";
|
|
export type OpSchema = EntityShape & {
|
|
userId: ForeignKey<"user">;
|
|
prevPassword?: String<32> | null;
|
|
newPassword?: String<32> | null;
|
|
prevPasswordSha1?: Text | null;
|
|
newPasswordSha1?: Text | null;
|
|
result: "success" | "fail";
|
|
} & {
|
|
[A in ExpressionKey]?: any;
|
|
};
|
|
export type OpAttr = keyof OpSchema;
|
|
export type OpFilter = {
|
|
id: Q_StringValue;
|
|
$$createAt$$: Q_DateValue;
|
|
$$seq$$: Q_NumberValue;
|
|
$$updateAt$$: Q_DateValue;
|
|
userId: Q_StringValue;
|
|
prevPassword: Q_StringValue;
|
|
newPassword: Q_StringValue;
|
|
prevPasswordSha1: Q_StringValue;
|
|
newPasswordSha1: Q_StringValue;
|
|
result: Q_EnumValue<"success" | "fail">;
|
|
} & ExprOp<OpAttr | string>;
|
|
export type OpProjection = {
|
|
"#id"?: NodeId;
|
|
[k: string]: any;
|
|
id?: number;
|
|
$$createAt$$?: number;
|
|
$$updateAt$$?: number;
|
|
$$seq$$?: number;
|
|
userId?: number;
|
|
prevPassword?: number;
|
|
newPassword?: number;
|
|
prevPasswordSha1?: number;
|
|
newPasswordSha1?: number;
|
|
result?: number;
|
|
} & Partial<ExprOp<OpAttr | string>>;
|
|
export type OpSortAttr = Partial<{
|
|
id: number;
|
|
$$createAt$$: number;
|
|
$$seq$$: number;
|
|
$$updateAt$$: number;
|
|
userId: number;
|
|
prevPassword: number;
|
|
newPassword: number;
|
|
prevPasswordSha1: number;
|
|
newPasswordSha1: number;
|
|
result: number;
|
|
[k: string]: any;
|
|
} | ExprOp<OpAttr | string>>;
|
|
export type OpAction = OakMakeAction<GenericAction | string>;
|
|
export type OpUpdateAction = "update" | string;
|