package com.diagbot.service.impl;

import com.diagbot.enums.StatusEnum;
import com.diagbot.enums.TokenTypeEnum;
import com.diagbot.service.EnumsDataService;
import com.diagbot.util.EnumEntriesBuilder;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Description: 枚举数据接口是实现类
 * @author: gaodm
 * @time: 2018/9/19 14:27
 */
@Service
public class EnumsDataServiceImpl implements EnumsDataService {
    /**
     * 用户枚举数据获取
     * @return 用户枚举类map
     */
    @Override
    public Map<String, List<EnumEntriesBuilder.Entry>> getEnumsData(){
        Map<String, List<EnumEntriesBuilder.Entry>> enumMap = new EnumEntriesBuilder()
                .addEnums("statusEnum", StatusEnum.values())
                .addEnums("tokenTypeEnum", TokenTypeEnum.values())
                .build();
        return enumMap;
    }
}
