package com.uas.finance.model;

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

/**
 * created by shicr on 2017/12/20
 * 财务数据表
 **/
@Entity
@Table(name = "accountinfo")
public class AccountInfo implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

    /**
     * 财务类型情况
     */
    @Column(name = "ai_kind")
    private String ai_kind;


    /**
     * 项目名称
     */
    @Column(name = "ai_caname")
    private String ai_caname;

    /**
     * 欠款客户全称
     */
    @Column(name = "ai_cuname")
    private String ai_cuname;

    /**
     * 机构名称
     */
    @Column(name = "ai_bank")
    private String ai_bank;

    /**
     * 金额
     */
    @Column(name = "ai_amount")
    private String ai_amount;

    /**
     * 占比
     */
    @Column(name = "ai_rate")
    private Double ai_rate;

    /**
     * 账龄
     */
    @Column(name = "ai_payment")
    private String ai_payment;


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

    /**
     * 应收账款余额
     */
    @Column(name = "ai_leftamount")
    private Double ai_leftamount;

    /**
     * 产生原因
     */
    @Column(name = "ai_remark")
    private String ai_remark;

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

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

    public Long getErpId() {
        return erpId;
    }

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

    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 getAi_kind() {
        return ai_kind;
    }

    public void setAi_kind(String ai_kind) {
        this.ai_kind = ai_kind;
    }

    public String getAi_caname() {
        return ai_caname;
    }

    public void setAi_caname(String ai_caname) {
        this.ai_caname = ai_caname;
    }

    public String getAi_amount() {
        return ai_amount;
    }

    public void setAi_amount(String ai_amount) {
        this.ai_amount = ai_amount;
    }

    public Double getAi_rate() {
        return ai_rate;
    }

    public void setAi_rate(Double ai_rate) {
        this.ai_rate = ai_rate;
    }

    public String getAi_payment() {
        return ai_payment;
    }

    public void setAi_payment(String ai_payment) {
        this.ai_payment = ai_payment;
    }

    public Long getCusId() {
        return cusId;
    }

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

    public String getAi_cuname() {
        return ai_cuname;
    }

    public void setAi_cuname(String ai_cuname) {
        this.ai_cuname = ai_cuname;
    }

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

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

    public Double getAi_leftamount() {
        return ai_leftamount;
    }

    public void setAi_leftamount(Double ai_leftamount) {
        this.ai_leftamount = ai_leftamount;
    }

    public String getAi_bank() {
        return ai_bank;
    }

    public void setAi_bank(String ai_bank) {
        this.ai_bank = ai_bank;
    }

    public String getAi_remark() {
        return ai_remark;
    }

    public void setAi_remark(String ai_remark) {
        this.ai_remark = ai_remark;
    }

}
