package com.hzs.common.core.enums;

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

/**
 * @Description: 签呈来源
 * @Author: jiang chao
 * @Time: 2023/4/10 14:09
 * @Classname: EApprovalSource
 * @PackageName: com.hzs.common.core.enums
 */
@AllArgsConstructor
@Getter
public enum ESignSource {

    /**
     * 后台
     */
    MANAGE(1, "后台", EnumsPrefixConstants.SIGN_SOURCE + "1"),

    /**
     * 前台
     */
    MEMBER(2, "前台", EnumsPrefixConstants.SIGN_SOURCE + "2"),

    /**
     * 奖金
     */
    BONUS(3, "奖金", EnumsPrefixConstants.SIGN_SOURCE + "3"),

    ;

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

    public static ESignSource getSignSource(int value) {
        for (ESignSource signSource : ESignSource.values()) {
            if (signSource.getValue() == value) {
                return signSource;
            }
        }
        return null;
    }
}
