package com.uas.finance.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * created by shicr on 2017/12/20
 * 买方客户资料
 **/
@Entity
@Table(name = "mfcustinfo")
public class MFCustInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "mf_id")
    private Long id;

    /**
     * 企业uu
     *
     * @return
     */
    @Column(name = "mf_enuu")
    private Long enuu;

    /**
     * 买方名称
     */
    @Column(name = "mf_custname")
    private String mf_custname;

    /**
     * 额度申请
     */
    @Column(name = "mf_credit")
    private Double mf_credit;

    /**
     * 法人代表
     */
    @Column(name = "mf_legrep")
    private String mf_legrep;


    /**
     * 注册资本(万元)
     */
    @Column(name = "mf_regcapital")
    private Double mf_regcapital;

    /**
     * 经营地址
     */
    @Column(name = "mf_addr")
    private String mf_addr;

    /**
     * 成立时间
     */
    @Column(name = "mf_estabtime")
    private Date mf_estabtime;

    /**
     * 联系人
     */
    @Column(name = "mf_contact")
    private String mf_contact;

    /**
     * 联系电话
     */
    @Column(name = "mf_contactnum")
    private String mf_contactnum;

    /**
     * 传真
     */
    @Column(name = "mf_fax")
    private String mf_fax;


    /**
     * 电子邮箱
     */
    @Column(name = "mf_email")
    private String mf_email;

    /**
     * 结算开户行
     */
    @Column(name = "mf_balancebank")
    private String mf_balancebank;

    /**
     * 银行账户
     */
    @Column(name = "mf_bankaccount")
    private String mf_bankaccount;

    /**
     * 交易产品
     */
    @Column(name = "mf_tradprod")
    private String mf_tradprod;

    /**
     * 付款条件
     */
    @Column(name = "mf_payterm")
    private String mf_payterm;

    /**
     * 股东占比(%)
     */
    @Column(name = "mf_shareholder")
    private Double mf_shareholder;

    /**
     * 经营范围
     */
    @Column(name = "mf_businsscope")
    private String mf_businsscope;

    /**
     * 客户资料id
     */
    @Column(name = "mf_cus_id")
    private Long cusId;

    /**
     * 是否与其他保理商合作
     * -1:true 0:false
     */
    @Column(name = "mf_coopohers")
    private Short mf_coopohers;

    /**
     * 保险公司取得保险额度
     * -1:true 0:false
     */
    @Column(name = "mf_hasinslimit")
    private Short mf_hasinslimit;

    /**
     * ERP系统中的主键id
     */
    @Column(name = "erpId")
    private Long erpId;

    @OneToMany(mappedBy = "mfCustInfo", cascade = CascadeType.REFRESH)
    private List<MFCustInfoDetail> mfCustInfoDetailList;

    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name = "mf_cus_id", insertable = false, updatable = false)
    private CustomerInfo customerInfo;

    public Long getErpId() {
        return erpId;
    }

    public void setErpId(Long erpId) {
        this.erpId = erpId;
    }

    public Long getCusId() {
        return cusId;
    }

    public void setCusId(Long cusId) {
        this.cusId = cusId;
    }

    /*public CustomerInfo getCustomerInfo() {
        return customerInfo;
    }

    public void setCustomerInfo(CustomerInfo customerInfo) {
        this.customerInfo = customerInfo;
    }
*/
    public Long getId() {
        return id;
    }

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

    public Long getEnuu() {
        return enuu;
    }

    public void setEnuu(Long enuu) {
        this.enuu = enuu;
    }

    public String getMf_custname() {
        return mf_custname;
    }

    public void setMf_custname(String mf_custname) {
        this.mf_custname = mf_custname;
    }

    public Double getMf_credit() {
        return mf_credit;
    }

    public void setMf_credit(Double mf_credit) {
        this.mf_credit = mf_credit;
    }

    public String getMf_legrep() {
        return mf_legrep;
    }

    public void setMf_legrep(String mf_legrep) {
        this.mf_legrep = mf_legrep;
    }

    public Double getMf_regcapital() {
        return mf_regcapital;
    }

    public void setMf_regcapital(Double mf_regcapital) {
        this.mf_regcapital = mf_regcapital;
    }

    public String getMf_addr() {
        return mf_addr;
    }

    public void setMf_addr(String mf_addr) {
        this.mf_addr = mf_addr;
    }

    public Date getMf_estabtime() {
        return mf_estabtime;
    }

    public void setMf_estabtime(Date mf_estabtime) {
        this.mf_estabtime = mf_estabtime;
    }

    public String getMf_contact() {
        return mf_contact;
    }

    public void setMf_contact(String mf_contact) {
        this.mf_contact = mf_contact;
    }

    public String getMf_contactnum() {
        return mf_contactnum;
    }

    public void setMf_contactnum(String mf_contactnum) {
        this.mf_contactnum = mf_contactnum;
    }

    public String getMf_fax() {
        return mf_fax;
    }

    public void setMf_fax(String mf_fax) {
        this.mf_fax = mf_fax;
    }

    public String getMf_email() {
        return mf_email;
    }

    public void setMf_email(String mf_email) {
        this.mf_email = mf_email;
    }

    public String getMf_balancebank() {
        return mf_balancebank;
    }

    public void setMf_balancebank(String mf_balancebank) {
        this.mf_balancebank = mf_balancebank;
    }

    public String getMf_bankaccount() {
        return mf_bankaccount;
    }

    public void setMf_bankaccount(String mf_bankaccount) {
        this.mf_bankaccount = mf_bankaccount;
    }

    public String getMf_tradprod() {
        return mf_tradprod;
    }

    public void setMf_tradprod(String mf_tradprod) {
        this.mf_tradprod = mf_tradprod;
    }

    public String getMf_payterm() {
        return mf_payterm;
    }

    public void setMf_payterm(String mf_payterm) {
        this.mf_payterm = mf_payterm;
    }

    public Double getMf_shareholder() {
        return mf_shareholder;
    }

    public void setMf_shareholder(Double mf_shareholder) {
        this.mf_shareholder = mf_shareholder;
    }

    public String getMf_businsscope() {
        return mf_businsscope;
    }

    public void setMf_businsscope(String mf_businsscope) {
        this.mf_businsscope = mf_businsscope;
    }

    public Short getMf_coopohers() {
        return mf_coopohers;
    }

    public void setMf_coopohers(Short mf_coopohers) {
        this.mf_coopohers = mf_coopohers;
    }

    public Short getMf_hasinslimit() {
        return mf_hasinslimit;
    }

    public void setMf_hasinslimit(Short mf_hasinslimit) {
        this.mf_hasinslimit = mf_hasinslimit;
    }

    public List<MFCustInfoDetail> getMfCustInfoDetailList() {
        return mfCustInfoDetailList;
    }

    public void setMfCustInfoDetailList(List<MFCustInfoDetail> mfCustInfoDetailList) {
        this.mfCustInfoDetailList = mfCustInfoDetailList;
    }
}
