package cn.ezhizao.project.business.invoice.domain;

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

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import cn.ezhizao.framework.web.domain.BaseEntity;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import cn.ezhizao.framework.aspectj.lang.annotation.Excel;

/**
 * 企业租户对象 biz_invoice
 *
 * @author ruoyi
 * @date 2024-08-23
 */
@Data
@TableName(value = "biz_invoice")
public class BizInvoice extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 发票类型
     */
    @Excel(name = "发票类型",sort = 3,readConverterExp = "1=增值税专用发票,2=增值税普通发票")
    @ApiModelProperty(value = "发票类型")
    private Integer invoiceType;

    /**
     * 合同id
     */
    private Long contractId;

    /**
     * 申请开票金额
     */
    @Excel(name = "申请开票金额",sort = 4)
    @ApiModelProperty(value = "申请开票金额")
    private BigDecimal allowInvoiceAmount;

    /**
     * 发票信息
     */
    @ApiModelProperty(value = "发票信息")
    private Long invoiceContent;

    /**
     * 开票方
     */
    @ApiModelProperty(value = "开票方")
    private String invoiceMy;

    /**
     * 社会信用代码
     */
    @ApiModelProperty(value = "社会信用代码")
    private String myCreditSocietyCode;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    private String myAddress;

    /**
     * 账号
     */
    @ApiModelProperty(value = "账号")
    private String myAccount;

    /**
     * 收票方
     */
    @Excel(name = "收票方",sort = 1)
    @ApiModelProperty(value = "收票方")
    private String invoiceOther;

    private String otherCreditSocietyCode;

    private String otherAddress;
    private String otherAccount;
    /**
     * 申请人
     */
    private Long applierId;

    @Excel(name = "发票备注",sort = 5)
    private String remark;
    /**
     * 申请时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30,sort = 8,dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "申请时间")
    private Date applierTime;

    /**
     * 0-未提交 1-待开票 2-已拒绝  3-已开票 4-已退回 5-反审核
     */
    @Excel(name = "状态",sort = 6,readConverterExp = "0=未提交,1=待开票,2=已拒绝,3=已开票,4=已退回,5=反审核")
    private Integer status;

    /**
     * 开票人
     */
    private Long invoiceId;

    /**
     * 开票时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开票时间", width = 30,sort = 10,dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "开票时间")
    private Date invoiceTime;

    /**
     * 开票备注
     */
    @ApiModelProperty(value = "开票备注")
    private String invoiceRemark;

    private String refuseReason;

    private String returnReason;

    @TableField(exist = false)
    @Excel(name = "合同编号",sort = 2)
    private String contractNo;

    @TableField(exist = false)
    @Excel(name = "申请人",sort = 7)
    private String applierName;


    @TableField(exist = false)
    @ApiModelProperty("凭证文件url")
    private String evidenceFile;
    @TableField(exist = false)
    @ApiModelProperty("凭证文件名称")
    private String fileName;
    @TableField(exist = false)
    @ApiModelProperty("凭证原始文件名称")
    private String originalFileName;
    @TableField(exist = false)
    @Excel(name = "开票人",sort = 9)
    private String invoiceName;


    @TableField(exist = false)
    private List<String> dateFilter;

    @TableField(exist = false)
    private List<String> invoiceDateFilter;

    private Long tenantId;
    private String uauditReason;
}
