package com.uas.search.console.b2b.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;


/**
 * 代采定单
 * 
 * @author hejq
 * @time 创建时间：2017年3月19日
 */
@Entity
@Table(name = DeputyOrderSimpleInfo.TABLE_NAME)
public class DeputyOrderSimpleInfo {

	public static final String TABLE_NAME = "PURC$DEPUTYORDERS";

	/**
	 * 各字段名
	 */
	public static final String ID_FIELD = "deo_id";

	public static final String CODE_FIELD = "deo_code";

	public static final String STATUSCOE_FIELD = "deo_statuscode";

	public static final String MADEALCODE_FIELD = "deo_madealcode";
	
	public static final String TERVENDOR_FIELD = "deo_tervendor";
	
	public static final String TERVENDUU_FEILD = "deo_tervenduu";

	public static final String VENDUSER_FIELD = "deo_venduser";

	public static final String VENDUSERUU_FIELD = "deo_venduseruu";

	public static final String COMPANYNAME_FIELD = "deo_companyname";

	public static final String LEGALREPRESENT_FIELD = "deo_legalrepresent";

	public static final String CUSTOMER_FIELD = "deo_customer";

	public static final String ENUU_FIELD = "deo_enuu";

	public static final String ENTRYSTATUS_FIELD = "deo_entrystatus";

	public static final String DATE_FIELD = "deo_entrydate";

	public static final String DOWNLOADSTATUS_FIELD = "deo_downloadstatus";

	public static final String SALECODE_FIELD = "deo_salecode";

	public static final String SALEPCODE_FIELD = "deo_salepocode";

	/**
	 * 主键id
	 */
	@Id
	@Column(name = ID_FIELD)
	private Long id;

	/**
	 * 流水号
	 */
	@Column(name = CODE_FIELD)
	private String code;
		
	/**
	 * 状态码
	 */
	@Column(name = STATUSCOE_FIELD)
	private Integer statuscode;


	/**
	 * 主协议编号
	 */
	@Column(name = MADEALCODE_FIELD)
	private String madealcode;

	/**
	 * 终端供应商名称
	 */
	@Column(name = TERVENDOR_FIELD)
	private String tervendor;

	/**
	 * 终端供应商uu
	 */
	@Column(name = TERVENDUU_FEILD)
	private Long tervenduu;

	/**
	 * 供应商联系人
	 */
	@Column(name = VENDUSER_FIELD)
	private String venduser;
		
	/**
	 * 联系人uu
	 */
	@Column(name = VENDUSERUU_FIELD)
	private Long venduseruu;


	/**
	 * 公司全称
	 */
	@Column(name = COMPANYNAME_FIELD)
	private String companyname;


	/**
	 * 我方法定代表人
	 */
	@Column(name = LEGALREPRESENT_FIELD)
	private String legalrepresent;

	/**
	 * 客户名称
	 */
	@Column(name = CUSTOMER_FIELD)
	private String customer;

	/**
	 * 录入企业uu
	 */
	@Column(name = ENUU_FIELD)
	private Long enuu;

	/**
	 * 录入时间
	 */
	@Column(name = DATE_FIELD)
	private Date date;

	/**
	 * 录入状态
	 */
	@Column(name = ENTRYSTATUS_FIELD)
	private String entrystatus;

	/**
	 * erp下载状态
	 */
	@Column(name = DOWNLOADSTATUS_FIELD)
	private String downloadstatus;

	/**
	 * 采购单号
	 */
	@Column(name = SALECODE_FIELD)
	private String salecode;

	/**
	 * 合同编号
	 */
	@Column(name = SALEPCODE_FIELD)
	private String salepocode;

	public Long getId() {
		return id;
	}

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

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Integer getStatuscode() {
		return statuscode;
	}

	public void setStatuscode(Integer statuscode) {
		this.statuscode = statuscode;
	}

	public String getMadealcode() {
		return madealcode;
	}

	public void setMadealcode(String madealcode) {
		this.madealcode = madealcode;
	}

	public String getTervendor() {
		return tervendor;
	}

	public void setTervendor(String tervendor) {
		this.tervendor = tervendor;
	}

	public Long getTervenduu() {
		return tervenduu;
	}

	public void setTervenduu(Long tervenduu) {
		this.tervenduu = tervenduu;
	}

	public String getVenduser() {
		return venduser;
	}

	public void setVenduser(String venduser) {
		this.venduser = venduser;
	}

	public Long getVenduseruu() {
		return venduseruu;
	}

	public void setVenduseruu(Long venduseruu) {
		this.venduseruu = venduseruu;
	}

	public String getCompanyname() {
		return companyname;
	}

	public void setCompanyname(String companyname) {
		this.companyname = companyname;
	}

	public String getLegalrepresent() {
		return legalrepresent;
	}

	public void setLegalrepresent(String legalrepresent) {
		this.legalrepresent = legalrepresent;
	}

	public String getCustomer() {
		return customer;
	}

	public void setCustomer(String customer) {
		this.customer = customer;
	}

	public Long getEnuu() {
		return enuu;
	}

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

	public String getEntrystatus() {
		return entrystatus;
	}

	public void setEntrystatus(String entrystatus) {
		this.entrystatus = entrystatus;
	}

	public Date getDate() {
		return date;
	}

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

	public String getDownloadstatus() {
		return downloadstatus;
	}

	public void setDownloadstatus(String downloadstatus) {
		this.downloadstatus = downloadstatus;
	}

	public String getSalecode() {
		return salecode;
	}

	public void setSalecode(String salecode) {
		this.salecode = salecode;
	}

	public String getSalepocode() {
		return salepocode;
	}

	public void setSalepocode(String salepocode) {
		this.salepocode = salepocode;
	}

	/**
	 * 获取除了status外的所有字段的列名（field名）
	 * 
	 * @return
	 */
	public static List<String> getKeywordFields() {
		List<String> fields = new ArrayList<>();
		fields.add(CODE_FIELD);
		fields.add(COMPANYNAME_FIELD);
		fields.add(CUSTOMER_FIELD);
		fields.add(ENUU_FIELD);
		fields.add(LEGALREPRESENT_FIELD);
		fields.add(MADEALCODE_FIELD);
		fields.add(TERVENDOR_FIELD);
		fields.add(TERVENDUU_FEILD);
		fields.add(VENDUSERUU_FIELD);
		fields.add(VENDUSER_FIELD);
		fields.add(SALECODE_FIELD);
		fields.add(SALEPCODE_FIELD);
		return fields;
	}

	@Override
	public String toString() {
		return "DeputyOrderSimpleInfo{" +
				"id=" + id +
				", code='" + code + '\'' +
				", statuscode=" + statuscode +
				", madealcode='" + madealcode + '\'' +
				", tervendor='" + tervendor + '\'' +
				", tervenduu=" + tervenduu +
				", venduser='" + venduser + '\'' +
				", venduseruu=" + venduseruu +
				", companyname='" + companyname + '\'' +
				", legalrepresent='" + legalrepresent + '\'' +
				", customer='" + customer + '\'' +
				", enuu=" + enuu +
				", date=" + date +
				", entrystatus='" + entrystatus + '\'' +
				", downloadstatus='" + downloadstatus + '\'' +
				'}';
	}

}
