package com.hzs.common.core.enums;

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

/**
 * @Description: 打印状态枚举
 * @Author: jiang chao
 * @Time: 2022/10/25 16:05
 * @Classname: EPrintStatus
 * @PackageName: com.hzs.common.core.enums
 */
@AllArgsConstructor
@Getter
public enum EPrintStatus {

    UN_PRINT(0, "未打印", EnumsPrefixConstants.E_PRINT_STATUS + "0"),

    PRINT(1, "已打印", EnumsPrefixConstants.E_PRINT_STATUS + "1"),

    ;

    /**
     * 实际值
     */
    private final int value;
    /**
     * 显示标签
     */
    private final String label;
    /**
     * 国际化翻译KEY值
     */
    private final String key;

    /**
     * 根据值，返回枚举
     *
     * @param value
     * @return
     */
    public static EPrintStatus getEnumByValue(int value) {
        if (PRINT.getValue() == value) {
            return PRINT;
        }
        return UN_PRINT;
    }

}
