package cn.ezhizao.project.business.order.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.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 档案入库对象 biz_archive_input
 *
 * @author ruoyi
 * @date 2023-10-16
 */
@Data
@TableName(value = "biz_archive_input")
public class BizArchiveInput extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 档案编码
     */
    @Excel(name = "档案编码")
    @ApiModelProperty(value = "档案编码")
    private String archiveCode;

    /**
     * 客户外键
     */
    @ApiModelProperty(value = "档案编码")
    private Long companyId;

    @ApiModelProperty("变更来源外键")
    private Long fromId;

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

    @TableField(exist = false)
    @ApiModelProperty("税号")
    @Excel(name = "税号", sort = 2)
    private String socialCreditCode;

    @ApiModelProperty("签单人")
    private Long signerId;

    @TableField(exist = false)
    @ApiModelProperty("签单人")
    @Excel(name = "签单人")
    private String signerName;

    /**
     * 档案类型id
     */
    @ApiModelProperty(value = "档案编码")
    private Long archiveTypeId;

    /**
     * 开始月
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始月", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "开始月")
    private Date startMonth;

    /**
     * 结束月
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束月", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "结束月")
    private Date endMonth;

    /**
     * 库位外键
     */
    @ApiModelProperty(value = "结束月")
    private Long locationId;

    /**
     * 入库人外键
     */
    @ApiModelProperty(value = "结束月")
    private Long inputEmployeeId;

    /**
     * 凭证图片路径
     */
    @Excel(name = "凭证图片路径")
    @ApiModelProperty(value = "凭证图片路径")
    private String proofUrl;

    @ApiModelProperty("变更类型")
    @TableField(exist = false)
    private String alterType;
    /**
     * 合同编号
     */
    @Excel(name = "合同编号")
    @ApiModelProperty(value = "合同编号")
    private String contractNo;

    /**
     * 签约日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签约日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "签约日期")
    private Date formDate;

    /**
     * 签约金额
     */
    @Excel(name = "签约金额")
    @ApiModelProperty(value = "签约金额")
    private BigDecimal amount;

    /**
     * 优惠金额
     **/
    @Excel(name = "优惠金额")
    @ApiModelProperty("优惠金额")
    private BigDecimal discountAmount;

    /**
     * 优惠金额
     **/
    @Excel(name = "实付金额")
    @ApiModelProperty("实付金额")
    private BigDecimal trueAmount;

    /**
     * 合同审核状态
     */
    @Excel(name = "合同审核状态")
    @ApiModelProperty(value = "合同审核状态")
    private Integer verifyStatus;

    /**
     * 合同类型
     */
    @Excel(name = "合同类型", readConverterExp = "0=新签,1=续签")
    @ApiModelProperty(value = "合同类型")
    private Integer contractType;

    @Excel(name = "任务类型", readConverterExp = "1=循环,2=单次")
    @ApiModelProperty("任务类型")
    private Integer serviceType;

    /**
     * 证照类型
     */
    @ApiModelProperty(value = "证照类型")
    private Long certificateTypeId;

    /**
     * 出库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "出库时间")
    private Date outputDate;

    /**
     * 主程序账套外键
     */
    @ApiModelProperty(value = "出库时间")
    private Long tenantId;

    /**
     * 月数
     */
    @Excel(name = "月数")
    @ApiModelProperty(value = "月数")
    private Long monthNum;

    /**
     * 审核备注
     */
    @Excel(name = "审核备注")
    @ApiModelProperty(value = "审核备注")
    private String verifyRemark;

    @TableField(exist = false)
    private List<BizArchiveInputDetail> details;

    @ApiModelProperty("来源类型外键")
    private Long sourceCategoryId;

    @TableField(exist = false)
    private String sourceCategoryName;

    @TableField(exist = false)
    private String sourceName;
    @TableField(exist = false)
    private String referrerDataSource;

    @ApiModelProperty("来源外键")
    private Long sourceId;


    @ApiModelProperty("状态")
    private Integer status;

    @TableField(exist = false)
    private List<SysFileStorage> files;

    @ApiModelProperty("解除合同状态")
    private Integer dissolution;

    @ApiModelProperty("变更次数")
    @TableField(exist = false)
    private Integer alterNumber;

    @TableField(exist = false)
    private Integer isKeepAccount;
    @TableField(exist = false)
    private Integer isSocialSecurity;
    @TableField(exist = false)
    private Integer isHousingFund;
    @TableField(exist = false)
    private Integer isReturnTax;

    @TableField(exist = false)
    private Integer isRegister;
    @TableField(exist = false)
    private Integer isAlter;
    @TableField(exist = false)
    private Integer isLogout;
    @TableField(exist = false)
    private Integer isQualified;
    @TableField(exist = false)
    private Integer isOther;
}
