package com.cool.store.enums;

import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * @author zhangchenbiao
 * @FileName: UserRoleEnum
 * @Description: 用户职位
 * @date 2024-03-22 16:37
 */
public enum UserRoleEnum {
    INVESTMENT_COMMISSIONER(100000000L, "招商专员"),
    SELECT_SITE_COMMISSIONER(110000000L, "选址专员"),
    REGION_MANAGER(120000000L, "大区执行总经理"),
    THEATER_MANAGER(130000000L, "战区经理"),
    OPERATIONS_MANAGER(140000000L, "营运经理"),
    TRAINER(150000000L, "训练"),
    XFSG_CLERK(160000000L, "店员"),
    XFSG_SHOPOWNER(170000000L, "店长"),
    SUPERVISION(180000000L, "督导"),
    SELECT_SITE_LEADER(190000000L, "选址组长"),
    SELECT_SITE_MANAGER(200000000L, "选址经理"),
    INVESTMENT_MANAGER(210000000L, "招商经理"),
    HEADQUARTERS_LEADER(220000000L, "总部负责人"),
    HR(230000000L, "HR"),
    DESIGN_MANAGER(240000000L, "品牌设计高级经理"),
    ENGINEER_DEP_SUPERVISOR(250000000L, "工程部监理"),
    ENGINEER_DEP_MANAGER(260000000L, "工程部高级经理"),
    STRONG_INVESTMENT_COMMISSIONER(270000000L, "强加盟招商专员"),
    HUO_MA_EMPLOYEE(280000000L,"火码"),
    IT_EMPLOYEE(290000000L,"IT"),
    DOU_YIN_CUSTOMER(300000000L,"抖音客服"),
    MEI_TUAN_OPERATIONS_CUSTOMER(310000000L,"美团运营大区客服"),
    MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER(320000000L,"美团总部建店客服"),
    E_L_ME_TUAN_OPERATIONS_CUSTOMER(330000000L,"饿了么运营大区客服"),
    E_L_ME_HEADQUARTERS_BUILD_CUSTOMER(340000000L,"饿了么总部建店客服"),
    MEI_TUAN_BUY_CUSTOMER(350000000L,"美团团购客服"),
    KUAI_SHOU_CUSTOMER(360000000L,"快手客服"),
    XIN_FA_SYS_CUSTOMER(370000000L,"信发系统客服"),
    TENT_PASS_CUSTOMER(380000000L,"营帐通客服"),
    DESIGN_CUSTOMER(390000000L,"设计客服"),
    CONSTRUCTION_CUSTOMER(400000000L,"施工客服"),
    ;

    private Long code;
    private String desc;

    protected static final Map<String, UserRoleEnum> map = Arrays.stream(values()).collect(
            Collectors.toMap(UserRoleEnum::getDesc, Function.identity()));

    UserRoleEnum(Long code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Long getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static UserRoleEnum getByDesc(String desc) {
        return map.get(desc);
    }
}
