package com.uas.search.console.b2b.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;

@Entity
@Table(name = ProductBrandSimpleInfo.TABLE_NAME)
public class ProductBrandSimpleInfo {

	/**
	 * 表名
	 */
	public static final String TABLE_NAME = "PRODUCT$BRAND";

	/**
	 * 各字段列名（也是存储索引时的field名）
	 */
	public static final String ID_FIELD = "br_id";

	public static final String UUID_FIELD = "br_uuid";

	public static final String NAMECN_FIELD = "br_name_cn";

	public static final String NAMEEN_FIELD = "br_name_en";

	public static final String VENDOR_FIELD = "br_vendor";

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

	/**
	 * uuid
	 */
	@Column(name = UUID_FIELD)
	private String uuid;

	/**
	 * 品牌中文名
	 */
	@Column(name = NAMECN_FIELD)
	private String nameCn;

	/**
	 * 品牌英文名
	 */
	@Column(name = NAMEEN_FIELD)
	private String nameEn;

	/**
	 * 供应商名
	 */
	@Column(name = VENDOR_FIELD)
	private String vendor;

	public Long getId() {
		return id;
	}

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

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getNameCn() {
		return nameCn;
	}

	public void setNameCn(String nameCn) {
		this.nameCn = nameCn;
	}

	public String getNameEn() {
		return nameEn;
	}

	public void setNameEn(String nameEn) {
		this.nameEn = nameEn;
	}

	public String getVendor() {
		return vendor;
	}

	public void setVendor(String vendor) {
		this.vendor = vendor;
	}

	@Override
	public String toString() {
		return "ProductBrandSimpleInfo [id=" + id + ", uuid=" + uuid + ", nameCn=" + nameCn + ", nameEn=" + nameEn
				+ ", vendor=" + vendor + "]";
	}

	/**
	 * 获取除了status外的所有字段的列名（field名）
	 * 
	 * @return
	 */
	public static List<String> getKeywordFields() {
		List<String> fields = new ArrayList<>();
		fields.add(UUID_FIELD);
		fields.add(NAMECN_FIELD);
		fields.add(NAMEEN_FIELD);
		fields.add(VENDOR_FIELD);
		return fields;
	}


}
