package com.ruoyi.common.constant;

import java.util.LinkedHashMap;
import java.util.Map;

public class PatentType {
	
	private String typeId;
	private String typeName;
	private String typeName2;
	private String typeCode;
	
	public static Map<String,PatentType>ALL=new LinkedHashMap<String,PatentType>();
	
	
//	1发明公开 2 实用新型 3外观设计 4 发明授权
//	IME 企业  OT 机关团体  PE 个人SRI科研机构 UC 大专院校   OTH 其他
//	后续提供全量，之前提供的只有一万
	
	public static PatentType INVENTION_PATENT=new PatentType("1","invention","发明","发明(公开)");
	public static PatentType MODEL_UTILITY =new PatentType("2","modelUtility","实用新型","实用新型");
	public static PatentType APPEARANCE_PATENT=new PatentType("3","appearance","外观设计","外观设计");

	public static PatentType APPEARANCE_AUTH=new PatentType("4","appearanceAuth","发明授权","发明(授权)");
	
	
	public static String getAllPatentTypeIdStr() {
		return "1,2,3";
	}

	public PatentType(String typeId, String typeCode,String typeName,String typeName2) {
		this.typeId = typeId;
		this.typeCode=typeCode;
		this.typeName = typeName;
		this.typeName2=typeName2;
		ALL.put(typeId, this);
	}
	
	public static PatentType valueOfById(String typeId) {
		for(PatentType pt:ALL.values()) {
			if(pt.getTypeId().equals(typeId)) {
				return pt;
			}
		}
		return null;
	}
	
	public static PatentType valueOfByName(String typeName) {
		for(PatentType pt:ALL.values()) {
			if(pt.getTypeName().equals(typeName)) {
				return pt;
			}
		}
		return null;
	}
	
	public static PatentType valueOf(String typeId) {
		return ALL.get(typeId);
	}
	

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	public String getTypeName2() {
		return typeName2;
	}

	public void setTypeName2(String typeName2) {
		this.typeName2 = typeName2;
	}



}
