package com.stylefeng.guns.modular.system.model.enums;
|
|
/**
|
* 图片模型枚举类
|
* @author zhibing.pu
|
* @Date 2024/12/17 20:50
|
*/
|
public enum ImageModelEnum {
|
TOP_SEAL("顶盖密闭巡查", "TOP_SEAL"),
|
CAMERA_FAULT("摄像头图章巡查", "CAMERA_FAULT"),
|
CONSTRUCTION_WASTE_LOAD("建筑垃圾装载巡查", "CONSTRUCTION_WASTE_LOAD")
|
;
|
|
/**
|
* 模型名称
|
*/
|
private String name;
|
/**
|
* 模型编号
|
*/
|
private String code;
|
|
ImageModelEnum(String name, String code) {
|
this.name = name;
|
this.code = code;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public String getCode() {
|
return code;
|
}
|
|
public void setCode(String code) {
|
this.code = code;
|
}
|
|
|
/**
|
* 根据编号获取枚举对象
|
* @param code
|
* @return
|
*/
|
public static ImageModelEnum getImageModelEnum(String code){
|
ImageModelEnum[] values = ImageModelEnum.values();
|
for (ImageModelEnum modelEnum : values) {
|
if(modelEnum.getCode().equals(code)){
|
return modelEnum;
|
}
|
}
|
return null;
|
}
|
}
|