package com.ltgk.common.enums;

/**
 * @Author: w1826
 * @Description: 抽检是不是包含黑白名单
 * @Date: 2025/1/23 9:29
 * @Version: 1.0
 */
public enum FishCheckType {
    // 是不是排除黑白名单  0都不排除 1排除黑名单 2排除白名单 3都排除
    NO_EXCLUDE(0, "不排除"),
    EXCLUDE_BLACK(1, "排除黑名单"),
    EXCLUDE_WHITE(2, "排除白名单"),
    EXCLUDE_ALL(3, "排除黑白名单");
    private final Integer code;
    private final String message;

    FishCheckType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static FishCheckType getFishCheckType(Integer code) {
        for (FishCheckType fishCheckType : FishCheckType.values()) {
            if (fishCheckType.getCode().equals(code)) {
                return fishCheckType;
            }
        }
        return null;
    }
}
