xiatian 9 luni în urmă
părinte
comite
a90c5d79fb

+ 1 - 14
install/mysql/init/scan_central_db.sql

@@ -195,6 +195,7 @@ CREATE TABLE IF NOT EXISTS `sc_package_task`
 CREATE TABLE IF NOT EXISTS `sc_scanner`
 (
     `device`          varchar(64) NOT NULL,
+    `device_name` varchar(200) NOT NULL,
     `last_login_time` bigint      NOT NULL,
     `create_time`     bigint DEFAULT NULL,
     `update_time`     bigint DEFAULT NULL,
@@ -539,17 +540,3 @@ CREATE TABLE IF NOT EXISTS `sc_assigned_check_history`
     KEY `student` (`student_id`)
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4;
-
-CREATE TABLE IF NOT EXISTS `sc_device`
-(
-    `id`          int(11)     NOT NULL AUTO_INCREMENT,
-    `device`      varchar(64) NOT NULL,
-    `device_name` varchar(64) NOT NULL,
-    `creator_id`  bigint DEFAULT NULL,
-    `updater_id`  bigint DEFAULT NULL,
-    `create_time` bigint DEFAULT NULL,
-    `update_time` bigint DEFAULT NULL,
-    PRIMARY KEY (`id`),
-    UNIQUE KEY `login_name` (`login_name`)
-) ENGINE = InnoDB
-  DEFAULT CHARSET = utf8mb4;

+ 0 - 35
src/main/java/cn/com/qmth/scancentral/entity/DeviceEntity.java

@@ -1,35 +0,0 @@
-package cn.com.qmth.scancentral.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import cn.com.qmth.scancentral.entity.base.AuditingEntity;
-
-// 设备
-@TableName("sc_device")
-public class DeviceEntity extends AuditingEntity {
-
-    /**
-     * 
-     */
-    private static final long serialVersionUID = -4846284398208292028L;
-
-    private String device;
-
-    private String deviceName;
-
-    public String getDevice() {
-        return device;
-    }
-
-    public void setDevice(String device) {
-        this.device = device;
-    }
-
-    public String getDeviceName() {
-        return deviceName;
-    }
-
-    public void setDeviceName(String deviceName) {
-        this.deviceName = deviceName;
-    }
-}

+ 10 - 0
src/main/java/cn/com/qmth/scancentral/entity/ScannerEntity.java

@@ -17,6 +17,8 @@ public class ScannerEntity extends BaseEntity {
     @TableId(type = IdType.INPUT)
     private String device;
 
+    private String deviceName;
+
     private Long lastLoginTime;
 
     public String getDevice() {
@@ -35,4 +37,12 @@ public class ScannerEntity extends BaseEntity {
         this.lastLoginTime = lastLoginTime;
     }
 
+    public String getDeviceName() {
+        return deviceName;
+    }
+
+    public void setDeviceName(String deviceName) {
+        this.deviceName = deviceName;
+    }
+
 }