package com.github.microservice.busInfoModel.thing; import com.github.microservice.busInfoModel.device.DeviceInfoModel; import com.github.microservice.busInfoModel.device.ProjectInfoModel; import com.github.microservice.models.baseParam.SuperModel; import com.github.microservice.types.deviceUse.DeviceType; import com.github.microservice.types.deviceUse.OnLineState; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; /** * @author TRX * @date 2025/2/25 */ @Data public class IotThing2DeviceModel extends SuperModel { @Schema(description = "物模型id") private String iotThingId; @Schema(description = "设备id") private String deviceId; @Schema(description = "设备类型") private DeviceType deviceType; private String deviceTypeStr; public String getDeviceTypeStr() { if (deviceType != null) { return deviceType.getRemark(); } return ""; } @Schema(description = "设备名称") private String deviceName; @Schema(description = "关联设备信息") private DeviceInfoModel deviceInfo; @Schema(description = "所属项目") private ProjectInfoModel projectInfo; @Schema(description = "项目code") private String projectInfoCode; @Schema(description = "在线状态") private OnLineState onLineState; private String onLineStateStr; public String getOnLineStateStr() { if (onLineState != null) { return onLineState.getRemark(); } return ""; } }