package com.sunxung.factoring.entity.salescontractmanagement;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sunxung.factoring.entity.BaseEntity;
import com.sunxung.factoring.entity.sys.FileStorage;
import com.sunxung.factoring.entity.sys.FileStorageDO;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 销售合同-审核表
 * </p>
 *
 * @author yafan
 * @since 2023-12-13
 */
@TableName("sales_contract_approval")
public class SalesContractApproval extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 销售合同基本信息表Id
     */
    @TableField("c_sales_contract_basic_info_id")
    private Long cSalesContractBasicInfoId;

    /**
     * 审批意见
     */
    @TableField("approval_comment")
    private String approvalComment;

    /**
     * 审批结论
     */
    @NotEmpty(message = "审批结论不能为空！")
    @TableField("approval_conclusion")
    private String approvalConclusion;

    /**
     * 审核人Id
     */
    @TableField("auditor_id")
    private Long auditorId;

    /**
     * 对账周期方式
     */
    @TableField("settle_cycle_method")
    private String settleCycleMethod;

    /**
     * 对账周期
     */
    @TableField("settle_cycle")
    private Integer settleCycle;

    /**
     * 付款节点
     */
    @TableField("payment_node")
    private String paymentNode;

    /**
     * 付款期限
     */
    @TableField("payment_term")
    private String paymentTerm;

    /**
     * 履约保证金上限
     */
    @TableField("performance_bond_limit")
    private String performanceBondLimit;

    /**
     * 签署确认 0否 1是
     */
    @TableField("sign_confirm")
    private Integer signConfirm;

    @TableField(exist = false)
    private Long businessKey;

    @TableField(exist = false)
    private List<Long> fileIds;

    @TableField(exist = false)
    private List<FileStorage> fileStorages;

    /**
     * 合同签署人信息
     */
    @TableField(exist = false)
    private List<CSalesContractPersonInfo> salesContractPersonInfos;
    /**
     * 质保金信息
     */
    @TableField(exist = false)
    private SalesContractRetentionInfo retentionInfo;

    @TableField(exist = false)
    private String taskId;

    @TableField(exist = false)
    private List<SalesContractApprovalPersonInfoHistoryRef> personInfoHistoryRefList;

    /**
     * 是否有履约保证金，
     */
    @TableField(exist = false)
    private Boolean performanceBond;

    public Long getcSalesContractBasicInfoId() {
        return cSalesContractBasicInfoId;
    }

    public void setcSalesContractBasicInfoId(Long cSalesContractBasicInfoId) {
        this.cSalesContractBasicInfoId = cSalesContractBasicInfoId;
    }

    public String getApprovalComment() {
        return approvalComment;
    }

    public void setApprovalComment(String approvalComment) {
        this.approvalComment = approvalComment;
    }

    public String getApprovalConclusion() {
        return approvalConclusion;
    }

    public void setApprovalConclusion(String approvalConclusion) {
        this.approvalConclusion = approvalConclusion;
    }

    public Long getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(Long auditorId) {
        this.auditorId = auditorId;
    }

    public String getSettleCycleMethod() {
        return settleCycleMethod;
    }

    public void setSettleCycleMethod(String settleCycleMethod) {
        this.settleCycleMethod = settleCycleMethod;
    }

    public Integer getSettleCycle() {
        return settleCycle;
    }

    public void setSettleCycle(Integer settleCycle) {
        this.settleCycle = settleCycle;
    }

    public String getPerformanceBondLimit() {
        return performanceBondLimit;
    }

    public void setPerformanceBondLimit(String performanceBondLimit) {
        this.performanceBondLimit = performanceBondLimit;
    }

    public Integer getSignConfirm() {
        return signConfirm;
    }

    public void setSignConfirm(Integer signConfirm) {
        this.signConfirm = signConfirm;
    }

    public Long getBusinessKey() {
        return businessKey;
    }

    public void setBusinessKey(Long businessKey) {
        this.businessKey = businessKey;
    }

    public List<Long> getFileIds() {
        return fileIds;
    }

    public void setFileIds(List<Long> fileIds) {
        this.fileIds = fileIds;
    }

    public List<FileStorage> getFileStorages() {
        return fileStorages;
    }

    public void setFileStorages(List<FileStorage> fileStorages) {
        this.fileStorages = fileStorages;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public SalesContractRetentionInfo getRetentionInfo() {
        return retentionInfo;
    }

    public void setRetentionInfo(SalesContractRetentionInfo retentionInfo) {
        this.retentionInfo = retentionInfo;
    }

    public List<CSalesContractPersonInfo> getSalesContractPersonInfos() {
        return salesContractPersonInfos;
    }

    public void setSalesContractPersonInfos(List<CSalesContractPersonInfo> salesContractPersonInfos) {
        this.salesContractPersonInfos = salesContractPersonInfos;
    }

    public List<SalesContractApprovalPersonInfoHistoryRef> getPersonInfoHistoryRefList() {
        return personInfoHistoryRefList;
    }

    public void setPersonInfoHistoryRefList(List<SalesContractApprovalPersonInfoHistoryRef> personInfoHistoryRefList) {
        this.personInfoHistoryRefList = personInfoHistoryRefList;
    }

    public Boolean getPerformanceBond() {
        return performanceBond;
    }

    public void setPerformanceBond(Boolean performanceBond) {
        this.performanceBond = performanceBond;
    }

    public String getPaymentNode() {
        return paymentNode;
    }

    public void setPaymentNode(String paymentNode) {
        this.paymentNode = paymentNode;
    }

    public String getPaymentTerm() {
        return paymentTerm;
    }

    public void setPaymentTerm(String paymentTerm) {
        this.paymentTerm = paymentTerm;
    }

    @Override
    public String toString() {
        return "SalesContractApproval{" +
                ", cSalesContractBasicInfoId=" + cSalesContractBasicInfoId +
                ", approvalComment=" + approvalComment +
                ", approvalConclusion=" + approvalConclusion +
                ", auditorId=" + auditorId +
                ", settleCycleMethod=" + settleCycleMethod +
                ", performanceBondLimit=" + performanceBondLimit +
                ", signConfirm=" + signConfirm +
                "}";
    }
}
