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

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum WorkRank {

    MORNING_SHIFT("MS","早班"),
    NIGHT_SHIFT("NS","晚班"),
    OTHER_SHIFT("OS","其它班次");

    private final String value;
    private final String name;

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