mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-15 19:45:06 +08:00
修改:IOT 物模型接口优化
This commit is contained in:
@ -17,4 +17,5 @@ public interface ErrorCodeConstants {
|
||||
// ========== IoT 产品物模型 1-050-002-000 ============
|
||||
ErrorCode THINK_MODEL_FUNCTION_NOT_EXISTS = new ErrorCode(1_050_002_000, "产品物模型不存在");
|
||||
ErrorCode THINK_MODEL_FUNCTION_EXISTS_BY_PRODUCT_KEY = new ErrorCode(1_050_002_001, "ProductKey 对应的产品物模型已存在");
|
||||
ErrorCode THINK_MODEL_FUNCTION_EXISTS_BY_IDENTIFIER = new ErrorCode(1_050_002_002, "产品物模型标识已存在");
|
||||
}
|
||||
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.iot.enums.product;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* IOT 物模型功能类型枚举类
|
||||
*
|
||||
* @author ahh
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum IotThingModelTypeEnum implements IntArrayValuable {
|
||||
|
||||
/**
|
||||
* 属性
|
||||
*/
|
||||
PROPERTY(1, "属性"),
|
||||
/**
|
||||
* 服务
|
||||
*/
|
||||
SERVICE(2, "服务"),
|
||||
/**
|
||||
* 事件
|
||||
*/
|
||||
EVENT(3, "事件");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotThingModelTypeEnum::getType).toArray();
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private final Integer type;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private final String description;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user