package com.qmth.jkserver.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 监考端资源包
 * @author tianjun
 *
 */
public enum SceneScore {

	YES("是", "1"), NO("否", "0");

    private String name;

    private String id;

    private SceneScore(String name, String id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public String getId() {
        return id;
    }
    
    public static List<Map<String, String>> toList() {
    	List<Map<String, String>> list = new ArrayList<Map<String, String>>();
    	  for (SceneScore theme : SceneScore.values()) {
    		  Map<String, String> map = new HashMap<String, String>();
    		  map.put(theme.name(), theme.getName());
          }
		return list;
    }

    public static SceneScore findById(String id) {
        for (SceneScore status : SceneScore.values()) {
            if (status.id == id) {
                return status;
            }
        }
        return null;
    }

}
