package com.brilliance.isc.common.taskdistributor.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum OverFlowMode {
    BYGROUP("BYGRP","按组别"),
    NOGROUP("NOGRP","无组别"),
    OFF("OFF","关闭");

    private final String value;
    private final String name;

    public static String getValueName(String code) {
        for (OverFlowMode value : OverFlowMode.values()) {
            if (value.value.equals(code)) {
                return value.name;
            }
        }
        return null;
    }
}
