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

import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import cn.ezhizao.framework.web.domain.BaseEntity;
import cn.ezhizao.project.system.domain.SysFileStorage;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

/**
 * @author 王建
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class BizDeduction extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Excel(name = "金额",sort = 5)
    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "状态 0-待确认扣款，1可扣款 3已扣款 4-驳回待处理")
    private Integer status;


    @Excel(name = "状态",sort = 9)
    @TableField(exist = false)
    private String statusType;

    @ApiModelProperty(value = "来源id")
    private Long sourceId;

    @ApiModelProperty(value = "客户id")
    private Long companyId;

    @Excel(name = "客户名称",sort = 1)
    @ApiModelProperty(value = "客户名")
    @TableField(exist = false)
    private String companyName;

    @ApiModelProperty("所属年")
    private String year;

    @ApiModelProperty("所属月")
    private String month;

    @ApiModelProperty(value = "来源表名")
    private String sourceTableName;

    @Excel(name = "来源名",sort = 5)
    @ApiModelProperty(value = "来源名 报税/社保/公积金")
    private String sourceName;

    @ApiModelProperty(value = "确认人id")
    private Long confirmId;

    @Excel(name = "确认人" ,sort = 5)
    @ApiModelProperty(value = "确认人")
    @TableField(exist = false)
    private String confirmName;

    @Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss",sort = 6)
    @ApiModelProperty(value = "确认时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp confirmDate;

    @ApiModelProperty(value = "操作人id")
    private Long operationId;

    @Excel(name = "操作人",sort = 7)
    @ApiModelProperty(value = "操作人")
    @TableField(exist = false)
    private String operationName;

    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss",sort = 8)
    @ApiModelProperty(value = "操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp operationDate;

    @ApiModelProperty(value = "主程序账套外键")
    private Long tenantId;

    @ApiModelProperty("失败原因")
    private String failureResult;
    @ApiModelProperty("失败类型")
    private Integer failureType;

    @ApiModelProperty("可扣款")
    private Integer deductible;

    @Excel(name = "来源",sort = 2)
    @TableField(exist = false)
    private String fromCompanyName;
    @TableField(exist = false)
    private String fromTenantId;

    @Excel(name = "纳税性质",sort = 3)
    @TableField(exist = false)
    private String taxType;


    @Excel(name = "扣款期",sort = 4)
    @TableField(exist = false)
    private String currentMonth;

    @ApiModelProperty("来源信息")
    @TableField(exist = false)
    private List<String> sourceNames;

    @ApiModelProperty("凭证附件")
    @TableField(exist = false)
    private List<SysFileStorage> files;

    @ApiModelProperty("工单外键")
    private Long workOrderId;

    //是否为自己负责(当前登陆人Id)
    @TableField(exist = false)
    private Long principal;

    @TableField(exist = false)
    private String toTenantName;

    private Integer payWay;
}
