package com.diagbot.service.impl;

import com.diagbot.enums.DisclaimerCodeEnum;
import com.diagbot.enums.IntroducePositionEnum;
import com.diagbot.enums.ModuleTypeEnum;
import com.diagbot.enums.QuestionTypeEnum;
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("questionTypeEnum", QuestionTypeEnum.values())
                .addEnums("introducePositionEnum", IntroducePositionEnum.values())
                .addEnums("disclaimerCodeEnum", DisclaimerCodeEnum.values())
                .addEnums("moduleTypeEnum", ModuleTypeEnum.values())
                .build();
        return enumMap;
    }
}
