84 lines
2.7 KiB
TypeScript
84 lines
2.7 KiB
TypeScript
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
|
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
|
import { Action, ParticularAction } from "./Action";
|
|
import { Decimal, Int, Boolean, Price, String, Text } from "oak-domain/lib/types/DataType";
|
|
export type OpSchema = EntityShape & {
|
|
taxLossRatio: Decimal<4, 2>;
|
|
refundGapDays?: Int<4> | null;
|
|
refundCompensateRatio?: Int<4> | null;
|
|
allowWithdrawTransfer: Boolean;
|
|
withdrawTransferLossRatio?: Decimal<4, 2> | null;
|
|
price: Price;
|
|
wechatPayId: ForeignKey<"wechatPay">;
|
|
mchId: String<128>;
|
|
publicKeyFilePath: Text;
|
|
privateKeyFilePath: Text;
|
|
apiV3Key: String<32>;
|
|
systemId: ForeignKey<"system">;
|
|
enabled: Boolean;
|
|
} & {
|
|
[A in ExpressionKey]?: any;
|
|
};
|
|
export type OpAttr = keyof OpSchema;
|
|
export type OpFilter = {
|
|
id: Q_StringValue;
|
|
$$createAt$$: Q_DateValue;
|
|
$$seq$$: Q_NumberValue;
|
|
$$updateAt$$: Q_DateValue;
|
|
taxLossRatio: Q_NumberValue;
|
|
refundGapDays: Q_NumberValue;
|
|
refundCompensateRatio: Q_NumberValue;
|
|
allowWithdrawTransfer: Q_BooleanValue;
|
|
withdrawTransferLossRatio: Q_NumberValue;
|
|
price: Q_NumberValue;
|
|
wechatPayId: Q_StringValue;
|
|
mchId: Q_StringValue;
|
|
publicKeyFilePath: Q_StringValue;
|
|
privateKeyFilePath: Q_StringValue;
|
|
apiV3Key: Q_StringValue;
|
|
systemId: Q_StringValue;
|
|
enabled: Q_BooleanValue;
|
|
} & ExprOp<OpAttr | string>;
|
|
export type OpProjection = {
|
|
"#id"?: NodeId;
|
|
[k: string]: any;
|
|
id?: number;
|
|
$$createAt$$?: number;
|
|
$$updateAt$$?: number;
|
|
$$seq$$?: number;
|
|
taxLossRatio?: number;
|
|
refundGapDays?: number;
|
|
refundCompensateRatio?: number;
|
|
allowWithdrawTransfer?: number;
|
|
withdrawTransferLossRatio?: number;
|
|
price?: number;
|
|
wechatPayId?: number;
|
|
mchId?: number;
|
|
publicKeyFilePath?: number;
|
|
privateKeyFilePath?: number;
|
|
apiV3Key?: number;
|
|
systemId?: number;
|
|
enabled?: number;
|
|
} & Partial<ExprOp<OpAttr | string>>;
|
|
export type OpSortAttr = Partial<{
|
|
id: number;
|
|
$$createAt$$: number;
|
|
$$seq$$: number;
|
|
$$updateAt$$: number;
|
|
taxLossRatio: number;
|
|
refundGapDays: number;
|
|
refundCompensateRatio: number;
|
|
allowWithdrawTransfer: number;
|
|
withdrawTransferLossRatio: number;
|
|
price: number;
|
|
mchId: number;
|
|
publicKeyFilePath: number;
|
|
privateKeyFilePath: number;
|
|
apiV3Key: number;
|
|
enabled: number;
|
|
[k: string]: any;
|
|
} | ExprOp<OpAttr | string>>;
|
|
export type OpAction = OakMakeAction<Action | string>;
|
|
export type OpUpdateAction = "update" | ParticularAction | string;
|