package com.brilliance.isc.vo;

import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 境内外币模型
 */
@Getter
@Setter
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxpmodVo extends AbstractCommonVo {

    //发报行行号
    private String sndbch;

    //发报行名称
    private String sndbchnam;

    //接收行行号
    private String resbch;

    //接收行名称
    private String resbchnam;

    //境内外币类型
    private String fmttyp;

    //相关参考号
    private String relatedref;

    //币种
    private String cur;

    //金额
    private BigDecimal amt = BigDecimal.ZERO;

    //付款人账号
    private String orcact;

    //付款人名称
    private String orcnam;

    //付款人地址
    private String orcadr;

    //付款人extkey
    private String orcext;

    //收款人账号
    private String pyeact;

    //收款人名称
    private String pyenam;

    //收款人地址
    private String pyeadr;

    //付款人开户行
    private PtsptaVo ori;

    //付款人开户行账号
    private String sbkact;

    //收款人开户行
    private PtsptaVo pyb;

    //收款人开户行账号
    private String rbkact;

    //费用承担方
    private String feetyp;

    //附言
    private String commet;

    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date opndat;

    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date valdat;

    //业务类型
    private String txntyp;

    //业务种类
    private String bustyp;

    //汇款人账户性质
    private String acctyp;

    @Override
    public void reset() {
        if (ori == null) {
            ori = new PtsptaVo();
        }
        ori.reset();
        if (pyb == null) {
            pyb = new PtsptaVo();
        }
        pyb.reset();
    }
}
