package com.hzs.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 会员显示权限控制类型
 */
@AllArgsConstructor
@Getter
public enum EAuthorityControlType {

    /**
     * 注册格式校验（报单时，【会员姓名】【联系方式】不做格式校验）
     */
    REGISTER(2, "注册格式校验"),

    ;

    /**
     * 实际值
     */
    private final int value;
    /**
     * 显示标签
     */
    private final String label;

    public static String getAuthorityControlType(int value) {
        for (EAuthorityControlType eAuthorityControlType : EAuthorityControlType.values()) {
            if (eAuthorityControlType.value == value) {
                return eAuthorityControlType.label;
            }
        }
        return null;
    }

}
