增加一些字段的说明
This commit is contained in:
parent
367d9b516a
commit
a40069ef27
@ -12,12 +12,12 @@ export enum PayType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export enum PayStatus {
|
export enum PayStatus {
|
||||||
PENDING = 0,
|
PENDING = 0, // 默认状态, 未支付
|
||||||
TRANSFERING = 1, //只有国库模式才会有该状态
|
TRANSFERING = 1, //只有国库模式才会有该状态
|
||||||
TRANSFERED = 2, //只有国库模式才会有该状态
|
TRANSFERED = 2, //只有国库模式才会有该状态
|
||||||
SUCCESS = 9,
|
SUCCESS = 9,
|
||||||
TRANSFER_FAIL = 98, // 转账错误
|
TRANSFER_FAIL = 98, // 转账错误
|
||||||
FAIL = 99,
|
FAIL = 99, // 交易失败
|
||||||
}
|
}
|
||||||
|
|
||||||
@dbconn('pay')
|
@dbconn('pay')
|
||||||
@ -27,21 +27,22 @@ export enum PayStatus {
|
|||||||
options: { allowMixed: Severity.ALLOW },
|
options: { allowMixed: Severity.ALLOW },
|
||||||
})
|
})
|
||||||
export class PayRecordClass extends BaseModule {
|
export class PayRecordClass extends BaseModule {
|
||||||
|
// 支付渠道
|
||||||
@prop({ enum: PayPlatEnum, default: PayPlatEnum.ALCHEMY })
|
@prop({ enum: PayPlatEnum, default: PayPlatEnum.ALCHEMY })
|
||||||
public channel!: PayPlatEnum
|
public channel!: PayPlatEnum
|
||||||
|
// 交易类型
|
||||||
@prop({ required: true, default: PayType.BUY })
|
@prop({ required: true, default: PayType.BUY })
|
||||||
public type: PayType
|
public type: PayType
|
||||||
|
// 用户账号
|
||||||
@prop({ required: true })
|
@prop({ required: true })
|
||||||
public account: string
|
public account: string
|
||||||
|
// 用户钱包地址
|
||||||
@prop()
|
@prop()
|
||||||
public address: string
|
public address: string
|
||||||
|
// 购买的网络名, 根据alchemy的定义
|
||||||
@prop()
|
@prop()
|
||||||
public network?: string
|
public network?: string
|
||||||
|
// 购买的发币名称
|
||||||
@prop()
|
@prop()
|
||||||
public crypto?: string
|
public crypto?: string
|
||||||
|
|
||||||
@ -54,10 +55,10 @@ export class PayRecordClass extends BaseModule {
|
|||||||
// 法币数量
|
// 法币数量
|
||||||
@prop()
|
@prop()
|
||||||
public fiatAmount?: string
|
public fiatAmount?: string
|
||||||
// 加密货币数量
|
// 加密货币数量, 实际转账金额
|
||||||
@prop()
|
@prop()
|
||||||
public cryptoAmount?: string
|
public cryptoAmount?: string
|
||||||
// 开始创建记录时, 估算的加密货币数量
|
// 开始创建记录时, 估算的可获取加密货币数量
|
||||||
@prop()
|
@prop()
|
||||||
public cryptoAmountEstimate: string
|
public cryptoAmountEstimate: string
|
||||||
|
|
||||||
@ -70,7 +71,7 @@ export class PayRecordClass extends BaseModule {
|
|||||||
// 国家
|
// 国家
|
||||||
@prop()
|
@prop()
|
||||||
public country?: string
|
public country?: string
|
||||||
|
// 交易状态
|
||||||
@prop({ required: true, default: PayStatus.PENDING })
|
@prop({ required: true, default: PayStatus.PENDING })
|
||||||
public status: PayStatus
|
public status: PayStatus
|
||||||
// 渠道返回的原始资料
|
// 渠道返回的原始资料
|
||||||
|
Loading…
x
Reference in New Issue
Block a user