package com.uas.finance.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;

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

/**
 * 股东信息表
 * created by shicr on 2017/12/18
 **/
@Entity
@Table(name = "Shareholders")
public class Shareholders implements Serializable {

    private static final long serialVersionUID = 1L;

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

    /**
     * 股东名称
     */
    @Column(name = "sh_cs_name")
    private String cs_name;

    /**
     * 证件类型
     */
    @Column(name = "sh_cs_paperstype")
    private String cs_paperstype;

    /**
     * 证件号码
     */
    @Column(name = "sh_cs_paperscode")
    private String cs_paperscode;

    /**
     * 出资比例（%）
     */
    @Column(name = "sh_cs_investratio")
    private Double cs_investratio;

    /**
     * 实际投资金额
     */
    @Column(name = "sh_cs_investamount")
    private Double cs_investamount;

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

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

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

    /**
     * 多对一关联客户资料主表
     */
    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name = "sh_cus_id", insertable = false, updatable = false)
    private CustomerInfo customerInfo;

    public Long getCusId() {
        return cusId;
    }

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

    public Long getErpId() {
        return erpId;
    }

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

    /* @JsonIgnore
    @JSONField(serialize = false)
    public CustomerInfo getCustomerInfo() {
        return customerInfo;
    }

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

    public String getCs_name() {
        return cs_name;
    }

    public Long getId() {
        return id;
    }

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

    public void setCs_name(String cs_name) {
        this.cs_name = cs_name;
    }

    public String getCs_paperstype() {
        return cs_paperstype;
    }

    public void setCs_paperstype(String cs_paperstype) {
        this.cs_paperstype = cs_paperstype;
    }

    public String getCs_paperscode() {
        return cs_paperscode;
    }

    public void setCs_paperscode(String cs_paperscode) {
        this.cs_paperscode = cs_paperscode;
    }

    public Double getCs_investratio() {
        return cs_investratio;
    }

    public void setCs_investratio(Double cs_investratio) {
        this.cs_investratio = cs_investratio;
    }

    public Double getCs_investamount() {
        return cs_investamount;
    }

    public void setCs_investamount(Double cs_investamount) {
        this.cs_investamount = cs_investamount;
    }

    public Long getEnuu() {
        return enuu;
    }

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