From a40069ef27e6f76ea3afaea39b4e5d73ca366072 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=BA=9B=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=9A=84=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/PayRecord.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/modules/PayRecord.ts b/src/modules/PayRecord.ts index 202a299..f164166 100644 --- a/src/modules/PayRecord.ts +++ b/src/modules/PayRecord.ts @@ -12,12 +12,12 @@ export enum PayType { } export enum PayStatus { - PENDING = 0, + PENDING = 0, // 默认状态, 未支付 TRANSFERING = 1, //只有国库模式才会有该状态 TRANSFERED = 2, //只有国库模式才会有该状态 SUCCESS = 9, TRANSFER_FAIL = 98, // 转账错误 - FAIL = 99, + FAIL = 99, // 交易失败 } @dbconn('pay') @@ -27,21 +27,22 @@ export enum PayStatus { options: { allowMixed: Severity.ALLOW }, }) export class PayRecordClass extends BaseModule { + // 支付渠道 @prop({ enum: PayPlatEnum, default: PayPlatEnum.ALCHEMY }) public channel!: PayPlatEnum - + // 交易类型 @prop({ required: true, default: PayType.BUY }) public type: PayType - + // 用户账号 @prop({ required: true }) public account: string - + // 用户钱包地址 @prop() public address: string - + // 购买的网络名, 根据alchemy的定义 @prop() public network?: string - + // 购买的发币名称 @prop() public crypto?: string @@ -54,10 +55,10 @@ export class PayRecordClass extends BaseModule { // 法币数量 @prop() public fiatAmount?: string - // 加密货币数量 + // 加密货币数量, 实际转账金额 @prop() public cryptoAmount?: string - // 开始创建记录时, 估算的加密货币数量 + // 开始创建记录时, 估算的可获取加密货币数量 @prop() public cryptoAmountEstimate: string @@ -70,7 +71,7 @@ export class PayRecordClass extends BaseModule { // 国家 @prop() public country?: string - + // 交易状态 @prop({ required: true, default: PayStatus.PENDING }) public status: PayStatus // 渠道返回的原始资料