package com.hzs.common.core.enums;

import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ECondition {

    GT(1, "大于", 0),

    GT_OR_EQ(2, "大于等于", 0),

    LT(3, "小于", 0),

    LT_OR_EQ(4, "小于等于", 0),

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

    public static ECondition getCondition(int value){
        for (ECondition condition : ECondition.values()) {
            if (condition.getValue() == value){
                return condition;
            }
        }
        return null;
    }

}
