package com.younike.system.enums;

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

/**
 * 店铺状态枚举类
 * @author Dail
 */
@AllArgsConstructor
@Getter
public enum ShopStateEnum {

    UNDER_REVIEW("001", "审核中"),
    AUDIT_SUCCESSFUL("002", "审核成功"),
    AUDIT_FAILED("003", "审核失败"),
    SHOP_REMOVAL("004", "店铺下架"),
    NOT_SUBMITTED("005", "未提交");


    private String code;

    private String desc;

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