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

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

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

/**
 * 账户中心企业圈
 * 
 * @author hejq
 * @time 创建时间：2017年4月21日
 */
@Table(name = "V$AC$US$DETAIL")
@Entity
public class UserSpaceDetailSimpleInfo {

	/**
	 * 表名
	 */
	public static final String TABLE_NAME = "AC$US$DETAIL";

	/**
	 * 字段名
	 */
	public static final String UU_FIELD = "uu";

	public static final String NAME_FIELD = "name";

	public static final String SHORTNAME_FIELD = "shortname";

	public static final String INDUSTRY_FIELD = "industry";

	public static final String BUSINESSCODE_FIELD = "businesscode";

	public static final String ID_FIELD = "id";
	
	public static final String ADMINNAME_FIELD = "adminname";

	public static final String SEARCHSTATUS_FIELD = "searchstatus";

	public static final String STATUS_FIELD = "status";

	public static final String PROFESSION_FIELD = "profession";

	public static final String TAGS_FIELD = "tags";

	@Id
	@Column(name = ID_FIELD)
	private Long id;

	@Column(name = UU_FIELD)
	private Long uu;

	@Column(name = NAME_FIELD)
	private String name;

	@Column(name = SHORTNAME_FIELD)
	private String shortname;

	@Column(name = INDUSTRY_FIELD)
	private String industry;

	@Column(name = BUSINESSCODE_FIELD)
	private String businesscode;

	@Column(name = ADMINNAME_FIELD)
	private String adminname;

	@Column(name = SEARCHSTATUS_FIELD)
	private Short searchstatus;

	@Column(name = STATUS_FIELD)
	private Short status;

	@Column(name = PROFESSION_FIELD)
	private String profession;

	@Column(name = TAGS_FIELD)
	private String tags;

	public Long getId() {
		return id;
	}

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

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBusinesscode() {
		return businesscode;
	}

	public void setBusinesscode(String businesscode) {
		this.businesscode = businesscode;
	}

	public String getShortname() {
		return shortname;
	}

	public void setShortname(String shortname) {
		this.shortname = shortname;
	}

	public String getIndustry() {
		return industry;
	}

	public void setIndustry(String industry) {
		this.industry = industry;
	}

	public String getAdminname() {
		return adminname;
	}

	public void setAdminname(String adminname) {
		this.adminname = adminname;
	}

	public Short getSearchstatus() {
		return searchstatus == null ? (short) 1 : searchstatus;
	}

	public void setSearchstatus(Short searchstatus) {
		this.searchstatus = searchstatus;
	}

	public Short getStatus() {
		return status == null ? (short) 1 : status;
	}

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

	public String getProfession() {
		return profession;
	}

	public void setProfession(String profession) {
		this.profession = profession;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	public Long getUu() {
		return uu;
	}

	public void setUu(Long uu) {
		this.uu = uu;
	}

	/**
	 * 获取所有可以搜索的字段列名（索引的field名）
	 * 
	 * @return 可以搜索的字段列名
	 */
	public static List<String> getKeywordFields() {
		List<String> fields = new ArrayList<>();
		fields.add(NAME_FIELD);
		fields.add(SHORTNAME_FIELD);
		fields.add(INDUSTRY_FIELD);
		fields.add(BUSINESSCODE_FIELD);
		fields.add(ADMINNAME_FIELD);
		fields.add(PROFESSION_FIELD);
		fields.add(TAGS_FIELD);
		fields.add(UU_FIELD);
		return fields;
	}

	@Override
	public String toString() {
		return "UserSpaceDetailSimpleInfo [id=" + id + ", uu=" + uu + ", name=" + name + ", shortname=" + shortname
				+ ", industry=" + industry + ", businesscode=" + businesscode + ", adminname=" + adminname
				+ ", searchstatus=" + searchstatus + ", status=" + status + ", profession=" + profession + ", tags="
				+ tags + "]";
	}



}
