| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- package com.github.microservice.busInfoModel.device;
- import cn.hutool.json.JSONObject;
- import com.github.microservice.models.baseParam.SuperModel;
- import com.github.microservice.types.deviceUse.*;
- import io.swagger.v3.oas.annotations.media.Schema;
- import lombok.Data;
- import org.apache.commons.lang3.ObjectUtils;
- /**
- * @author TRX
- * @date 2024/5/16
- */
- @Data
- public class DeviceInfoModel extends SuperModel {
- @Schema(description = "设备ID")
- private String deviceId;
- @Schema(description = "设备名称")
- private String deviceName;
- @Schema(description = "产品code")
- private String productCode;
- @Schema(description = "产品名称")
- private String productName;
- @Schema(description = "产品信息")
- private IotTemplateSimpleModel iotTemplate;
- @Schema(description = "在线状态")
- private OnLineState onLineState;
- private String onLineStateStr;
- public String getOnLineStateStr() {
- if (onLineState != null) {
- return onLineState.getRemark();
- }
- return "";
- }
- @Schema(description = "设备型号")
- private DeviceSpecType specType;
- private String deviceModelStr;
- public String getDeviceModelStr() {
- if (specType != null) {
- return specType.getRemark();
- }
- return "";
- }
- @Schema(description = "设备类型:消费机 闸机")
- private DeviceType deviceType;
- private String deviceTypeStr;
- public String getDeviceTypeStr() {
- if (deviceType != null) {
- return deviceType.getRemark();
- }
- return "";
- }
- @Schema(description = "区分是网关、设备")
- private DeviceCategory deviceCategory;
- private String deviceCategoryStr;
- public String getDeviceCategoryStr() {
- if (deviceCategory != null) {
- return deviceCategory.getRemark();
- }
- return "";
- }
- @Schema(description = "数据状态")
- private DeviceState state;
- public DeviceState getState() {
- if (state != null) {
- return state;
- }
- return DeviceState.Enable;
- }
- private String stateStr;
- public String getStateStr() {
- if (state != null) {
- return state.getRemark();
- }
- return "";
- }
- @Schema(description = "mqtt账号名称")
- private String mqttUserName;
- @Schema(description = "账号密码")
- private String mqttPassword;
- @Schema(description = "ip地址")
- private String ip;
- @Schema(description = "激活时间")
- private Long activityTime;
- @Schema(description = "最后上线时间")
- private Long lastOnlineTime;
- @Schema(description = "所属分组")
- private ProjectInfoSimpleModel projectInfo;
- @Schema(description = "分组code")
- private String projectInfoCode;
- @Schema(description = "分组名称")
- private String projectInfoName;
- public String getProjectInfoName() {
- if (ObjectUtils.isNotEmpty(projectInfo)) {
- return projectInfo.getName();
- }
- return "";
- }
- @Schema(description = "固件版本")
- private String firmwareVersion;
- @Schema(description = "连接参数")
- private JSONObject connectParam;
- @Schema(description = "最后离线时间")
- private Long lastOffLineTime;
- @Schema(description = "设备本地日志上报")
- private Boolean isReportLogs = Boolean.TRUE;
- }
|