package com.brilliance.isc.bo;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

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

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

/**
 * TABLE:invuse - 业务发票使用表
 */

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Invuse {

    //INR
    private String inr;

    //发票批次号
    private String seqnum;

    //imf的inr
    private String imfinr;

    //spt的inr
    private String sptinr;

    //行内影像批次号
    private String imgnum;

    //影像ID(人行)
    private String imagid;

    //发票类型
    private String invtyp;

    //发票号码
    private String invnum;

    //发票代码
    private String invcod;

    //未税金额
    private BigDecimal untamt = Decimals.ZERO_SCALE3;

    //失败原因
    private  String reason;

    //开票日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date invdat = NULLDATE;

    //校验码后六位
    private String checkcode;

    //批注方编号
    private String annotacode;

    //批注方名称
    private String annotaname;

    //批注日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date annotadate = NULLDATE;

    //批注描述
    private String annotadesc;

    //发票占用金额
    private BigDecimal amountin = Decimals.ZERO_SCALE3;

    //发票状态
    private  String state;

    //发票查验报文msgid
    private String isusedmsgid;

    //文件类型
    private String filtyp;

    //文件名
    private String filnam;

    //影像文件唯一id
    private String filguid;

    //影像文件text
    private String filtext;

    //业务流水号
    private String trninr;

    //关联业务编号
    private String ownref;

    //发送人行状态
    private String sndsta;

    //发送人行报文msgid
    private String msgid;

    //有效标识
    private String valflg;

    //是否重复性融资
    private String isfnc;

    //实体
    private String etyextkey;

    //发票种类
    private String invflg;

    //所属机构编号
    private String orgno;

    //价税合计
    private BigDecimal amounttax = Decimals.ZERO_SCALE3;

    //发票序号
    private String insidx;

    //机构号
    private String branch;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date credat = NULLDATE;

    /**
     *外数批次号
     */
    private String wsbatchnum;

    //跳过核验
    private String skipped;

    //关联的信用证编号
    private String pntref;

    //处理状态
    private String hantyp;

    //处理时间
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date handat;

    //自开自议新关联业务编号
    private String selfownref;
}
