oak-pay-business/es/oak-app-domain/Token/_baseSchema.d.ts

80 lines
2.7 KiB
TypeScript

import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, 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 { AbleState } from "oak-domain/lib/actions/action";
import { String, Datetime } from "oak-domain/lib/types/DataType";
import { Environment } from "oak-domain/lib/types/Environment";
export type OpSchema = EntityShape & {
applicationId?: ForeignKey<"application"> | null;
entity: "email" | "loginName" | "mobile" | "oauthUser" | "parasite" | "wechatLogin" | "wechatUser" | string;
entityId: String<64>;
userId?: ForeignKey<"user"> | null;
playerId?: ForeignKey<"user"> | null;
disablesAt?: Datetime | null;
env: Environment;
refreshedAt: Datetime;
value: String<64>;
oldValue?: String<64> | null;
ableState?: AbleState | 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;
applicationId: Q_StringValue;
entity: Q_EnumValue<"email" | "loginName" | "mobile" | "oauthUser" | "parasite" | "wechatLogin" | "wechatUser" | string>;
entityId: Q_StringValue;
userId: Q_StringValue;
playerId: Q_StringValue;
disablesAt: Q_DateValue;
env: JsonFilter<Environment>;
refreshedAt: Q_DateValue;
value: Q_StringValue;
oldValue: Q_StringValue;
ableState: Q_EnumValue<AbleState>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
applicationId?: number;
entity?: number;
entityId?: number;
userId?: number;
playerId?: number;
disablesAt?: number;
env?: number | JsonProjection<Environment>;
refreshedAt?: number;
value?: number;
oldValue?: number;
ableState?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
applicationId: number;
entity: number;
entityId: number;
userId: number;
playerId: number;
disablesAt: number;
env: number;
refreshedAt: number;
value: number;
oldValue: number;
ableState: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | string>;
export type OpUpdateAction = "update" | ParticularAction | string;