IotThing2DeviceModel.java 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package com.github.microservice.busInfoModel.thing;
  2. import com.github.microservice.busInfoModel.device.DeviceInfoModel;
  3. import com.github.microservice.busInfoModel.device.ProjectInfoModel;
  4. import com.github.microservice.models.baseParam.SuperModel;
  5. import com.github.microservice.types.deviceUse.DeviceType;
  6. import com.github.microservice.types.deviceUse.OnLineState;
  7. import io.swagger.v3.oas.annotations.media.Schema;
  8. import lombok.Data;
  9. /**
  10. * @author TRX
  11. * @date 2025/2/25
  12. */
  13. @Data
  14. public class IotThing2DeviceModel extends SuperModel {
  15. @Schema(description = "物模型id")
  16. private String iotThingId;
  17. @Schema(description = "设备id")
  18. private String deviceId;
  19. @Schema(description = "设备类型")
  20. private DeviceType deviceType;
  21. private String deviceTypeStr;
  22. public String getDeviceTypeStr() {
  23. if (deviceType != null) {
  24. return deviceType.getRemark();
  25. }
  26. return "";
  27. }
  28. @Schema(description = "设备名称")
  29. private String deviceName;
  30. @Schema(description = "关联设备信息")
  31. private DeviceInfoModel deviceInfo;
  32. @Schema(description = "所属项目")
  33. private ProjectInfoModel projectInfo;
  34. @Schema(description = "项目code")
  35. private String projectInfoCode;
  36. @Schema(description = "在线状态")
  37. private OnLineState onLineState;
  38. private String onLineStateStr;
  39. public String getOnLineStateStr() {
  40. if (onLineState != null) {
  41. return onLineState.getRemark();
  42. }
  43. return "";
  44. }
  45. }