package com.sunxung.factoring.entity.financing.contract;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sunxung.factoring.entity.BaseEntity;
import com.sunxung.factoring.entity.financing.review.ReviewBasicContract;

import java.util.List;

/**
 * <p>
 * 合同:基础交易合同信息（三方协议）
 * </p>
 *
 * @author liutao
 * @since 2024-01-23
 */
@TableName("contract_basic_contract")
public class ContractBasicContract extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 合同基础信息ID
     */
    @TableField("contract_info_id")
    private Long contractInfoId;

    /**
     * 三方协议编号:按规则生成
     */
    @TableField("tripartite_agreement_no")
    private String tripartiteAgreementNo;

    /**
     * 债务人公司ID
     */
    @TableField("debtor_company_id")
    private Long debtorCompanyId;

    /**
     * 债务人公司名称
     */
    @TableField("debtor_company_name")
    private String debtorCompanyName;

    /**
     * 债务人统一社会信用码
     */
    @TableField("debtor_social_credit_code")
    private String debtorSocialCreditCode;

    /**
     * 特殊约定
     */
    @TableField("special_agreement")
    private String specialAgreement;

    /**
     * 三方协议变更内容
     */
    @TableField(exist = false)
    private List<ContractBasicContractChangeContent> contractContentList;

    public ContractBasicContract() {
    }

    public ContractBasicContract(ReviewBasicContract reviewBasicContract) {
        this.tripartiteAgreementNo = reviewBasicContract.getTripartiteAgreementNo();
        this.debtorCompanyId = reviewBasicContract.getDebtorCompanyId();
        this.debtorCompanyName = reviewBasicContract.getDebtorCompanyName();
        this.debtorSocialCreditCode = reviewBasicContract.getDebtorSocialCreditCode();
        this.specialAgreement = reviewBasicContract.getSpecialAgreement();
    }

    public Long getContractInfoId() {
        return contractInfoId;
    }

    public void setContractInfoId(Long contractInfoId) {
        this.contractInfoId = contractInfoId;
    }

    public String getTripartiteAgreementNo() {
        return tripartiteAgreementNo;
    }

    public void setTripartiteAgreementNo(String tripartiteAgreementNo) {
        this.tripartiteAgreementNo = tripartiteAgreementNo;
    }

    public Long getDebtorCompanyId() {
        return debtorCompanyId;
    }

    public void setDebtorCompanyId(Long debtorCompanyId) {
        this.debtorCompanyId = debtorCompanyId;
    }

    public String getDebtorCompanyName() {
        return debtorCompanyName;
    }

    public void setDebtorCompanyName(String debtorCompanyName) {
        this.debtorCompanyName = debtorCompanyName;
    }

    public String getDebtorSocialCreditCode() {
        return debtorSocialCreditCode;
    }

    public void setDebtorSocialCreditCode(String debtorSocialCreditCode) {
        this.debtorSocialCreditCode = debtorSocialCreditCode;
    }

    public String getSpecialAgreement() {
        return specialAgreement;
    }

    public void setSpecialAgreement(String specialAgreement) {
        this.specialAgreement = specialAgreement;
    }

    public List<ContractBasicContractChangeContent> getContractContentList() {
        return contractContentList;
    }

    public void setContractContentList(List<ContractBasicContractChangeContent> contractContentList) {
        this.contractContentList = contractContentList;
    }

    @Override
    public String toString() {
        return "ContractBasicContract{" +
                "contractInfoId=" + contractInfoId +
                ", tripartiteAgreementNo=" + tripartiteAgreementNo +
                ", debtorCompanyId=" + debtorCompanyId +
                ", debtorCompanyName=" + debtorCompanyName +
                ", debtorSocialCreditCode=" + debtorSocialCreditCode +
                ", specialAgreement=" + specialAgreement +
                "}";
    }
}
