package com.brilliance.isc.bo;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.common.json.BigDecimalSerialize;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

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

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


/**
 * TABLE:cbb:CBB - CBS Balance per Column and Date Range
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Cbb extends AbstractCommonVo {

    private String inr = NULLSTR;

    //与CBB关联的类型
    private String objtyp = NULLSTR;

    //与CBB关联的INR
    private String objinr = NULLSTR;

    private String cbc = NULLSTR;

    private String extid = NULLSTR;

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

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

    private String cur = NULLSTR;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal amt = Decimals.ZERO_SCALE2;

    //INR of Originating CBE Entry
    private String cbeinr = NULLSTR;

    //Currency of Converted Amount
    private String xrfcur = NULLSTR;

    //Converted Balance
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal xrfamt = Decimals.ZERO_SCALE2;

    private String comcur = NULLSTR;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal comamt = Decimals.ZERO_SCALE2;

    private String xcocur = NULLSTR;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal xcoamt = Decimals.ZERO_SCALE2;

    //币种下拉列表
    private Set<String> curSet = new HashSet<>();

}