From e000f72f07330c94a4684b508ec86399c5083ae4 Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Mon, 24 Oct 2022 16:10:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E5=BA=93=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devcontrol/db/entity/CommandExt.java | 21 ++++++++++++++++--- .../project/devcontrol/db/entity/Device.java | 20 +++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/db/entity/CommandExt.java b/app/src/main/java/cc/niushuai/project/devcontrol/db/entity/CommandExt.java index 9300cd1..d43b542 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/db/entity/CommandExt.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/db/entity/CommandExt.java @@ -24,6 +24,12 @@ public class CommandExt { @Index private Long deviceId; + /** + * key 备用字段 + */ + @Index + private String key; + /** * 命令 */ @@ -44,11 +50,12 @@ public class CommandExt { */ private String createTime; - @Generated(hash = 101490941) - public CommandExt(Long id, Long deviceId, String command, Integer order, - String remark, String createTime) { + @Generated(hash = 704236641) + public CommandExt(Long id, Long deviceId, String key, String command, + Integer order, String remark, String createTime) { this.id = id; this.deviceId = deviceId; + this.key = key; this.command = command; this.order = order; this.remark = remark; @@ -107,4 +114,12 @@ public class CommandExt { this.remark = remark; } + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + } diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/db/entity/Device.java b/app/src/main/java/cc/niushuai/project/devcontrol/db/entity/Device.java index d78607a..a7b7a94 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/db/entity/Device.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/db/entity/Device.java @@ -59,6 +59,11 @@ public class Device implements Serializable { */ private String commandPath; + /** + * 查询状态参数 + */ + private String commandStatus; + /** * 开启参数 */ @@ -84,11 +89,11 @@ public class Device implements Serializable { */ private String createTime; - @Generated(hash = 2026639556) + @Generated(hash = 94069086) public Device(Long id, Integer order, String deviceName, String deviceType, String onOff, String description, Integer iconId, String commandPath, - String commandOpen, String commandClose, Integer isDeleted, - String remark, String createTime) { + String commandStatus, String commandOpen, String commandClose, + Integer isDeleted, String remark, String createTime) { this.id = id; this.order = order; this.deviceName = deviceName; @@ -97,6 +102,7 @@ public class Device implements Serializable { this.description = description; this.iconId = iconId; this.commandPath = commandPath; + this.commandStatus = commandStatus; this.commandOpen = commandOpen; this.commandClose = commandClose; this.isDeleted = isDeleted; @@ -211,4 +217,12 @@ public class Device implements Serializable { public void setCreateTime(String createTime) { this.createTime = createTime; } + + public String getCommandStatus() { + return this.commandStatus; + } + + public void setCommandStatus(String commandStatus) { + this.commandStatus = commandStatus; + } }