package com.uas.finance.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 关联企业
 * created by shicr on 2017/12/18
 **/
@Entity
@Table(name = "associate")
public class AssociateCompany implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

    /**
     * 关联方企业名称
     */
    @Column(name = "as_cud_name")
    private String cud_name;

    /**
     * 关联关系
     */
    @Column(name = "as_cud_association")
    private String cud_association;

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

    /**
     * 法人代表股权(占比%)
     */
    @Column(name = "as_cud_ratio")
    private Double cud_ratio;

    /**
     * 主营业务
     */
    @Column(name = "as_cud_product")
    private String cud_product;

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

    @Column(name = "as_cus_id")
    private Long cusId;

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

    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name = "as_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 Long getId() {
        return id;
    }

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

    public String getCud_name() {
        return cud_name;
    }

    public void setCud_name(String cud_name) {
        this.cud_name = cud_name;
    }

    public String getCud_association() {
        return cud_association;
    }

    public void setCud_association(String cud_association) {
        this.cud_association = cud_association;
    }

    public String getCud_legalperson() {
        return cud_legalperson;
    }

    public void setCud_legalperson(String cud_legalperson) {
        this.cud_legalperson = cud_legalperson;
    }

    public Double getCud_ratio() {
        return cud_ratio;
    }

    public void setCud_ratio(Double cud_ratio) {
        this.cud_ratio = cud_ratio;
    }

    public String getCud_product() {
        return cud_product;
    }

    public void setCud_product(String cud_product) {
        this.cud_product = cud_product;
    }

    public Double getCud_amount() {
        return cud_amount;
    }

    public void setCud_amount(Double cud_amount) {
        this.cud_amount = cud_amount;
    }

    public Long getEnuu() {
        return enuu;
    }

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

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

    public void setCustomerInfo(CustomerInfo customerInfo) {
        this.customerInfo = customerInfo;
    }*/
}
