oak-pay-business/lib/oak-app-domain/AccountOper/_baseSchema.d.ts

76 lines
2.5 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 { AppendOnlyAction } from "oak-domain/lib/actions/action";
import { Price, String } from "oak-domain/lib/types/DataType";
type Type = "deposit" | "withdraw" | "consume" | "consumeBack" | "loan" | "repay" | "withdrawBack" | "earn" | "cutoffRefundable" | "tax" | "taxRefund" | "refund" | "refundFailure" | "preSettle" | "settle";
export type OpSchema = EntityShape & {
accountId: ForeignKey<"account">;
type: Type;
totalPlus: Price;
availPlus: Price;
refundablePlus?: Price | null;
total: Price;
avail: Price;
refundable: Price;
entity: "deposit" | "order" | "pay" | "refund" | "settlement" | "withdraw" | "withdrawTransfer" | string;
entityId: String<64>;
} & {
[A in ExpressionKey]?: any;
};
export type OpAttr = keyof OpSchema;
export type OpFilter = {
id: Q_StringValue;
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
accountId: Q_StringValue;
type: Q_EnumValue<Type>;
totalPlus: Q_NumberValue;
availPlus: Q_NumberValue;
refundablePlus: Q_NumberValue;
total: Q_NumberValue;
avail: Q_NumberValue;
refundable: Q_NumberValue;
entity: Q_EnumValue<"deposit" | "order" | "pay" | "refund" | "settlement" | "withdraw" | "withdrawTransfer" | string>;
entityId: Q_StringValue;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
accountId?: number;
type?: number;
totalPlus?: number;
availPlus?: number;
refundablePlus?: number;
total?: number;
avail?: number;
refundable?: number;
entity?: number;
entityId?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
accountId: number;
type: number;
totalPlus: number;
availPlus: number;
refundablePlus: number;
total: number;
avail: number;
refundable: number;
entity: number;
entityId: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<AppendOnlyAction | string>;
export type OpUpdateAction = "update" | string;
export {};