package com.goafanti.common.enums;

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

public enum OrganizationIdentityFields {
	UID("uid", "用户id"),
	CONTACTS("contacts", "联系人"),
	CONTACTMOBILE("contactMobile", "联系方式"),
	FIXEDTEL("fixedTel", "固定电话"),
	QQ("qq", "QQ号"),
	POSTALADDRESS("postalAddress", "通讯地址"),
	POSTCODE("postcode", "邮政编码"),
	UNITNAME("unitName", "单位名称"),
	REGISTEREDCAPITAL("registeredCapital", "注册资金"),
	LICENCENUMBER("licenceNumber", "营业执照注册号"),
	LICENCEPROVINCE("licenceProvince", "营业执照所在地--省"),
	LICENCECITY("licenceCity", "营业执照所在地-市"),
	LICENCEAREA("licenceArea", "营业执照所在地-区(县)"),
	LICENCESCANNINGURL("licenceScanningUrl", "营业执照副本扫描件URL"),
	ORGCODE("orgCode", "组织机构代码"),
	
	ORGCODEURL("orgCodeUrl", "组织机构代码证URL"),
	BANKACCOUNT("bankAccount", "银行账号"),
	BANKS("banks", "开户行"),
	BANKBRANCH("bankBranch", "开户行支行"),
	BANKCARDNUMBER("bankCardNumber", "银行卡号"),
	VALIDATIONAMOUNT("validationAmount", "打入账内金额"),
	IDENTITYTYPE("identityType", "身份类型"),
	LOCATIONPROVINCE("locationProvince", "开户行所在地-省"),
	LOCATIONCITY("locationCity", "开户行所在地-市"),
	LOCATIONAREA("locationArea", "开户行所在地-区(县)"),
	
	LEGALPERSON("legalPerson", "法人"),
	LEGALPERSONCARD("legalPersonIdCard", "法人身份证号"),
	LASTYEARTAXREPORTURL("lastYearTaxReportUrl", "上年度纳税报表URL"),
	AUDITSTATUS("auditStatus", "审核状态"),
	
	PROCESS("process", "实名认证流程"),
	WRONGCOUNT("wrongCount", "输入错误打款金额次数"),
	PAYMENTDATE("paymentDate", "打款日期"),
	
	LISTED("listed", "是否上市"),
	LISTEDDATE("listedDate", "上市时间"),
	LISTEDTYPE("listedType", "上市类型"),
	STOCKCODE("stockCode", "股票代码"),
	CERTIFICATENUMBER("certificateNumber", "高企认订证书编号"),
	ISSUINGDATE("issuingDate", "高企认定发证时间"),
	
	COGCONTACTS("cogContacts", "高企认定联系人及联系方式"),
	CONSULTANT("consultant", "高企认定咨询师"),
	
	EMAIL("email", "邮箱"),
	
	OTHER("", "未知参数");
	
	private String	code;
	private String	desc;
	
	private static Map<String, OrganizationIdentityFields> status = new HashMap<String, OrganizationIdentityFields>();
	
	private OrganizationIdentityFields(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	static {
		for (OrganizationIdentityFields value : OrganizationIdentityFields.values()) {
			status.put(value.getCode(), value);
		}
	}
	
	public static OrganizationIdentityFields 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);
	}
	
	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

}
