package com.yeejoin.amos.maintenance.common.enums;

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

public enum CheckTypeEnum {
	ALL("checkType","all", "有上报就推送"),
	LEAK("checkType","leak", "漏检上报"),
	ERROR("checkType","error", "不合格上报"),
	NOT("checkType","not", "全部不推送");
	
	private String ower;
	private String code;
	private String message;
	
	private CheckTypeEnum(String ower, String code, String message) {
		this.ower = ower;
		this.code = code;
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

	public String getOwer() {
		return ower;
	}
	
	public static List<Map<String, Object>> getEnumList() {
		List<Map<String, Object>> list = new ArrayList<>();
		for(CheckTypeEnum e : CheckTypeEnum.values()) {
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("ower", e.getOwer());
			map.put("code", e.getCode());
			map.put("message", e.getMessage());
			list.add(map);
		}
		return list;
	}
}
