package com.hzs.common.core.enums;

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

/**
 * @Description:  活动状态
 * @Author: yuhui
 * @Time: 2023/4/20 15:20
 * @Classname: EActivityStatus
 * @PackageName: com.hzs.common.core.enums
 */
@AllArgsConstructor
@Getter
public enum EActivityStatus {

    /**
     *未开始
     */
    NOT_STARTED(0, "即将开始", 0, EnumsPrefixConstants.ACTIVITY_STATUS + "0"),

    /**
     *进行中
     */
    IN_PROGRESS(1, "进行中", 0, EnumsPrefixConstants.ACTIVITY_STATUS + "1"),

    /**
     *已失效
     */
    EXPIRED(2, "已结束", 0, EnumsPrefixConstants.ACTIVITY_STATUS + "2");


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


    public static EActivityStatus getEActivityStatus(Integer value){
        for (EActivityStatus as : EActivityStatus.values()) {
            if (as.value == value){
                return as;
            }
        }
        return null;
    }
}
