package com.uas.finance.model;

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

/**
 * created by shicr on 2017/12/20
 * 变更内容
 **/
@Entity
@Table(name = "changeinstruction")
public class ChangesInstruction implements Serializable {

    private static final long serialVersionUID = 1L;

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

    /**
     * 优软账号
     */
    @Column(name = "ch_enuu")
    private Long enuu;

    /**
     * 变更科目
     */
    @Column(name = "cd_type")
    private String cd_type;

    /**
     * 变更时间
     */
    @Column(name = "cs_date")
    private Date cs_date;

    /**
     * 变更前内容
     */
    @Column(name = "cs_before")
    private String cs_before;

    /**
     * 变更后内容
     */
    @Column(name = "cs_after")
    private String cs_after;

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

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

    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name = "cs_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 getCd_type() {
        return cd_type;
    }

    public void setCd_type(String cd_type) {
        this.cd_type = cd_type;
    }

    public Date getCs_date() {
        return cs_date;
    }

    public void setCs_date(Date cs_date) {
        this.cs_date = cs_date;
    }

    public String getCs_before() {
        return cs_before;
    }

    public void setCs_before(String cs_before) {
        this.cs_before = cs_before;
    }

    public String getCs_after() {
        return cs_after;
    }

    public void setCs_after(String cs_after) {
        this.cs_after = cs_after;
    }

    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;
    }*/
}
