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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Objects;

/**
 * 上传合同的签署人信息
 *
 * @author liutao
 * @date 2023-02-09
 */
@TableName("upload_contract_signatory")
public class UploadContractSignatory {

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 上传合同信息id
     */
    @TableField("upload_contract_info_Id")
    private Long UploadContractInfoId;

    /**
     * 签署方姓名
     */
    @TableField("name")
    private String name;

    /**
     * 统一信用代码或者身份证号
     */
    @TableField("social_credit_code")
    private String socialCreditCode;

    /**
     * 签署方类别  true：公司  false 个人
     */
    @TableField("type")
    private Boolean type;

    /**
     * 证件类型
     */
    @TableField("card_type")
    private String cardTypeId;

    /**
     * 担保人证照正面
     */
    @TableField("card_front_file_storage_id")
    private Long cardFrontFileStorageId;

    /**
     * 担保人证照反面
     */
    @TableField("card_reverse_file_storage_id")
    private Long cardReverseFileStorageId;

    /**
     * 联系方式
     **/
    @TableField("contact_number")
    private String contactNumber;

    /**
     * 合同类型 主合同-master、附件-annex
     */
    @TableField("contract_type")
    private String contractType;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof UploadContractSignatory)) {
            return false;
        }
        UploadContractSignatory that = (UploadContractSignatory) o;
        return Objects.equals(getName(), that.getName()) && Objects.equals(getSocialCreditCode(), that.getSocialCreditCode())
                && Objects.equals(getContractType(), that.getContractType());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getName(), getSocialCreditCode(), getContractType());
    }

    public String getContactNumber() {
        return contactNumber;
    }

    public void setContactNumber(String contactNumber) {
        this.contactNumber = contactNumber;
    }

    public String getCardTypeId() {
        return cardTypeId;
    }

    public void setCardTypeId(String cardTypeId) {
        this.cardTypeId = cardTypeId;
    }

    public Long getCardFrontFileStorageId() {
        return cardFrontFileStorageId;
    }

    public void setCardFrontFileStorageId(Long cardFrontFileStorageId) {
        this.cardFrontFileStorageId = cardFrontFileStorageId;
    }

    public Long getCardReverseFileStorageId() {
        return cardReverseFileStorageId;
    }

    public void setCardReverseFileStorageId(Long cardReverseFileStorageId) {
        this.cardReverseFileStorageId = cardReverseFileStorageId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUploadContractInfoId() {
        return UploadContractInfoId;
    }

    public void setUploadContractInfoId(Long uploadContractInfoId) {
        UploadContractInfoId = uploadContractInfoId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSocialCreditCode() {
        return socialCreditCode;
    }

    public void setSocialCreditCode(String socialCreditCode) {
        this.socialCreditCode = socialCreditCode;
    }

    public Boolean getType() {
        return type;
    }

    public void setType(Boolean type) {
        this.type = type;
    }

    public String getContractType() {
        return contractType;
    }

    public void setContractType(String contractType) {
        this.contractType = contractType;
    }
}
