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

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum TaskDistMethod {

    AUTO("A","自动分配"),
    MANUAL("M","手工分配");

    private final String value;
    private final String name;

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