package com.sunxung.factoring.entity.cashflowmanage;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sunxung.factoring.entity.BaseEntity;
import com.sunxung.factoring.entity.cashflowmanage.vo.CashFlowManageBaseVo;
import com.sunxung.factoring.entity.sys.Dictionary;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description : 现金流管理基础信息表
 * @Author : JiaYf
 * @Date: 2021-11-02 17:07
 */
@TableName("cash_flow_manage_basic_info")
public class CashFlowManageBasicInfo extends BaseEntity {

    /**
     * 供应商Id
     **/
    @TableField("supplier_id")
    private Long supplierId;

    /**
     * 核心企业Id
     */
    @TableField("enterprise_customer_info_id")
    private Long enterpriseCustomerInfoId;

    /**
     * 贸易平台Id
     */
    @TableField("trading_platform_id")
    private Long tradingPlatformId;

    /**
     * 业务名称
     **/
    @TableField("business_name")
    private String businessName;

    /**
     * 业务编号
     **/
    @TableField("business_number")
    private String businessNumber;

    /**
     * 出入账类型:1,入账;2,出账
     **/
    @TableField("entry_out_type")
    private String entryOutType;

    /**
     * 类型：现金、票据贴现、保理利息、保理本金、质保金、折扣率等等
     **/
    @TableField("cash_type")
    private String cashType;

    /**
     * 类型：现金、票据贴现、保理利息、保理本金、质保金、折扣率等等
     **/
    @TableField(exist = false)
    private Dictionary cashTypeDict;

    /**
     * 币种
     */
    @TableField("currency")
    private Long currency;

    /**
     * 币种字典项
     */
    @TableField(exist = false)
    private Dictionary currencyDict;

    /**
     * 金额
     **/
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 状态 入账：1,已创建、2,已分配;出账：3,待处理、4,已完成
     **/
    @TableField("cash_status")
    private Integer cashStatus;

    /**
     * 采购合同编号
     **/
    @TableField("contract_number")
    private String contractNumber;

    /**
     * 日期
     **/
    @TableField("cash_date")
    private Date cashDate;

    /**
     * 备注
     **/
    @TableField("remark")
    private String remark;

    /**
     * 对应分账管理基本信息表Id
     */
    @TableField("ledger_account_basic_info_id")
    private Long ledgerAccountBasicInfoId;

    /**
     * 对应sop保理业务入账表Id
     */
    @TableField("billing_factoring_entry_id")
    private Long billingFactoringEntryId;

    /**
     * 对应分账管理货物分配表Id
     */
    @TableField("ledger_fund_goods_assign_id")
    private Long ledgerFundGoodsAssignId;

    public CashFlowManageBasicInfo() {
    }

    public CashFlowManageBasicInfo(CashFlowManageBaseVo cashFlowManageBaseVo) {
        this.enterpriseCustomerInfoId = cashFlowManageBaseVo.getCustomerId();
        this.supplierId = cashFlowManageBaseVo.getSupplierId();
        this.businessName = cashFlowManageBaseVo.getBusinessName();
        this.businessNumber = cashFlowManageBaseVo.getBusinessNumber();
        this.cashType = cashFlowManageBaseVo.getCashTypeDict().getCode();
        this.currency = cashFlowManageBaseVo.getCurrencyDict().getId();
        this.amount = cashFlowManageBaseVo.getAmount();
        this.remark = cashFlowManageBaseVo.getRemark();
        this.cashDate = cashFlowManageBaseVo.getCashDate();
    }

    public Long getEnterpriseCustomerInfoId() {
        return enterpriseCustomerInfoId;
    }

    public void setEnterpriseCustomerInfoId(Long enterpriseCustomerInfoId) {
        this.enterpriseCustomerInfoId = enterpriseCustomerInfoId;
    }

    public Long getTradingPlatformId() {
        return tradingPlatformId;
    }

    public void setTradingPlatformId(Long tradingPlatformId) {
        this.tradingPlatformId = tradingPlatformId;
    }

    public String getBusinessName() {
        return businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    public String getBusinessNumber() {
        return businessNumber;
    }

    public void setBusinessNumber(String businessNumber) {
        this.businessNumber = businessNumber;
    }

    public String getEntryOutType() {
        return entryOutType;
    }

    public void setEntryOutType(String entryOutType) {
        this.entryOutType = entryOutType;
    }

    public String getCashType() {
        return cashType;
    }

    public void setCashType(String cashType) {
        this.cashType = cashType;
    }

    public Dictionary getCashTypeDict() {
        return cashTypeDict;
    }

    public void setCashTypeDict(Dictionary cashTypeDict) {
        this.cashTypeDict = cashTypeDict;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Integer getCashStatus() {
        return cashStatus;
    }

    public void setCashStatus(Integer cashStatus) {
        this.cashStatus = cashStatus;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getContractNumber() {
        return contractNumber;
    }

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

    public Date getCashDate() {
        return cashDate;
    }

    public void setCashDate(Date cashDate) {
        this.cashDate = cashDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getCurrency() {
        return currency;
    }

    public void setCurrency(Long currency) {
        this.currency = currency;
    }

    public Dictionary getCurrencyDict() {
        return currencyDict;
    }

    public void setCurrencyDict(Dictionary currencyDict) {
        this.currencyDict = currencyDict;
    }

    public Long getLedgerAccountBasicInfoId() {
        return ledgerAccountBasicInfoId;
    }

    public void setLedgerAccountBasicInfoId(Long ledgerAccountBasicInfoId) {
        this.ledgerAccountBasicInfoId = ledgerAccountBasicInfoId;
    }

    public Long getBillingFactoringEntryId() {
        return billingFactoringEntryId;
    }

    public void setBillingFactoringEntryId(Long billingFactoringEntryId) {
        this.billingFactoringEntryId = billingFactoringEntryId;
    }

    public Long getLedgerFundGoodsAssignId() {
        return ledgerFundGoodsAssignId;
    }

    public void setLedgerFundGoodsAssignId(Long ledgerFundGoodsAssignId) {
        this.ledgerFundGoodsAssignId = ledgerFundGoodsAssignId;
    }
}
