package com.sunxung.factoring.component.enums;

import lombok.Getter;

/**
 * @author 张超
 * @date 2021/9/23
 */
@Getter
public enum ClientTypeEnum {

  WEB("web", 0, "浏览器"),

  APP("app", 1, "移动端"),

  WECHAT("wechat",3,"微信小程序");


  private String code;

  private Integer numberCode;

  private String desc;


  ClientTypeEnum(String code, Integer numberCode, String desc) {
    this.code = code;
    this.numberCode = numberCode;
    this.desc = desc;

  }

  public static ClientTypeEnum check(String code){
    for(ClientTypeEnum clientTypeEnum:values()){
      if(clientTypeEnum.getCode().equals(code)){
        return clientTypeEnum;
      }
    }
    return null;
  }
}
