package com.brilliance.isc.common.rmbbop.vo;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.common.liaallg.vo.LiaallgVo;
import com.brilliance.isc.common.setglg.vo.SetglgVo;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.brilliance.isc.common.vo.BizAmdInfoVo;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;

@Data
@EqualsAndHashCode(callSuper = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel(value = "申报请求信息", description = "申报请求信息")
public class RmbbopRequest<T1 extends BizInfoVo, T2 extends BizAmdInfoVo> extends AbstractCommonVo {

    @ApiModelProperty(value = "当前交易码", name = "transName", required = true)
    private String transName = NULLSTR;

    @ApiModelProperty(value = "交易类型", name = "dectyp", required = true)
    private String dectyp = NULLSTR;

    @ApiModelProperty(value = "当前经办人员ID", name = "userId", required = true)
    private String userId = NULLSTR;

    @ApiModelProperty(value = "业务摘要信息", name = "rec", required = true)
    private T1 rec;

    @ApiModelProperty(value = "业务摘要修改信息", name = "amdRec", required = true)
    private T2 amdRec;

    @ApiModelProperty(value = "CBB列表", name = "cbsMap", required = true)
    private Map<String, Cbb> cbsMap;

    @ApiModelProperty(value = "结算分录信息", name = "setglg", required = true)
    private SetglgVo setglg;

    @ApiModelProperty(value = "收款总金额", name = "allamt", required = true)
    private BigDecimal allamt = Decimals.ZERO_SCALE2;

    @ApiModelProperty(value = "交易角色参与方列表", name = "ptsList", required = true)
    private List<PtsptaVo> ptsList;

    @ApiModelProperty(value = "报送主信息", name = "rmbbop", required = true)
    private Rmbbop rmbbop;

    @ApiModelProperty(value = "表外金额", name = "liaallgList", required = true)
    private List<LiaallgVo> liaallg;



    @Override
    public void reset() {
        if (rmbbop == null) {
            rmbbop = new Rmbbop();
        }
        rmbbop.reset();
    }
}


