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, IState } from "./Action"; import { String, Text, Boolean, Datetime } from "oak-domain/lib/types/DataType"; export type OpSchema = EntityShape & { origin: "mobile" | "email"; content: String<32>; code: String<8>; visitorId: Text; reason?: Text | null; env: Object; expired: Boolean; expiresAt: Datetime; type: "login" | "changePassword" | "confirm"; applicationId?: ForeignKey<"application"> | 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; origin: Q_EnumValue<"mobile" | "email">; content: Q_StringValue; code: Q_StringValue; visitorId: Q_StringValue; reason: Q_StringValue; env: Object; expired: Q_BooleanValue; expiresAt: Q_DateValue; type: Q_EnumValue<"login" | "changePassword" | "confirm">; applicationId: Q_StringValue; iState: Q_EnumValue; } & ExprOp; export type OpProjection = { "#id"?: NodeId; [k: string]: any; id?: number; $$createAt$$?: number; $$updateAt$$?: number; $$seq$$?: number; origin?: number; content?: number; code?: number; visitorId?: number; reason?: number; env?: number | Object; expired?: number; expiresAt?: number; type?: number; applicationId?: number; iState?: number; } & Partial>; export type OpSortAttr = Partial<{ id: number; $$createAt$$: number; $$seq$$: number; $$updateAt$$: number; origin: number; content: number; code: number; visitorId: number; reason: number; expired: number; expiresAt: number; type: number; applicationId: number; iState: number; [k: string]: any; } | ExprOp>; export type OpAction = OakMakeAction; export type OpUpdateAction = "update" | ParticularAction | string;