package com.inkasso.factoring.salesManagement.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.inkasso.adapter.service.query.In;
import com.inkasso.factoring.common.entity.BaseEntity;
import com.inkasso.factoring.file.entity.FileStorageDO;
import com.inkasso.factoring.salesManagement.entity.vo.SalesContractBasicVo;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 销售合同-基本信息表
 * </p>
 *
 * @author yafan
 * @since 2023-11-28
 */
@TableName("c_sales_contract_basic_info")
public class CSalesContractBasicInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 销售合同管理Id
     */
    @TableField("c_sales_contract_management_id")
    @NotNull(message = "销售合同id不能为空！")
    private Long cSalesContractManagementId;

    /**
     * 合同编号
     */
    @TableField("contract_number")
    @NotNull(message = "合同编号不能为空！")
    private String contractNumber;

    /**
     * 合同名称
     */
    @TableField("contract_name")
    @NotNull(message = "合同名称不能为空！")
    private String contractName;

    /**
     * 合同约定金额类型（0固定金额、1适时网价）
     */
    @TableField("contract_plan_amount_type")
    @NotNull(message = "合同约定金额类型不能为空！")
    private Integer contractPlanAmountType;

    /**
     * 是否有履约保证金，0:无 1:有
     */
    @TableField("is_performance_bond")
//    @NotNull(message = "是否有履约保证金不能为空！")
    private Boolean performanceBond;

    /**
     * 是否有质保金，0:无 1:有
     */
    @TableField("is_retention")
//    @NotNull(message = "是否有质保金不能为空！")
    private Boolean retention;

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

    /**
     * 人员信息
     */
    @TableField(exist = false)
    private List<CSalesContractPersonInfo> personInfoList;

    /**
     * 货物信息
     */
    @TableField(exist = false)
    private List<CSalesContractGoodsInfo> goodsInfoList;

    /**
     * 合同文件id
     */
    @TableField(exist = false)
    private List<Long> fileIds;

    /**
     * 合同文件
     */
    @TableField(exist = false)
    private List<FileStorageDO> fileStorages;

    /**
     * 是否提交 1 是 0 否
     */
    @TableField(exist = false)
    private Integer commit;
    /**
     * 验收经办人
     **/
//    @TableField("check_operator")
    @TableField(exist = false)
    private String checkOperator;

    /**
     * 基础信息
     */
    @TableField(exist = false)
    private SalesContractBasicVo contractBasicVo;

    public Long getcSalesContractManagementId() {
        return cSalesContractManagementId;
    }

    public void setcSalesContractManagementId(Long cSalesContractManagementId) {
        this.cSalesContractManagementId = cSalesContractManagementId;
    }

    public String getContractNumber() {
        return contractNumber;
    }

    public void setContractNumber(String contractNumber) {
        this.contractNumber = contractNumber;
    }

    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    public Integer getContractPlanAmountType() {
        return contractPlanAmountType;
    }

    public void setContractPlanAmountType(Integer contractPlanAmountType) {
        this.contractPlanAmountType = contractPlanAmountType;
    }

    public Boolean getPerformanceBond() {
        return performanceBond;
    }

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

    public Boolean getRetention() {
        return retention;
    }

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

    public BigDecimal getRetentionPercent() {
        return retentionPercent;
    }

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

    public List<CSalesContractPersonInfo> getPersonInfoList() {
        return personInfoList;
    }

    public void setPersonInfoList(List<CSalesContractPersonInfo> personInfoList) {
        this.personInfoList = personInfoList;
    }

    public List<CSalesContractGoodsInfo> getGoodsInfoList() {
        return goodsInfoList;
    }

    public void setGoodsInfoList(List<CSalesContractGoodsInfo> goodsInfoList) {
        this.goodsInfoList = goodsInfoList;
    }

    public Integer getCommit() {
        return commit;
    }

    public void setCommit(Integer commit) {
        this.commit = commit;
    }

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

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

    public String getCheckOperator() {
        return checkOperator;
    }

    public void setCheckOperator(String checkOperator) {
        this.checkOperator = checkOperator;
    }

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

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

    public SalesContractBasicVo getContractBasicVo() {
        return contractBasicVo;
    }

    public void setContractBasicVo(SalesContractBasicVo contractBasicVo) {
        this.contractBasicVo = contractBasicVo;
    }

    @Override
    public String toString() {
        return "CSalesContractBasicInfo{" +
                ", cSalesContractManagementId=" + cSalesContractManagementId +
                ", contractNumber=" + contractNumber +
                ", contractName=" + contractName +
                ", contractPlanAmountType=" + contractPlanAmountType +
                ", performanceBond=" + performanceBond +
                ", isRetention=" + retention +
                ", retentionPercent=" + retentionPercent +
                "}";
    }
}
