package com.hzs.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 考核类型
 */
@AllArgsConstructor
@Getter
public enum EAssessmentType {

    /**
     * 0=复购考核
     */
    REPURCHASE_ASSESS(0, "复购考核", 1),

    /**
     * 1=分红考核
     */
    SHARE_ASSESS(1, "分红考核", 1),

    /**
     * 2=不考核
     */
    NO_ASSESSMENT(2, "不考核", 1),

    /**
     * 5=见点收益考核
     */
    POINT_ASSESS(5, "见点收益考核", 0),

    /**
     * 6=区域收益省考核
     */
    PROVINCE_ASSESS(6, "区域考核-省", 0),
    /**
     * 7=区域收益市考核
     */
    CITY_ASSESS(7, "区域考核-市", 0),
    /**
     * 8=区域收益区考核
     */
    COUNTY_ASSESS(8, "区域考核-区", 0),

    ;

    /**
     * 实际值
     */
    private final int value;
    /**
     * 显示标签
     */
    private final String label;
    /**
     * 是否启用（0=是,1=否） -- 来源EYesNo
     */
    private final int enable;


    public static String getLabelByValue(Integer value) {
        if (null != value) {
            for (EAssessmentType enums : EAssessmentType.values()) {
                if (enums.getValue() == value) {
                    return enums.getLabel();
                }
            }
        }
        return "";
    }

}
