package com.yuchen.saas.manage.user.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;


@Getter
@AllArgsConstructor
public enum UserEnum {


    WEB("web", 1),


    APP("app", 2),


    OTHER("other", 3),
    WECHAT("weChat", 4),
    ;

    final String name;
    final int category;


    public static UserEnum of(String name) {
        if (name == null) {
            return null;
        }
        UserEnum[] values = UserEnum.values();
        for (UserEnum smsEnum : values) {
            if (smsEnum.name.equals(name)) {
                return smsEnum;
            }
        }
        return null;
    }

}
