package com.inkasso.factoring.salesManagement.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.inkasso.factoring.common.entity.BaseEntity;

import java.math.BigDecimal;

/**
 * <p>
 * 销售合同-质保金信息表
 * </p>
 *
 * @author yafan
 * @since 2023-12-15
 */
@TableName("sales_contract_retention_info")
public class SalesContractRetentionInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 销售合同-审核表Id
     */
    @TableField("sales_contract_approval_id")
    private Long salesContractApprovalId;

    /**
     * 是否有质保金，0:无 1:有
     */
    @TableField("is_retention")
    private Boolean retention;

    /**
     * 质保金比例
     */
    @TableField("retention_percent")
    private BigDecimal retentionPercent;

    /**
     * 质保金是否有上限，0:无 1:有
     */
    @TableField("is_limit")
    private Boolean top;

    /**
     * 质保金上限
     */
    @TableField("retention_limit")
    private BigDecimal retentionLimit;

    /**
     * 质保金释放规则
     */
    @TableField("release_method")
    private String releaseMethod;

    /**
     * 质保期限
     */
    @TableField("retention_period")
    private String retentionPeriod;

    public Long getSalesContractApprovalId() {
        return salesContractApprovalId;
    }

    public void setSalesContractApprovalId(Long salesContractApprovalId) {
        this.salesContractApprovalId = salesContractApprovalId;
    }

    public BigDecimal getRetentionPercent() {
        return retentionPercent;
    }

    public void setRetentionPercent(BigDecimal retentionPercent) {
        this.retentionPercent = retentionPercent;
    }

    public Boolean getRetention() {
        return retention;
    }

    public void setRetention(Boolean retention) {
        this.retention = retention;
    }

    public Boolean getTop() {
        return top;
    }

    public void setTop(Boolean top) {
        this.top = top;
    }

    public BigDecimal getRetentionLimit() {
        return retentionLimit;
    }

    public void setRetentionLimit(BigDecimal retentionLimit) {
        this.retentionLimit = retentionLimit;
    }

    public String getReleaseMethod() {
        return releaseMethod;
    }

    public void setReleaseMethod(String releaseMethod) {
        this.releaseMethod = releaseMethod;
    }

    public String getRetentionPeriod() {
        return retentionPeriod;
    }

    public void setRetentionPeriod(String retentionPeriod) {
        this.retentionPeriod = retentionPeriod;
    }

    @Override
    public String toString() {
        return "SalesContractRetentionInfo{" +
                ", salesContractApprovalId=" + salesContractApprovalId +
                ", retentionPercent=" + retentionPercent +
                ", retentionLimit=" + retentionLimit +
                ", releaseMethod=" + releaseMethod +
                ", retentionPeriod=" + retentionPeriod +
                "}";
    }
}
