package com.railway.business.catenary.enums;

/**
 * 检测表类型
 *
 * @author railway
 */
public enum JcebTypeEnum {
  /** 检测表类型 */
  Gjsfx("gjsfx", "关节式分相"),
  Jddz("jddz", "接地电阻"),
  Jyzqsjl("jyzqsjl", "绝缘子清扫记录"),
  Lbjghjl("lbjghjl", "零部件更换记录"),
  Qmjcjl("qmjcjl", "全面检查记录"),
  Xsjcjl("xsjcjl", "巡视检查记录"),

  /** 检测表类型 */
  Blq("blq", "避雷器"),
  Dmcgyq("dmcgyq", "地面磁感应器"),
  Fdfxjyq("fdfxjyq", "dxf分选绝缘器"),
  Glkg("glkg", "隔离开关"),
  Jcxc("jcxc", "交叉线岔"),
  Wjcxc("wjcxc", "无交叉线岔"),
  ;

  private final String code;
  private final String type;

  JcebTypeEnum(String code, String type) {
    this.code = code;
    this.type = type;
  }

  public String getCode() {
    return code;
  }

  public String getType() {
    return type;
  }

  public static JcebTypeEnum ofValue(String code) {
    for (JcebTypeEnum investor : JcebTypeEnum.values()) {
      if (investor.getCode().equals(code)) {
        return investor;
      }
    }
    return Jddz;
  }
}
