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 // 渠道返回的原始资料