package com.hzs.common.core.enums;/**
 * @Description:
 * @Author: yuhui
 * @Time: 2023/4/21 11:56
 * @Classname: ECondition
 * @PackageName: com.hzs.common.core.enums
 */

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

/**
 *@BelongsProject: hzs_cloud
 *@BelongsPackage: com.hzs.common.core.enums
 *@Author: yh
 *@CreateTime: 2023-04-21  11:56
 *@Description: TODO
 *@Version: 1.0
 */
@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;
    }

}
