package com.sikey.wa04.common.enums;

import lombok.Getter;

/**
 * 群成员类型
 *
 * @author luoyangwei
 */
@Getter
public enum UserType {
    USER(1),
    CHILD(2);

    private final Integer value;

    UserType(Integer value) {
        this.value = value;
    }

    public static UserType valueOf(Integer value) {
        for (UserType type : values()) {
            if (type.value.equals(value)) {
                return type;
            }
        }
        throw new IllegalArgumentException("No such value: " + value);
    }
}
