package com.hzs.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 证件状态
 *
 * @author hzs
 */
@AllArgsConstructor
@Getter
public enum ECertificateStatus {

    /**
     * 待提交
     */
    WAIT_SUBMIT(1, "待提交"),

    /**
     * 已齐全
     */
    COMPLETE(2, "已齐全"),

    ;

    /**
     * 实际值
     */
    private final int value;
    /**
     * 显示标签
     */
    private final String label;

    /**
     * 根据枚举值获取枚举
     *
     * @param value 枚举值
     * @return
     */
    public static ECertificateStatus getEnumByValue(int value) {
        for (ECertificateStatus eApproveStatus : ECertificateStatus.values()) {
            if (eApproveStatus.getValue() == value) {
                return eApproveStatus;
            }
        }
        return WAIT_SUBMIT;
    }

}
