package com.uas.platform.b2b.erp.model;

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

/**
 * 自动转换订单
 *
 * Created by hejq on 2018-05-02.
 */
@Table(name = "auto$orders")
@Entity
public class AutOrder implements Serializable {

    /**
     * default serialVersionUID
     */
    private static final long serialVersionUID = 1L;

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

    /**
     * 采购单号
     */
    @Column(name = "pu_code")
    private String pu_code;

    /**
     * 采购日期
     */
    @Column(name = "pu_date")
    private String pu_date;

    /**
     * 采购单所属采购员名称
     */
    @Column(name = "em_name")
    private String em_name;

    /**
     * 采购单所属采购员联系方式
     */
    @Column(name = "em_mobile")
    private String em_mobile;

    /**
     * 所属采购员邮箱
     */
    @Column(name = "em_email")
    private String em_email;

    /**
     * 采购方
     */
    @Column(name = "en_name")
    private String en_name;

    /**
     * 供应商
     */
    @Column(name = "ve_name")
    private String ve_name;

    /**
     * 币别
     */
    @Column(name = "pu_currency")
    private String pu_currency;

    /**
     * 税率
     */
    @Column(name = "pu_rate")
    private String pu_rate;

    /**
     * 采购类型
     */
    @Column(name = "pu_kind")
    private String pu_kind;

    /**
     * 付款方式
     */
    @Column(name = "pu_payments")
    private String pu_payments;

    /**
     * 送货地址
     */
    @Column(name = "pu_shipaddresscode")
    private String pu_shipaddresscode;

    /**
     * PDF文档的路径
     */
    @Column(name = "pu_filepath")
    private String pu_filepath;

    /**
     * 对应的采购单详情List
     */
    @Transient
    private List<AutOrderDetail> details;

    /**
     * 单据状态
     * <pre>
     *     TOBE_HANDLE(810, "未处理")
     *     HANDLED(811, "已处理")
     * </pre>
     */
    @Column(name = "pu_status")
    private Integer status;

    /**
     * 单据录入时间
     */
    @Column(name = "pu_recorddate")
    private Date date;

    /**
     * 单据转订单时间
     */
    @Column(name = "pu_todate")
    private Date toDate;

    public Long getId() {
        return id;
    }

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

    public String getPu_code() {
        return pu_code;
    }

    public void setPu_code(String pu_code) {
        this.pu_code = pu_code;
    }

    public String getPu_date() {
        return pu_date;
    }

    public void setPu_date(String pu_date) {
        this.pu_date = pu_date;
    }

    public String getEm_name() {
        return em_name;
    }

    public void setEm_name(String em_name) {
        this.em_name = em_name;
    }

    public String getEm_mobile() {
        return em_mobile;
    }

    public void setEm_mobile(String em_mobile) {
        this.em_mobile = em_mobile;
    }

    public String getEm_email() {
        return em_email;
    }

    public void setEm_email(String em_email) {
        this.em_email = em_email;
    }

    public String getEn_name() {
        return en_name;
    }

    public void setEn_name(String en_name) {
        this.en_name = en_name;
    }

    public String getVe_name() {
        return ve_name;
    }

    public void setVe_name(String ve_name) {
        this.ve_name = ve_name;
    }

    public String getPu_currency() {
        return pu_currency;
    }

    public void setPu_currency(String pu_currency) {
        this.pu_currency = pu_currency;
    }

    public String getPu_rate() {
        return pu_rate;
    }

    public void setPu_rate(String pu_rate) {
        this.pu_rate = pu_rate;
    }

    public String getPu_kind() {
        return pu_kind;
    }

    public void setPu_kind(String pu_kind) {
        this.pu_kind = pu_kind;
    }

    public String getPu_payments() {
        return pu_payments;
    }

    public void setPu_payments(String pu_payments) {
        this.pu_payments = pu_payments;
    }

    public String getPu_shipaddresscode() {
        return pu_shipaddresscode;
    }

    public void setPu_shipaddresscode(String pu_shipaddresscode) {
        this.pu_shipaddresscode = pu_shipaddresscode;
    }

    public String getPu_filepath() {
        return pu_filepath;
    }

    public void setPu_filepath(String pu_filepath) {
        this.pu_filepath = pu_filepath;
    }

    public List<AutOrderDetail> getDetails() {
        return details;
    }

    public void setDetails(List<AutOrderDetail> details) {
        this.details = details;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Date getToDate() {
        return toDate;
    }

    public void setToDate(Date toDate) {
        this.toDate = toDate;
    }
}
