oak-general-business/lib/oak-app-domain/Parasite/_baseSchema.d.ts

76 lines
2.3 KiB
TypeScript

import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey, JsonFilter } 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, Datetime, Int } from "oak-domain/lib/types/DataType";
type RedirectTo = {
pathname: string;
props?: Record<string, any>;
state?: Record<string, any>;
};
export type OpSchema = EntityShape & {
userId: ForeignKey<"user">;
entity: String<32>;
entityId: String<64>;
showTip?: Boolean | null;
expiresAt: Datetime;
expired: Boolean;
redirectTo: RedirectTo;
multiple?: Boolean | null;
tokenLifeLength?: Int<4> | 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;
userId: Q_StringValue;
entity: Q_StringValue;
entityId: Q_StringValue;
showTip: Q_BooleanValue;
expiresAt: Q_DateValue;
expired: Q_BooleanValue;
redirectTo: JsonFilter<RedirectTo>;
multiple: Q_BooleanValue;
tokenLifeLength: Q_NumberValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
userId?: number;
entity?: number;
entityId?: number;
showTip?: number;
expiresAt?: number;
expired?: number;
redirectTo?: number | JsonProjection<RedirectTo>;
multiple?: number;
tokenLifeLength?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
userId: number;
entity: number;
entityId: number;
showTip: number;
expiresAt: number;
expired: number;
redirectTo: number;
multiple: number;
tokenLifeLength: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | string>;
export type OpUpdateAction = "update" | ParticularAction | string;
export {};