package com.uas.finance.model;

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

/**
 * created by shicr on 2017/12/20
 * 经营情况表
 **/
@Entity
@Table(name = "productmix")
public class ProductMix implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

    /**
     * 产品/服务种类
     */
    @Column(name = "pm_kind")
    private String pm_kind;

    /**
     * 今年营业收入
     */
    @Column(name = "pm_tannualrevenue")
    private Double pm_tannualrevenue;

    /**
     * 占今年总收入比例
     */
    @Column(name = "pm_tratio")
    private Double pm_tratio;

    /**
     * 上年营业收入
     */
    @Column(name = "pm_annualrevenue")
    private Double pm_annualrevenue;

    /**
     * 占总收入比例
     */
    @Column(name = "pm_ratio")
    private Double pm_ratio;

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

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

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

    public Long getErpId() {
        return erpId;
    }

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

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

    public Long getId() {
        return id;
    }

    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 getEnuu() {
        return enuu;
    }

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

    public String getPm_kind() {
        return pm_kind;
    }

    public void setPm_kind(String pm_kind) {
        this.pm_kind = pm_kind;
    }

    public Double getPm_tannualrevenue() {
        return pm_tannualrevenue;
    }

    public void setPm_tannualrevenue(Double pm_tannualrevenue) {
        this.pm_tannualrevenue = pm_tannualrevenue;
    }

    public Double getPm_tratio() {
        return pm_tratio;
    }

    public void setPm_tratio(Double pm_tratio) {
        this.pm_tratio = pm_tratio;
    }

    public Double getPm_annualrevenue() {
        return pm_annualrevenue;
    }

    public void setPm_annualrevenue(Double pm_annualrevenue) {
        this.pm_annualrevenue = pm_annualrevenue;
    }

    public Double getPm_ratio() {
        return pm_ratio;
    }

    public void setPm_ratio(Double pm_ratio) {
        this.pm_ratio = pm_ratio;
    }
}
