package com.younike.system.enums;

import com.younike.common.utils.StringUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 家政等级枚举类
 */
@AllArgsConstructor
@Getter
public enum ServerLevelEnum {

    PRIMARY_HOUSEKEEPING("001", "初级家政"),
    MEDIUM_HOUSEKEEPING("002", "中级家政"),
    SENIOR_HOUSEKEEPING("003", "高级家政"),
    GOLD_MEDAL_HOUSEKEEPING("004", "金牌家政");

    private String code;

    private String desc;

    public static String getDescription(String code) {
        for(ServerLevelEnum item : ServerLevelEnum.values()){
            if(item.getCode().equals(code)){
                return item.getDesc();
            }
        }
        return StringUtils.EMPTY;
    }
}
