package com.gic.haoban.manage.api.enums.role;


/**
 * 好办小程序角色
 *
 * @author mozhu
 * @date 2022-09-14 10:51:26
 */
public enum RoleClerkTypeEnum {

    //0:导购；1:店长；2:区经
    CLERK(0, "导购"),
    SHOP(1, "店长"),
    MANAGE(2, "区经");

    private Integer code;
    private String desc;

    RoleClerkTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getNameByCode(int code) {
        RoleClerkTypeEnum[] values = RoleClerkTypeEnum.values();
        for (RoleClerkTypeEnum roleClerkTypeEnum : values) {
            if (roleClerkTypeEnum.getCode() == code) {
                return roleClerkTypeEnum.getDesc();
            }
        }
        return null;
    }
}
