|
|
package com.yau.digitalrmb.institutionidentity.application;
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
|
|
import com.yau.digitalrmb.institutionidentity.domain.CurrencyGenerationVerification;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
@ApiModel(description = "央行对货币生成请求的验证、额度检查和确权结果;尚未完成的阶段字段返回null")
|
|
|
@Schema(description = "央行对货币生成请求的验证、额度检查和确权结果;尚未完成的阶段字段返回null")
|
|
|
public class CurrencyGenerationVerificationResult {
|
|
|
@Schema(description = "货币生成验证记录编号;尚未接收时为空", example = "1900000000000000151")
|
|
|
private final Long verificationId;
|
|
|
@Schema(description = "关联的货币生成请求编号")
|
|
|
private final Long requestId;
|
|
|
@Schema(description = "当前验证状态", example = "VERIFIED")
|
|
|
private final String status;
|
|
|
@Schema(description = "央行收到的货币生成请求报文")
|
|
|
private final String requestMessage;
|
|
|
@Schema(description = "货币生成请求原文")
|
|
|
private final String requestOriginalText;
|
|
|
@Schema(description = "请求报文携带的摘要二(H2)")
|
|
|
private final String requestDigest;
|
|
|
@Schema(description = "请求携带的商业银行SM2签名")
|
|
|
private final String bankSignature;
|
|
|
@Schema(description = "用于验签的商业银行密钥编号;尚未验签时为空")
|
|
|
private final String bankKeyId;
|
|
|
@Schema(description = "申请生成金额,单位元", example = "1000000.00")
|
|
|
private final BigDecimal amount;
|
|
|
@Schema(description = "商业银行签名是否有效;尚未验签时为空", example = "true")
|
|
|
private final Boolean signatureValid;
|
|
|
@Schema(description = "根据请求原文重新计算的摘要一(H1);尚未点击运算时为空")
|
|
|
private final String recomputedDigest;
|
|
|
@Schema(description = "摘要一和摘要二是否一致;尚未点击匹配时为空", example = "true")
|
|
|
private final Boolean digestMatches;
|
|
|
@Schema(description = "货币发行总额度;尚未检查额度时为空", example = "100000000.00")
|
|
|
private final BigDecimal totalQuota;
|
|
|
@Schema(description = "已使用额度;尚未检查额度时为空", example = "20000000.00")
|
|
|
private final BigDecimal usedQuota;
|
|
|
@Schema(description = "剩余额度;尚未检查额度时为空", example = "80000000.00")
|
|
|
private final BigDecimal remainingQuota;
|
|
|
@Schema(description = "剩余额度是否满足本次申请;尚未检查时为空", example = "true")
|
|
|
private final Boolean quotaSufficient;
|
|
|
@Schema(description = "央行确权密钥编号;尚未确权时为空")
|
|
|
private final String centralBankKeyId;
|
|
|
@Schema(description = "央行确权签名;尚未确权时为空")
|
|
|
private final String centralBankSignature;
|
|
|
@Schema(description = "央行确权时间,格式yyyyMMddHHmmss;尚未确权时为空")
|
|
|
private final String confirmationTime;
|
|
|
@Schema(description = "央行打包完成的确认报文;尚未点击打包报文时为空")
|
|
|
private final String confirmationMessage;
|
|
|
@Schema(description = "用户提交的商业银行第二公钥;尚未验签时为空")
|
|
|
private final String submittedPublicKey;
|
|
|
@Schema(description = "用户提交的央行第一私钥;尚未确权时为空")
|
|
|
private final String submittedPrivateKey;
|
|
|
@Schema(description = "用户在步骤三运算摘要时输入的请求原文;尚未运算时为空")
|
|
|
private final String userInputOriginalText;
|
|
|
|
|
|
public CurrencyGenerationVerificationResult() {
|
|
|
verificationId = null; requestId = null; status = null;
|
|
|
requestMessage = null; requestOriginalText = null;
|
|
|
requestDigest = null; bankSignature = null; bankKeyId = null;
|
|
|
amount = null; signatureValid = null; recomputedDigest = null;
|
|
|
digestMatches = null; totalQuota = null; usedQuota = null;
|
|
|
remainingQuota = null; quotaSufficient = null;
|
|
|
centralBankKeyId = null; centralBankSignature = null;
|
|
|
confirmationTime = null; confirmationMessage = null;
|
|
|
submittedPublicKey = null; submittedPrivateKey = null;
|
|
|
userInputOriginalText = null;
|
|
|
}
|
|
|
|
|
|
public CurrencyGenerationVerificationResult(CurrencyGenerationVerification v) {
|
|
|
verificationId = v.getId(); requestId = v.getRequestId(); status = v.getStatus().name();
|
|
|
requestMessage = v.getRequestMessage(); requestOriginalText = v.getRequestOriginalText();
|
|
|
requestDigest = v.getRequestDigest(); bankSignature = v.getBankSignature(); bankKeyId = v.getBankKeyId();
|
|
|
amount = v.getAmount(); signatureValid = v.getSignatureValid(); recomputedDigest = v.getRecomputedDigest();
|
|
|
digestMatches = v.getDigestMatches(); totalQuota = v.getTotalQuota(); usedQuota = v.getUsedQuota();
|
|
|
remainingQuota = v.getRemainingQuota(); quotaSufficient = v.getQuotaSufficient();
|
|
|
centralBankKeyId = v.getCentralBankKeyId(); centralBankSignature = v.getCentralBankSignature();
|
|
|
confirmationTime = v.getConfirmationTime(); confirmationMessage = v.getConfirmationMessage();
|
|
|
submittedPublicKey = v.getSubmittedPublicKey(); submittedPrivateKey = v.getSubmittedPrivateKey();
|
|
|
userInputOriginalText = v.getUserInputOriginalText();
|
|
|
}
|
|
|
|
|
|
public Long getVerificationId() { return verificationId; }
|
|
|
public Long getRequestId() { return requestId; }
|
|
|
public String getStatus() { return status; }
|
|
|
public String getRequestMessage() { return requestMessage; }
|
|
|
public String getRequestOriginalText() { return requestOriginalText; }
|
|
|
public String getRequestDigest() { return requestDigest; }
|
|
|
public String getBankSignature() { return bankSignature; }
|
|
|
public String getBankKeyId() { return bankKeyId; }
|
|
|
public BigDecimal getAmount() { return amount; }
|
|
|
public Boolean getSignatureValid() { return signatureValid; }
|
|
|
public String getRecomputedDigest() { return recomputedDigest; }
|
|
|
public Boolean getDigestMatches() { return digestMatches; }
|
|
|
public BigDecimal getTotalQuota() { return totalQuota; }
|
|
|
public BigDecimal getUsedQuota() { return usedQuota; }
|
|
|
public BigDecimal getRemainingQuota() { return remainingQuota; }
|
|
|
public Boolean getQuotaSufficient() { return quotaSufficient; }
|
|
|
public String getCentralBankKeyId() { return centralBankKeyId; }
|
|
|
public String getCentralBankSignature() { return centralBankSignature; }
|
|
|
public String getConfirmationTime() { return confirmationTime; }
|
|
|
public String getConfirmationMessage() { return confirmationMessage; }
|
|
|
public String getSubmittedPublicKey() { return submittedPublicKey; }
|
|
|
public String getSubmittedPrivateKey() { return submittedPrivateKey; }
|
|
|
public String getUserInputOriginalText() { return userInputOriginalText; }
|
|
|
}
|