package com.railway.business.catenary.enums;

/**
 * 排序字段名
 *
 * @author ZhaoMn
 */
public enum JcebOrderFieldEnum {

  /** 排序字段名 */
  CHECK_DATE("checkDate", "check_date", "检查日期"),
  OPERATION_DATE("operationDate", "operation_date", "操作日期"),
  ;

  private final String attribute;
  private final String field;
  private final String notes;

  JcebOrderFieldEnum(String attribute, String field, String notes) {
    this.attribute = attribute;
    this.field = field;
    this.notes = notes;
  }

  public String getAttribute() {
    return attribute;
  }

  public String getField() {
    return field;
  }

  public String getNotes() {
    return notes;
  }

  public static JcebOrderFieldEnum ofValue(String attribute) {
    for (JcebOrderFieldEnum investor : JcebOrderFieldEnum.values()) {
      if (investor.getAttribute().equals(attribute)) {
        return investor;
      }
    }
    return null;
  }
}
