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

public enum LatentDangerReformTypeEnum {

    常规整改("常规整改", 1),
    安措计划("安措计划", 2),
    延期治理("延期治理", 3);

    /**
     * 名称，描述
     */
    private String name;
    /**
     * 编码
     */
    private Integer code;

    LatentDangerReformTypeEnum(String name, Integer code) {
        this.name = name;
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

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

    public static LatentDangerReformTypeEnum getByCode(Integer code) {
        for (LatentDangerReformTypeEnum l : LatentDangerReformTypeEnum.values()) {
            if (code.equals(l.getCode())) {
                return l;
            }
        }
        return null;
    }
}
