package com.zcloud.basic.info.domain.enums;

import lombok.Getter;

/**
 * 工作类型，1:隐患信息
 */
@Getter
public enum UserJobHandoverWorkTypeEnum {
    /**
     * 工作类型，1:隐患信息
     */
     HIDDENINFO(1,"隐患信息"),
     RISK(2,"风险辨识检查"),


;
    private final Integer code;
    private final String name;

    UserJobHandoverWorkTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }
    //根据code获取枚举
    public static UserJobHandoverWorkTypeEnum getByCode(Integer code) {
        for (UserJobHandoverWorkTypeEnum e : values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}
