package com.yeejoin.amos.boot.biz.common.enums;

import lombok.AllArgsConstructor;

/**
 * @description:
 * @author: tw
 * @createDate: 2021/9/8
 */

@AllArgsConstructor
public enum HomePageEnum {

    DISPATCHALARM("dispatchAlarm", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"),
    DISPATCHTASK("dispatchTask", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchTaskServiceImpl"),
    FIREALARM("fireAlarm", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireAlarmServiceImpl"),
    FAULT("fault", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.FaultServiceImpl"),
    SHIELD("shield", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.ShieldServiceImpl"),
    WARNING("warning", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.WarningServiceImpl"),
    NO("no", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.NoServiceImpl"),
    YES("yes", "com.yeejoin.amos.boot.module.jcs.biz.service.impl.YesServiceImpl");






    private String code;//对应菜单组件名称
    private String url;//组件值对应实现类的包名

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }


    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public static HomePageEnum statOf(String code) {
            for (HomePageEnum state : values())
                if (state.getCode().equals(code))
                    return state;
            return null;
        }

}
