package com.goafanti.common.enums;

import java.util.HashMap;
import java.util.Map;

public enum AchievementFields {
	DATACATEGORY("dataCategory", "数据类别"),
	NAME("name", "成果名称"),
	KEYWORD("keyword", "关键词"),
	CATEGORY("category", "类型"),
	SUMMARY("summary", "摘要"),
	INTRODUCTION("introduction", "成果简介"),
	TECHNICALPICTUREURL("technicalPictureUrl", "技术图片URL"),
	FIELDA("fieldA", "应用领域1"),
	FIELDB("fieldB", "应用领域2"),
	FIELDC("fieldC", "应用领域3"),
	MATURITY("maturity", "成熟度"),
	MATURITYPICTUREURL("maturityPictureUrl", "成熟度资料--图片URL"),
	MATURITYTEXTFILEURL("maturityTextFileUrl", "成熟度资料--文本文件URL"),
	MATURITYVIDEOURL("maturityVideoUrl", "成熟度资料--视屏URL"),
	INNOVATION("innovation", "创新度"),
	OWNERNAME("ownerName", "成果所有人名称"),
	OWNERTYPE("ownerType", "所有人类型"),
	OWNERIDNUMBER("ownerIdNumber", "所有人证件号"),
	OWNERMOBILE("ownerMobile", "所有人联系电话"),
	OWNEREMAIL("ownerEmail", "所有人电子邮箱"),
	OWNERPOSTALADDRESS("ownerPostalAddress", "所有人通讯地址"),
	COOPERATIONMODE("cooperationMode", "合作方式"),
	TRANSFERMODE("transferMode", "转让方式"),
	BARGAININGMODE("bargainingMode", "议价方式"),
	TRANSFERPRICE("transferPrice", "转让价格"),
	TECHNICALSCENE("technicalScene", "技术场景"),
	BREAKTHROUGH("breakthrough", "技术突破"),
	PATENTCASE("patentCase", "专利情况"),
	AWARDS("awards", "获奖情况"),
	TEAMDES("teamDes", "技术团队情况"),
	PARAMETER("parameter", "技术参数"),
	TECHPLANURL("techPlanUrl", "技术方案URL"),
	BUSINESSPLANURL("businessPlanUrl", "商业计划书URL"),
	ORGID("orgId", "所属组织ID"),
	ORGNAME("orgName", "所属组织名称"),
	ORGADDRESS("orgAddress", "所属组织地址"),
	ORGEMAIL("orgEmail", "所属组织邮箱"),
	ORGCONTACTS("orgContacts", "所属组织联系人名称"),
	ORGCONTACTSMOBILE("orgContactsMobile", "所属组织联系人电话"),
	STATUS("status", "状态"),
	RELEASESTATUS("releaseStatus", "是否发布"),
	OTHER("", "未知参数");

	private AchievementFields(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	private static Map<String, AchievementFields> status = new HashMap<String, AchievementFields>();

	static {
		for (AchievementFields value : AchievementFields.values()) {
			status.put(value.getCode(), value);
		}
	}

	public static AchievementFields getField(String code) {
		if (containsType(code)) {
			return status.get(code);
		}
		return OTHER;
	}

	public static String getFieldDesc(String code) {
		return getField(code).getDesc();
	}

	public static boolean containsType(String code) {
		return status.containsKey(code);
	}

	private String	code;
	private String	desc;

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}


}
