package com.brilliance.isc.common.api.lim.vo;

import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.common.limmod.vo.LimSimpleVo;
import com.brilliance.isc.common.limmod.vo.YpInfoVo;
import com.brilliance.isc.common.limmod.vo.YpnmodVo;
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.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class YapinRequest<T1 extends BizInfoVo, T2 extends BizAmdInfoVo> extends AbstractCommonVo {
    @ApiModelProperty(value = "当前交易码", name = "transName", required = true)
    private String transName = NULLSTR;
    @ApiModelProperty(value = "CBB列表", name = "cbsMap", required = true)
    private Map<String, Cbb> cbsMap;
    @ApiModelProperty(value = "当前经办人员ID", name = "userId", required = true)
    private String userId = NULLSTR;
    @ApiModelProperty(value = "交易角色参与方列表", name = "ptsList", required = true)
    private List<PtsptaVo> ptsList;

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

    private LimSimpleVo limmod;

    private YpInfoVo ypInfoVo;

    private List<YpInfoVo> ypInfoVos;

    private String mac;

    public void reset(){
        if(limmod == null){
            limmod=new LimSimpleVo();
        }
        limmod.reset();
        if(ypInfoVo == null){
            ypInfoVo=new YpInfoVo();
        }
        if(ypInfoVos == null){
            ypInfoVos=new ArrayList<>();
        }
    }
}
