-- --------------------------------------------------------
-- 主機:                           192.168.0.86
-- 服務器版本:                        10.0.28-MariaDB-0+deb8u1 - (Debian)
-- 服務器操作系統:                      debian-linux-gnueabihf
-- HeidiSQL 版本:                  9.1.0.4867
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

-- 導出 cms_mini 的資料庫結構
DROP DATABASE IF EXISTS `cms_mini`;
CREATE DATABASE IF NOT EXISTS `cms_mini` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `cms_mini`;


-- 導出  表 cms_mini.card_log 結構
CREATE TABLE IF NOT EXISTS `card_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '識別碼',
  `CardNo` varchar(45) NOT NULL COMMENT '卡號',
  `ReaderID` varchar(45) NOT NULL COMMENT '讀卡機設備碼',
  `ActionDateTime` datetime NOT NULL COMMENT '刷卡日期時間',
  `ActionDateTimeMSecond` int(11) NOT NULL COMMENT '刷卡時間毫秒',
  `Action` char(1) NOT NULL COMMENT '動作。Accept、Reject、Log',
  `LogDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '記錄時間',
  `UserName` varchar(45) NOT NULL DEFAULT '' COMMENT '持卡人',
  `CardType` int(11) NOT NULL DEFAULT '0' COMMENT '卡片類型。1=管理員卡、2=巡邏卡、3=工作卡、4=訪客卡、5=住戶卡',
  `MarkType` int(11) NOT NULL DEFAULT '0' COMMENT '標示類型。0=正常、1=黑名單、2=警示名單',
  PRIMARY KEY (`Ident`),
  UNIQUE KEY `Ukey` (`CardNo`,`ActionDateTime`,`ActionDateTimeMSecond`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='刷卡記錄-此Table為參考結構。實際記錄的Table會加上年份';

-- 正在導出表  cms_mini.card_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `card_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `card_log` ENABLE KEYS */;


-- 導出  表 cms_mini.card_management 結構
CREATE TABLE IF NOT EXISTS `card_management` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '識別碼',
  `CardNo` varchar(45) NOT NULL COMMENT '卡號',
  `CardType` int(11) NOT NULL COMMENT '卡片類型。1=管理員卡、2=巡邏卡、3=工作卡、4=訪客卡、5=住戶卡',
  `CardUse` varchar(45) NOT NULL COMMENT '卡片用途',
  `UserType` int(11) NOT NULL COMMENT '人員類別。1=自行新增、2=與管理員關連',
  `UserName` varchar(45) NOT NULL COMMENT '持卡人',
  `UserRelation` int(11) NOT NULL DEFAULT '0' COMMENT 'Only For  UserType=2。與管理員Ident的關聯',
  `WriteInfo` varchar(255) NOT NULL DEFAULT '' COMMENT '寫入卡片資料',
  `TimeCardType` int(11) NOT NULL DEFAULT '1' COMMENT '限時卡設定用。1=指定日期時間、2=週期時間',
  `CycleOption` varchar(45) DEFAULT NULL COMMENT 'Only For TimeCardType=2。週期選項。',
  `TimeCardDateBegin` date DEFAULT NULL COMMENT 'Only For TimeCardType=1。起始日期',
  `TimeCardTimeBegin` time DEFAULT NULL COMMENT '起始時間',
  `TimeCardDateEnd` date DEFAULT NULL COMMENT 'Only For TimeCardType=2。結束日期',
  `TimeCardTimeEnd` time DEFAULT NULL COMMENT '結束時間',
  `Note` varchar(45) NOT NULL DEFAULT '' COMMENT '備註',
  `MakerIdent` int(11) NOT NULL COMMENT '發卡人Ident',
  `MakerName` varchar(45) NOT NULL COMMENT '發卡人',
  `MakeDateTime` datetime NOT NULL COMMENT '發卡日期',
  `MakerIP` varchar(45) NOT NULL COMMENT '發卡人IP',
  `ReturnCheckerIdent` int(11) NOT NULL DEFAULT '0' COMMENT '卡片繳回收卡人Ident',
  `ReturnCheckerName` varchar(45) NOT NULL DEFAULT '' COMMENT '卡片繳回收卡人',
  `ReturnDateTime` datetime DEFAULT NULL COMMENT '卡片繳回收卡日期',
  `ReturnCheckerIP` varchar(45) NOT NULL DEFAULT '' COMMENT '卡片繳回收卡人IP',
  `ReturnMemo` varchar(45) NOT NULL DEFAULT '' COMMENT '卡片繳回說明',
  `ReturnFlag` int(11) NOT NULL DEFAULT '0' COMMENT '卡片繳回註記。1=正常繳回、2=卡片失效、3=卡片遺失、4=其他',
  `UserPhotoPath` varchar(255) NOT NULL DEFAULT '' COMMENT '持卡人照片路徑',
  `UserMemo` varchar(255) NOT NULL DEFAULT '' COMMENT '持卡人備註',
  `UserCount` int(11) NOT NULL DEFAULT '1' COMMENT 'Only For CardType=4。訪客人數',
  `AllowArea` int(11) NOT NULL DEFAULT '1' COMMENT '允許進出區域。1=指定區域、2=全部區域',
  `AreaList` varchar(45) NOT NULL DEFAULT '' COMMENT 'Only For AllowArea=1。指定區域項目',
  `HouseID` varchar(10) NOT NULL DEFAULT '' COMMENT 'Only For CardType=3,4,5。住戶編碼。#表萬用字元',
  `HouseIDSerial` int(11) NOT NULL DEFAULT '1' COMMENT 'Only For CardType=5。住戶卡序號',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='卡片資料管理';

-- 正在導出表  cms_mini.card_management 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `card_management` DISABLE KEYS */;
/*!40000 ALTER TABLE `card_management` ENABLE KEYS */;


-- 導出  表 cms_mini.card_schedule_log 結構
CREATE TABLE IF NOT EXISTS `card_schedule_log` (
  `Action` int(11) NOT NULL,
  `ClientIP` varchar(45) NOT NULL,
  `Content` varchar(255) NOT NULL,
  `LogDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.card_schedule_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `card_schedule_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `card_schedule_log` ENABLE KEYS */;


-- 導出  表 cms_mini.card_send_black_log 結構
CREATE TABLE IF NOT EXISTS `card_send_black_log` (
  `ReaderID` varchar(45) NOT NULL COMMENT '讀卡機設備碼',
  `FinishDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '傳送完成時間'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='傳送黑名單記錄';

-- 正在導出表  cms_mini.card_send_black_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `card_send_black_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `card_send_black_log` ENABLE KEYS */;


-- 導出  表 cms_mini.card_setting 結構
CREATE TABLE IF NOT EXISTS `card_setting` (
  `Name` varchar(45) NOT NULL COMMENT '屬性名稱',
  `Value` varchar(45) NOT NULL COMMENT '屬性值',
  `EditorId` varchar(45) NOT NULL COMMENT '編輯人Ident',
  `EditorName` varchar(45) NOT NULL COMMENT '編輯人',
  `EditDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '編輯日期'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='刷卡系統設定';

-- 正在導出表  cms_mini.card_setting 的資料：~5 rows (大約)
/*!40000 ALTER TABLE `card_setting` DISABLE KEYS */;
INSERT INTO `card_setting` (`Name`, `Value`, `EditorId`, `EditorName`, `EditDateTime`) VALUES
	('WhereCardReader', '1', 'sysadm', 'sysadm', '2015-09-23 16:50:17'),
	('GetCardLogInterval', '3600', 'sysadm', 'sysadm', '2014-11-27 15:36:52'),
	('SendSpecialListInterval', '1800', 'sysadm', 'sysadm', '2014-11-27 15:36:52'),
	('SendCardKeyInterval', '12:00', 'sysadm', 'sysadm', '2014-11-27 15:36:53'),
	('CardKey', 'LI1Ay+TaTI+vHAr9R912DA==', 'sysadm', 'sysadm', '2015-07-07 17:32:36');
/*!40000 ALTER TABLE `card_setting` ENABLE KEYS */;


-- 導出  表 cms_mini.card_special_list 結構
CREATE TABLE IF NOT EXISTS `card_special_list` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '識別碼',
  `CardIdent` int(11) NOT NULL COMMENT '卡片識別碼',
  `CardNo` varchar(45) NOT NULL COMMENT '卡號',
  `MarkType` int(11) NOT NULL COMMENT '標示類型。1=黑名單、2=警示名單',
  `Reason` varchar(255) NOT NULL COMMENT '標示原因',
  `CreatorIdent` varchar(45) NOT NULL COMMENT '建立者Ident',
  `CreatorName` varchar(45) NOT NULL COMMENT '建立者',
  `CreateDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
  `Enable` int(11) NOT NULL DEFAULT '1' COMMENT '啟用否',
  `EditorIdent` varchar(45) NOT NULL DEFAULT '' COMMENT '編輯者Ident',
  `EditorName` varchar(45) NOT NULL DEFAULT '' COMMENT '編輯者',
  `EditDateTime` datetime DEFAULT NULL COMMENT '編輯日期',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='門禁系統特殊名單';

-- 正在導出表  cms_mini.card_special_list 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `card_special_list` DISABLE KEYS */;
/*!40000 ALTER TABLE `card_special_list` ENABLE KEYS */;


-- 導出  表 cms_mini.ehome_device 結構
CREATE TABLE IF NOT EXISTS `ehome_device` (
  `HouseID` varchar(10) NOT NULL,
  `DeviceID` varchar(20) NOT NULL,
  `DeviceHAID` varchar(20) NOT NULL,
  `DeviceType` varchar(20) NOT NULL,
  `Name` varchar(30) NOT NULL DEFAULT '',
  `CurrentStatus1` varchar(10) NOT NULL DEFAULT '',
  `CurrentStatus2` varchar(10) NOT NULL DEFAULT '',
  `CurrentStatus3` varchar(10) NOT NULL DEFAULT '',
  `Online` int(11) NOT NULL DEFAULT '0',
  `GatewayType` int(11) NOT NULL COMMENT '1=Feibit',
  PRIMARY KEY (`HouseID`,`DeviceID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.ehome_device 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `ehome_device` DISABLE KEYS */;
/*!40000 ALTER TABLE `ehome_device` ENABLE KEYS */;


-- 導出  表 cms_mini.ehome_gateway 結構
CREATE TABLE IF NOT EXISTS `ehome_gateway` (
  `HouseID` varchar(10) NOT NULL,
  `IP` varchar(20) NOT NULL,
  `SNID` varchar(20) NOT NULL DEFAULT '',
  `GatewayType` int(11) NOT NULL COMMENT '1=Feibit',
  PRIMARY KEY (`HouseID`,`IP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.ehome_gateway 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `ehome_gateway` DISABLE KEYS */;
/*!40000 ALTER TABLE `ehome_gateway` ENABLE KEYS */;


-- 導出  表 cms_mini.ehome_scene 結構
CREATE TABLE IF NOT EXISTS `ehome_scene` (
  `Ident` int(11) NOT NULL,
  `HouseID` varchar(10) NOT NULL,
  `Name` varchar(50) NOT NULL,
  `Sort` int(11) NOT NULL,
  PRIMARY KEY (`Ident`,`HouseID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.ehome_scene 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `ehome_scene` DISABLE KEYS */;
/*!40000 ALTER TABLE `ehome_scene` ENABLE KEYS */;


-- 導出  表 cms_mini.ehome_scene_device 結構
CREATE TABLE IF NOT EXISTS `ehome_scene_device` (
  `SceneIdent` int(11) NOT NULL,
  `DeviceId` varchar(20) NOT NULL,
  `DeviceType` varchar(20) NOT NULL,
  `SettingStatus1` varchar(10) NOT NULL DEFAULT '',
  `SettingStatus2` varchar(10) NOT NULL DEFAULT '',
  `SettingStatus3` varchar(10) NOT NULL DEFAULT '',
  `Online` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SceneIdent`,`DeviceId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.ehome_scene_device 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `ehome_scene_device` DISABLE KEYS */;
/*!40000 ALTER TABLE `ehome_scene_device` ENABLE KEYS */;


-- 導出  過程 cms_mini.GetAllChildIdent 結構
DELIMITER //
CREATE DEFINER=`root`@`%` PROCEDURE `GetAllChildIdent`(IN `tableName` VARCHAR(50), IN `identColName` VARCHAR(20), IN `parentIdentColName` VARCHAR(20), IN `parentIdent` Int)
    COMMENT '取得所有子項目(包含自己)'
BEGIN
	SET @pTemp = '';  
    SET @cTemp =cast(parentIdent as CHAR); 
      
    WHILE @cTemp is not null DO  
		If @pTemp<>'' Then 
			 SET @pTemp = concat(@pTemp,','); 
		END IF;
		SET @pTemp = concat(@pTemp,@cTemp); 
        SET @sqlString=CONCAT('SELECT group_concat(',identColName,') INTO @cTemp FROM ',tableName,' WHERE FIND_IN_SET(',parentIdentColName,',@cTemp)>0'); 
		PREPARE stmt FROM @sqlString;
		EXECUTE stmt;
	END WHILE;  
	Select @pTemp;  
END//
DELIMITER ;


-- 導出  函數 cms_mini.GetAncestry 結構
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `GetAncestry`(`GivenID` INT, `GivenName` VARCHAR(50)) RETURNS text CHARSET utf8
    DETERMINISTIC
    COMMENT '不含Root'
BEGIN
    DECLARE rv TEXT;
    DECLARE cm CHAR(1);
    DECLARE ch INT;
    DECLARE n VARCHAR(255);
    DECLARE ll INT;
     DECLARE cnt INT;

    SET rv = '';
    SET cm = '';
    SET ch = GivenID;
    SET ll = 1;
    SELECT Count(*) INTO cnt FROM system_building_tree WHERE Ident = ch;
    WHILE cnt>0 And ll > 0 DO
        SELECT IFNULL(ParentIdent,-1),Level,Name INTO ch,ll,n FROM
        (SELECT ParentIdent,Level,Name FROM system_building_tree WHERE Ident = ch) A ;
        IF ll > 0 THEN
            SET rv = CONCAT(n,cm,rv);
            SET cm = ',';
        END IF;
    END WHILE;
    
    IF rv="" OR rv=GivenName THEN
    	RETURN GivenName;
    ELSE
      RETURN rv;
    	
    END IF;

END//
DELIMITER ;


-- 導出  函數 cms_mini.GetAncestryIdent 結構
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `GetAncestryIdent`(`GivenID` INT) RETURNS text CHARSET utf8
    DETERMINISTIC
    COMMENT '含Root'
BEGIN
    DECLARE rv TEXT;
    DECLARE cm CHAR(1);
    DECLARE ch INT;
    DECLARE n VARCHAR(255);
    DECLARE ll INT;
     DECLARE cnt INT;

    SET rv = '';
    SET cm = '';
    SET ch = GivenID;
    SET ll = 1;
    SELECT Count(*) INTO cnt FROM system_building_tree WHERE Ident = ch;
    WHILE cnt>0 And ll > 0 DO
        SELECT IFNULL(ParentIdent,-1),Level,Ident INTO ch,ll,n FROM
        (SELECT ParentIdent,Level,Ident FROM system_building_tree WHERE Ident = ch) A ;
        IF ll >= 0 THEN
            SET rv = CONCAT(n,cm,rv);
            SET cm = ',';
        END IF;
    END WHILE;
    
RETURN rv;

END//
DELIMITER ;


-- 導出  函數 cms_mini.GetAncestryIdent4JSON 結構
DELIMITER //
CREATE DEFINER=`root`@`%` FUNCTION `GetAncestryIdent4JSON`(`GivenID` VARCHAR(50)) RETURNS text CHARSET utf8
BEGIN
DECLARE rv TEXT;
    DECLARE cm CHAR(1);
    DECLARE ch VARCHAR(255);
    DECLARE n VARCHAR(255);
     DECLARE n_name VARCHAR(255);
     DECLARE cnt INT;

    SET rv = '';
    SET cm = '';
    SET ch = GivenID;

	SELECT Count(*) INTO cnt FROM system_device_json WHERE Ident = ch;
    WHILE cnt>0 And ch !="-1" DO
        SELECT ParentIdent,Ident,Name INTO ch,n,n_name FROM
        (SELECT ParentIdent,Ident,Name FROM system_device_json WHERE Ident = ch) A ;
            SET rv = CONCAT( CONCAT(n,'@',n_name),cm,rv);
            SET cm = ',';
    END WHILE;
    
RETURN rv;
END//
DELIMITER ;


-- 導出  函數 cms_mini.GetAncestryIdent4JSON_IOT 結構
DELIMITER //
CREATE DEFINER=`root`@`%` FUNCTION `GetAncestryIdent4JSON_IOT`(`GivenID` VARCHAR(50)) RETURNS text CHARSET utf8
BEGIN
DECLARE rv TEXT;
    DECLARE cm CHAR(1);
    DECLARE ch VARCHAR(255);
    DECLARE n VARCHAR(255);
     DECLARE n_name VARCHAR(255);
     DECLARE cnt INT;

    SET rv = '';
    SET cm = '';
    SET ch = GivenID;

	SELECT Count(*) INTO cnt FROM iot_system_device_json WHERE Ident = ch;
    WHILE cnt>0 And ch !="-1" DO
        SELECT ParentIdent,Ident,Name INTO ch,n,n_name FROM
        (SELECT ParentIdent,Ident,Name FROM iot_system_device_json WHERE Ident = ch) A ;
            SET rv = CONCAT( CONCAT(n,'@',n_name),cm,rv);
            SET cm = ',';
    END WHILE;
    
RETURN rv;
END//
DELIMITER ;


-- 導出  表 cms_mini.iot_device_files 結構
CREATE TABLE IF NOT EXISTS `iot_device_files` (
  `filename` varchar(260) NOT NULL,
  `content` mediumtext NOT NULL,
  PRIMARY KEY (`filename`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iot_device_files 的資料：5 rows
/*!40000 ALTER TABLE `iot_device_files` DISABLE KEYS */;
INSERT INTO `iot_device_files` (`filename`, `content`) VALUES
	('/var/iot/iotm_dat/proft_0.json', '﻿{"sys":{"sys_proft":"1048607051","last_update":"2019.05.10 15:00:55"}}'),
	('/var/iot/iotm_dat/Lumex_AirCond_2.json', '﻿{"cnfg":{"file":"2","file_serial":"88300","type":"lumex_aircond","basic":"fancoil","name":"RDF302_1","enable":"1","active":"1","attr":["oo","temp_set","mode","fan_a","temp_now"],"fd":{"space_name":"not define","para":{"oo":"off","temp_set":"25","mode":"cool","fan_a":"mid","temp_now":"25"},"cmt":""}},"dev_cnfg":{"model_id":"325","model_subid":"5","ipt_id":"LumexAirCond-20180430145957","para":[{"tag":"_app","val":"0"},{"tag":"_group","val":"0"}]}}'),
	('/var/iot/iotm_dat/Lumex_AirCond_3.json', '﻿{"cnfg":{"file":"3","file_serial":"139049","type":"lumex_aircond","basic":"fancoil","name":"RDF302_2","enable":"1","active":"1","attr":["oo","temp_set","mode","fan_a","temp_now"],"fd":{"space_name":"not define","para":{"oo":"off","temp_set":"25","mode":"cool","fan_a":"mid","temp_now":"25"},"cmt":""}},"dev_cnfg":{"model_id":"325","model_subid":"5","ipt_id":"LumexAirCond-20180430150023","para":[{"tag":"_app","val":"0"},{"tag":"_group","val":"0"}]}}'),
	('/var/iot/iotm_dat/Lumex_Gateway_1.json', '﻿{"cnfg":{"file":"1","file_serial":"56401","type":"sw","basic":"sw","name":"IDP-RGIPG","enable":"1","active":"2","attr":["oop"],"fd":{"space_name":"not define","para":{"oop":"off"},"cmt":""}},"dev_cnfg":{"model_id":"325","model_subid":"1","ipt_id":"LumexGateway-20180430145227","para":[{"tag":"gw_ip","val":"192.168.0.1"},{"tag":"token_key","val":"21232f297a57a5a743894a0e4a801fc3"}]}}'),
	('/var/iot/iotm_dat/Feibit_Gateway_4.json', '﻿{"cnfg":{"file":"4","file_serial":"215155","physical":"","type":"sw","basic":"sw","name":"FeibitGateway","enable":"1","active":"2","attr":["oop"],"fd":{"space_name":"not define","para":{"oop":"off"},"cmt":""}},"dev_cnfg":{"model_id":"324","model_subid":"1","ipt_id":"FeibitGateway-20190510145655","para":[{"tag":"sn","val":"FFFFFFFF"},{"tag":"gw_type","val":"1"}]}}');
/*!40000 ALTER TABLE `iot_device_files` ENABLE KEYS */;


-- 導出  表 cms_mini.iot_device_log 結構
CREATE TABLE IF NOT EXISTS `iot_device_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `CellPhoneID` varchar(32) DEFAULT NULL,
  `Type` varchar(16) NOT NULL,
  `Attr` varchar(50) DEFAULT NULL,
  `Action` varchar(16) DEFAULT NULL,
  `Name` varchar(256) NOT NULL,
  `SN` varchar(50) DEFAULT NULL,
  `LogDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ident`)
) ENGINE=MyISAM AUTO_INCREMENT=177 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iot_device_log 的資料：0 rows
/*!40000 ALTER TABLE `iot_device_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `iot_device_log` ENABLE KEYS */;


-- 導出  表 cms_mini.iot_system_device_json 結構
CREATE TABLE IF NOT EXISTS `iot_system_device_json` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(50) NOT NULL,
  `UIText` varchar(50) NOT NULL,
  `ParentIdent` int(11) NOT NULL,
  `IsFolder` int(11) NOT NULL,
  `ObjType` int(11) NOT NULL,
  `Content` varchar(1000) NOT NULL,
  `DefaultValue` varchar(50) NOT NULL,
  `ObjDesc` varchar(1000) NOT NULL,
  `Sort` int(11) NOT NULL DEFAULT '99',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB AUTO_INCREMENT=286 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iot_system_device_json 的資料：~94 rows (大約)
/*!40000 ALTER TABLE `iot_system_device_json` DISABLE KEYS */;
INSERT INTO `iot_system_device_json` (`Ident`, `Name`, `UIText`, `ParentIdent`, `IsFolder`, `ObjType`, `Content`, `DefaultValue`, `ObjDesc`, `Sort`) VALUES
	(1, 'System', 'System', -1, 1, 0, '', '', '', 2),
	(2, 'ID', 'ID', 1, 0, 1, '', '', '', 1),
	(103, 'ReegaContacts', 'ReegaContacts', 1, 1, 0, '', '', '', 4),
	(104, 'unit_addr', 'unit_addr', 103, 0, 3, '1@100', '1', '', 2),
	(106, 'gw_ip', 'gw_ip', 103, 0, 1, '', '', '', 1),
	(108, 'Saswell', 'Saswell', 1, 1, 0, '', '', '', 5),
	(109, 'modelname', 'modelname', 108, 0, 1, '', '', '', 99),
	(110, 'modelid', 'modelid', 108, 0, 1, '', '', '', 99),
	(111, 'devid', 'devid', 108, 0, 1, '', '', '', 99),
	(116, 'ReegaDimmer', 'ReegaDimmer', 1, 1, 0, '', '', '', 6),
	(117, 'gw_ip', 'gw_ip', 116, 0, 1, '', '', '', 1),
	(118, 'unit_addr', 'unit_addr', 116, 0, 3, '1@100', '1', '', 2),
	(121, 'dm_off', 'dm_off', 116, 0, 1, '', '', '', 3),
	(140, 'ReegaCurtain', 'ReegaCurtain', 1, 1, 0, '', '', '', 8),
	(141, 'gw_ip', 'gw_ip', 140, 0, 1, '', '', '', 1),
	(146, 'cc_addr', 'cc_addr', 140, 0, 3, '1@100', '1', '', 2),
	(147, 'FeibitGateway', 'FeibitGateway', 1, 1, 0, '', '', '', 9),
	(148, 'gw_ip', 'gw_ip', 147, 0, 1, '', '', '', 1),
	(149, 'sn', 'sn', 147, 0, 1, '', '', '', 2),
	(150, 'FeibitDevice', 'FeibitDevice', 1, 1, 0, '', '', '', 10),
	(151, '_short_addr', '_short_addr', 150, 0, 1, '', '', 'ReadOnly', 99),
	(152, '_end_point', '_end_point', 150, 0, 1, '', '', 'ReadOnly', 99),
	(153, '_profile_id', '_profile_id', 150, 0, 1, '', '', 'ReadOnly', 99),
	(154, '_device_id', '_device_id', 150, 0, 1, '', '', 'ReadOnly', 99),
	(163, 'ReegaMacro', 'ReegaMacro', 1, 1, 0, '', '', '', 11),
	(164, 'gw_ip', 'gw_ip', 163, 0, 1, '', '', '', 99),
	(165, 'cc_addr', 'cc_addr', 163, 0, 3, '1@100', '1', '', 99),
	(177, 'LumexGateway', 'LumexGateway', 1, 1, 0, '', '', '', 12),
	(178, 'gw_ip', 'gw_ip', 177, 0, 1, '', '', '', 99),
	(179, 'token_key', 'token_key', 177, 0, 1, '', '', '', 99),
	(202, 'GigaCamera', 'GigaCamera', 1, 1, 0, '', '', '', 13),
	(203, 'url', 'url', 202, 0, 1, '', '', '', 99),
	(208, 'IotInfo', 'IotInfo', 1, 1, 0, '', '', '', 2),
	(209, 'iot_active', 'iot_active', 208, 1, 5, '', '', '安装时使用，0:表示不启用接口，此时操作端不会收到这台设备清单。1:表示启用。2:表示隐藏，一般用于网关等设备。', 1),
	(210, 'iot_file', 'iot_file', 208, 1, 5, '', '', '', 3),
	(211, 'iot_type', 'iot_type', 208, 1, 5, '', '', '', 4),
	(214, 'LumexDevice', 'LumexDevice', 1, 1, 0, '', '', '', 14),
	(215, '_app', '_app', 214, 0, 1, '', '', 'ReadOnly', 99),
	(216, '_group', '_group', 214, 0, 1, '', '', 'ReadOnly', 99),
	(217, 'iot_enable', 'iot_enable', 208, 1, 5, '', '', '0:设备停用，当设备毁损，或是禁止操作时，可设定此值。1:正常使用。', 2),
	(218, 'Rs485Curtain', 'Rs485Curtain', 1, 1, 0, '', '', '', 15),
	(219, 'modelid', 'modelid', 218, 0, 1, '', '', '', 1),
	(221, 'uartport', 'uartport', 218, 0, 1, '', '', '', 5),
	(222, 'baudrate', 'baudrate', 218, 0, 1, '300#0@600#1@1200#2@2400#3@4800#4@9600#5@19200#6@38400#7@57600#8@74880#9@115200#10@230400#11@460800#12@921600#13', '', '', 6),
	(223, 'cc_addr', 'cc_addr', 218, 0, 1, '', '', '', 7),
	(225, 'ip', 'ip', 218, 0, 1, '', '', '', 4),
	(226, 'PML1100Contact', 'PML1100Contact', 1, 1, 0, '', '', '', 16),
	(227, 'ID', 'ID', 226, 0, 1, '', '', '', 99),
	(228, 'SubID', 'SubID', 226, 0, 1, '', '', '', 99),
	(229, 'Contact', 'Contact', 226, 0, 3, '1@16', '1', '', 99),
	(231, 'iot_name', 'iot_name', 208, 1, 5, '', '', '', 99),
	(232, 'CanDevice', 'CanDevice', 1, 1, 0, '', '', '', 17),
	(233, '_id', '_id', 232, 0, 1, '', '', 'ReadOnly', 99),
	(234, '_subid', '_subid', 232, 0, 1, '', '', 'ReadOnly', 99),
	(235, '_local_sn', '_local_sn', 232, 0, 1, '', '', 'ReadOnly', 99),
	(236, '_contact', '_contact', 232, 0, 1, '', '', 'ReadOnly', 99),
	(237, 'IotDevice', 'IotDevice', 1, 1, 0, '', '', '', 18),
	(238, '_snid', '_snid', 237, 0, 1, '', '', 'ReadOnly', 1),
	(239, '_index', '_index', 237, 0, 1, '', '', 'ReadOnly', 2),
	(248, 'IotData', 'IotData', 1, 1, 0, '', '', '', 3),
	(249, '_file', '档案编号', 248, 0, 1, '', '', 'ReadOnly', 99),
	(250, 'active', 'active', 248, 0, 2, '端口停用#0@端口启用#1@端口隐藏#2', '1', '', 99),
	(251, 'enable', 'enable', 248, 0, 2, '停用#0@启用#1', '', '', 99),
	(252, 'type', 'type', 248, 0, 1, '', '', '', 99),
	(253, 'name', 'name', 248, 0, 1, '', '', '', 99),
	(254, 'UartPara', 'UART参数', 1, 1, 0, '', '', '', 19),
	(257, 'port_rs485', 'RS485串口接点', 254, 0, 2, '无#-100@RS485(本机)-1#-1@RS485(本机)-2#-2@RS485(本机)-3#-3', '', 'port_rs485', 99),
	(258, 'port_rs232', 'RS232串口接点', 254, 0, 2, '无#-100', '', 'port_rs232', 99),
	(259, 'baudrate', '波特率', 254, 0, 2, '300#0@600#1@1200#2@2400#3@4800#4@9600#5@19200#6@38400#7@57600#8@74880#9@115200#10@230400#11@460800#12@921600#13', '0', '', 99),
	(260, 'databit', '资料长度', 254, 0, 2, '7bits#0@8bits#1', '', '', 99),
	(261, 'stopbit', '停止位元(Stop bit)', 254, 0, 2, '1bit#0@2bit#2', '0', '', 99),
	(262, 'parity', 'parity', 254, 0, 2, '无(None)#0@奇(Odd)#1@偶(Even)#2', '0', '', 99),
	(264, 'CustomizeData', '自定义数据定义', 1, 1, 0, '', '', '', 20),
	(265, 'data_type', '数据型态', 264, 0, 2, '字符串(String)#0@10进位(DEC)#1@16进位(HEX)#2', '', '', 99),
	(266, 'data_s', '数据内容', 264, 0, 1, '', '', '10/16进位，需以逗点分隔数据内容。', 99),
	(267, 'volt_lb', '调光灯最小电压', 264, 0, 2, '1.5V#38@2.0V#51@2.5V#64@3.0V#77@3.5V#90@4.0V#102', '0', 'volt_lb_pdn1160', 99),
	(268, 'volt_ub', '调光灯最大电压', 264, 0, 2, '5.0V#128@5.5V#140@6.0V#153@6.5V#166@7.0V#179@7.5V#191@8.0V#204@8.5V#217@9.0V#230@9.5V#242@10V#255', '10', 'volt_ub_pdn1160', 99),
	(269, 'ctrlb_dim', '控制面板調光燈', 264, 1, 4, '', '', '', 99),
	(270, '', '', 269, 1, 6, '', '', '', 99),
	(271, 'iot_file', '名稱', 270, 0, 2, 'none#0', '', 'iot_file_name', 99),
	(272, 'ctrlb_sw', '控制面板開關', 264, 1, 4, '', '', '', 99),
	(273, '', '', 272, 1, 6, '', '', '', 99),
	(274, 'iot_file', '名稱', 273, 0, 2, 'none#0', '', 'iot_file_name', 99),
	(275, '_devSn', 'SNID', 237, 0, 1, '', '', 'ReadOnly', 3),
	(276, '_devMac', 'devMac', 237, 0, 1, '', '', 'ReadOnly', 4),
	(277, 'AirCond', 'AirCond', 1, 1, 0, '', '', '', 21),
	(278, 'modelname', 'modelname', 277, 0, 1, '', '', 'ReadOnly', 99),
	(279, 'modelid', 'modelid', 277, 0, 1, '', '', 'ReadOnly', 99),
	(280, 'devid', 'devid', 277, 0, 1, '', '', 'ReadOnly', 99),
	(281, 'CustomDev', 'CustomDev', 1, 1, 0, '', '', '', 22),
	(282, 'modelname', 'modelname', 281, 0, 1, '', '', '', 99),
	(283, 'modelid', 'modelid', 281, 0, 1, '', '', '', 99),
	(284, 'devid', 'devid', 281, 0, 1, '', '', '', 99),
	(285, 'gw_type', '网关', 147, 0, 2, '无#0@内置#1@外部#2', '0', 'feibit_gw_type', 99);
/*!40000 ALTER TABLE `iot_system_device_json` ENABLE KEYS */;


-- 導出  表 cms_mini.iot_system_device_main 結構
CREATE TABLE IF NOT EXISTS `iot_system_device_main` (
  `Code` varchar(10) NOT NULL COMMENT '代號',
  `SubCode` varchar(5) NOT NULL DEFAULT '',
  `Name_GA` varchar(50) NOT NULL COMMENT '名稱',
  `Model_GA` varchar(50) NOT NULL COMMENT '型號',
  `Name_KCA` varchar(50) NOT NULL,
  `Model_KCA` varchar(50) NOT NULL,
  `Name_BOSCH` varchar(50) NOT NULL,
  `Model_BOSCH` varchar(50) NOT NULL,
  `Type` int(11) NOT NULL COMMENT '系統類型。0=NVP。1=SIP(Android IP)',
  `IconPath` varchar(255) NOT NULL DEFAULT '',
  `CardReader` int(11) NOT NULL DEFAULT '0' COMMENT '是否為刷卡機',
  `MessageDisplay` int(11) NOT NULL DEFAULT '0' COMMENT '是否顯示訊息',
  `MessageFormat` int(11) NOT NULL DEFAULT '0' COMMENT '訊息格式。0=純文字。1=圖檔',
  PRIMARY KEY (`Code`,`SubCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iot_system_device_main 的資料：~58 rows (大約)
/*!40000 ALTER TABLE `iot_system_device_main` DISABLE KEYS */;
INSERT INTO `iot_system_device_main` (`Code`, `SubCode`, `Name_GA`, `Model_GA`, `Name_KCA`, `Model_KCA`, `Name_BOSCH`, `Model_BOSCH`, `Type`, `IconPath`, `CardReader`, `MessageDisplay`, `MessageFormat`) VALUES
	('300', '1', '安卓手机', 'Adnroid', '', '', '', '', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('300', '2', '苹果手机', 'IOS', '', '', '', '', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('310', '1', '某网關', 'GW', '', '', '', '', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('321', '2', 'Reega-RO-0410', 'Reega-RO-0410', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('321', '3', 'Reega-RO-0416', 'Reega-RO-0416', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('321', '4', 'Reega-CC-0410', 'Reega-CC-0410', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('321', '5', 'Reega-DM-0410', 'Reega-DM-0410', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('321', '6', 'Reega-CXX-0410', 'Reega-CXX-0410', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '1', 'SasWell SAS810', 'SasWell SAS810', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '1000', 'Daikin Adapter', 'Daikin Adapter', 'Daikin Adapter', 'Daikin Adapter', 'Daikin Adapter', 'Daikin Adapter', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '1001', 'Hitachi Adapter', 'Hitachi Adapter', 'Hitachi Adapter', 'Hitachi Adapter', 'Hitachi Adapter', 'Hitachi Adapter', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '1002', 'Gree Adapter', 'Gree Adapter', 'Gree Adapter', 'Gree Adapter', 'Gree Adapter', 'Gree Adapter', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '1003', 'Saswell Adapter', 'Saswell Adapter', 'Saswell Adapter', 'Saswell Adapter', 'Saswell Adapter', 'Saswell Adapter', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '2', 'SasWell T13', 'SasWell T13', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '3', 'Hitachi AirConditioner', 'Hitachi AirConditioner', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '4', 'Daikin AirConditioner', 'Daikin AirConditioner', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('322', '5', 'Gree AirConditioner', 'Gree AirConditioner', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '1', 'FeibitGateway', 'FeibitGateway', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '10', 'FeibitSmoke', 'FeibitSmoke', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '11', 'FeibitFlood', 'FeibitFlood', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '12', 'FeibitGas', 'FeibitGas', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '3', 'FeibitRelay', 'FeibitRelay', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '4', '[REDACTED]', '[REDACTED]', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '5', 'FeibitColorDM', 'FeibitColorDM', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '6', 'FeibitDoorLock', 'FeibitDoorLock', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '7', 'FeibitIR', 'FeibitIR', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '8', 'FeibitPlug', 'FeibitPlug', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('324', '9', 'FeibitTempHum', 'FeibitTempHum', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('325', '1', 'IDP-RGIPG', 'LumexGateway', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('325', '2', 'IDP-RGOE-41X', 'LumexSwitch', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('325', '3', 'IDP-RGDM-410', 'LumexDimmer', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('325', '4', 'IDP-RGCC-410', 'LumexCurtain', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('325', '5', 'RDF302', 'LumexAirCond', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('325', '7', 'Lum_Fan', 'Lum_Fan', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('325', '8', 'Lum_Heat', 'Lum_Heat', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('326', '3', 'GigaCamera', 'GigaCamera', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('327', '1', 'DooyaCurtain', 'DooyaCurtain', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('327', '2', 'A_OkCurtain', 'A_OkCurtain', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('327', '3', 'ElectricScreen', 'ElectricScreen', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('327', '4', 'WintomCurtain', 'WintomCurtain', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('328', '4', '華越SWitch', '華越SWitch', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '198', 'RS232(自定义数据)', 'RS232', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '199', 'RS485(自定义数据)', 'RS485', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '2', '控制面板 PPL1000', 'PPL1000', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '200', 'GigaDI', 'GigaDI', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '201', 'GigaDO', 'GigaDO', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '202', 'GigaGAS', 'GigaGAS', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '203', 'GigaSW', 'GigaSW', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '204', 'GigaCurtain', 'GigaCurtain', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '205', 'GigaRGBW', 'GigaRGBW', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '206', 'GigaDL', 'GigaDL', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '3', 'IR網關', 'IR Gateway', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '5', 'EM2110_REMOTE', 'EM2110_REMOTE', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('329', '6', 'EM2110_ALARM', 'EM2110_ALARM', '', '', '', '', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('330', '1', 'YaleLock', 'YaleLock', 'YaleLock', 'YaleLock', 'YaleLock', 'YaleLock', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('330', '1000', 'PowerMentorAdapter', 'PowerMentorAdapter', 'PowerMentorAdapter', 'PowerMentorAdapter', 'PowerMentorAdapter', 'PowerMentorAdapter', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('330', '101', 'AirMentor', 'AirMentor', 'AirMentor', 'AirMentor', 'AirMentor', 'AirMentor', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('330', '201', 'PowerMentor', 'PowerMentor', 'PowerMentor', 'PowerMentor', 'PowerMentor', 'PowerMentor', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0);
/*!40000 ALTER TABLE `iot_system_device_main` ENABLE KEYS */;


-- 導出  表 cms_mini.iot_system_device_main_version 結構
CREATE TABLE IF NOT EXISTS `iot_system_device_main_version` (
  `Code` varchar(50) NOT NULL,
  `SubCode` varchar(50) NOT NULL,
  `Version` varchar(50) NOT NULL,
  `JSONLink` longtext,
  PRIMARY KEY (`Code`,`SubCode`,`Version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iot_system_device_main_version 的資料：~54 rows (大約)
/*!40000 ALTER TABLE `iot_system_device_main_version` DISABLE KEYS */;
INSERT INTO `iot_system_device_main_version` (`Code`, `SubCode`, `Version`, `JSONLink`) VALUES
	('310', '1', '1', '-1,1,2'),
	('321', '2', '1', '-1,1,208,209,217,210,211,231,103,106,104'),
	('321', '3', '1', '-1,1,208,209,217,210,211,231,103,106,104'),
	('321', '4', '1', '-1,1,208,209,217,210,211,231,140,141,146'),
	('321', '5', '1', '-1,1,208,209,217,210,211,231,116,117,118,121'),
	('321', '6', '1', '-1,1,208,209,217,210,211,231,163,164,165'),
	('322', '1', '1', '-1,1,208,209,217,210,211,231,108,109,110,111'),
	('322', '1000', '1', '-1,1,208,209,217,210,211,231,103,106,104,108,109,110,111'),
	('322', '1001', '1', '-1,1,208,209,217,210,211,231,103,106,104,108,109,110,111'),
	('322', '1002', '1', '-1,1,208,209,217,210,211,231,103,106,104,108,109,110,111'),
	('322', '1003', '1', '-1,1,208,209,217,210,211,231,103,106,104,108,109,110,111'),
	('322', '2', '1', '-1,1,208,209,217,210,211,231,108,109,110,111'),
	('322', '4', '1', '-1,1,248,249,250,251,252,253,277,278,279,280'),
	('324', '1', '1', '-1,1,248,249,250,251,252,253,147,148,149'),
	('324', '10', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '11', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '12', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '3', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '4', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '5', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '6', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '7', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '8', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('324', '9', '1', '-1,1,248,249,250,251,252,253,150,151,152,153,154'),
	('325', '1', '1', '-1,1,208,209,217,210,211,231,177,178,179'),
	('325', '2', '1', '-1,1,208,209,217,210,211,231,214,215,216'),
	('325', '3', '1', '-1,1,208,209,217,210,211,231,214,215,216'),
	('325', '4', '1', '-1,1,208,209,217,210,211,231,214,215,216'),
	('325', '5', '1', '-1,1,208,209,217,210,211,231,214,215,216'),
	('325', '7', '1', '-1,1,208,209,217,210,211,231,214,215,216'),
	('325', '8', '1', '-1,1,208,209,217,210,211,231,214,215,216'),
	('326', '3', '1', '-1,1,208,209,217,210,211,231,202,203'),
	('327', '1', '1', '-1,1,208,209,217,210,211,231,218,225,221,222,223'),
	('327', '2', '1', '-1,1,208,209,217,210,211,231,218,225,221,222,223'),
	('327', '3', '1', '-1,1,208,209,217,210,211,231,218,225,221,222,223'),
	('327', '4', '1', '-1,1,208,209,217,210,211,231,218,225,221,222,223'),
	('328', '4', '1', '-1,1,208,209,217,210,211,231,218,219,225,221,222,223'),
	('329', '198', '1', '-1,1,248,249,250,251,252,253,254,258,259,260,261,262,264,265,266'),
	('329', '199', '1', '-1,1,248,249,250,251,252,253,254,257,259,260,261,262,264,265,266'),
	('329', '2', '1', '-1,1,237,275,276,248,249'),
	('329', '200', '1', '-1,1,232,233,234,236,248,249,250,251,252,253'),
	('329', '201', '1', '-1,1,232,233,234,236,248,249,250,251,252,253'),
	('329', '202', '1', '-1,1,232,233,234,236,248,249,250,251,252,253'),
	('329', '203', '1', '-1,1,248,249,250,251,252,253,232,233,234,236'),
	('329', '204', '1', '-1,1,248,249,250,251,252,253,232,233,234,236'),
	('329', '205', '1', '-1,1,248,249,250,251,252,253,232,233,234,236'),
	('329', '206', '1', '-1,1,248,249,250,251,252,253,232,233,234,236,264,267,268'),
	('329', '3', '1', '-1,1,237,238'),
	('329', '5', '1', '-1,1,208,231,237,238,239'),
	('329', '6', '1', '-1,1,237,238,239'),
	('330', '1', '1', '-1,1,248,249,250,251,252,253,281,282,283,284'),
	('330', '1000', '1', '-1,1,248,249,250,251,252,253,281,282,283,284'),
	('330', '101', '1', '-1,1,248,249,250,251,252,253,281,282,283,284'),
	('330', '201', '1', '-1,1,248,249,250,251,252,253,281,282,283,284');
/*!40000 ALTER TABLE `iot_system_device_main_version` ENABLE KEYS */;


-- 導出  表 cms_mini.iot_system_device_param 結構
CREATE TABLE IF NOT EXISTS `iot_system_device_param` (
  `MAC` varchar(50) NOT NULL,
  `ConfigName` varchar(50) NOT NULL,
  `JSON` text,
  PRIMARY KEY (`MAC`,`ConfigName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iot_system_device_param 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `iot_system_device_param` DISABLE KEYS */;
/*!40000 ALTER TABLE `iot_system_device_param` ENABLE KEYS */;


-- 導出  表 cms_mini.iot_system_device_tree 結構
CREATE TABLE IF NOT EXISTS `iot_system_device_tree` (
  `MAC` int(11) NOT NULL AUTO_INCREMENT,
  `Code` varchar(10) NOT NULL,
  `SubCode` varchar(5) NOT NULL,
  `ID` varchar(50) NOT NULL DEFAULT '',
  `SubID` varchar(3) NOT NULL DEFAULT '',
  `NewID` varchar(10) NOT NULL DEFAULT '',
  `NewSubID` varchar(3) NOT NULL DEFAULT '',
  `ParaVersion` float NOT NULL DEFAULT '1',
  `IP` varchar(50) NOT NULL DEFAULT '',
  `SubMask` varchar(50) NOT NULL DEFAULT ' ' COMMENT '子網遮罩',
  `NetSeg` varchar(50) NOT NULL DEFAULT ' ' COMMENT '網段(由IP與子網遮罩運算取得)',
  `ParentMAC` varchar(30) NOT NULL DEFAULT ' ',
  `Online` int(11) NOT NULL DEFAULT '0',
  `NickName` varchar(255) NOT NULL DEFAULT '',
  `ReportGroup` int(11) NOT NULL DEFAULT '0',
  `ReportID` int(11) NOT NULL DEFAULT '0',
  `BuildingIdent` int(11) NOT NULL DEFAULT '-2',
  `NewBuildingIdent` int(11) NOT NULL DEFAULT '-2',
  `Language` int(11) NOT NULL DEFAULT '-1' COMMENT '設備語系(0=繁體中文、1=簡體中文)',
  `AreaLabel` varchar(50) NOT NULL DEFAULT '',
  `ContactList` text COMMENT '聯絡清單',
  `Location` varchar(255) NOT NULL DEFAULT '',
  `UpdateDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `3rdDevice` int(11) NOT NULL DEFAULT '0',
  `IpTableNote` varchar(255) NOT NULL DEFAULT '' COMMENT '等同PushID',
  `CameraList` varchar(255) NOT NULL DEFAULT '',
  `SN` varchar(50) DEFAULT NULL,
  `State` varchar(10) DEFAULT 'ON',
  `FCM` varchar(1024) DEFAULT NULL,
  PRIMARY KEY (`MAC`),
  KEY `Code_SubCode` (`Code`,`SubCode`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iot_system_device_tree 的資料：~2 rows (大約)
/*!40000 ALTER TABLE `iot_system_device_tree` DISABLE KEYS */;
INSERT INTO `iot_system_device_tree` (`MAC`, `Code`, `SubCode`, `ID`, `SubID`, `NewID`, `NewSubID`, `ParaVersion`, `IP`, `SubMask`, `NetSeg`, `ParentMAC`, `Online`, `NickName`, `ReportGroup`, `ReportID`, `BuildingIdent`, `NewBuildingIdent`, `Language`, `AreaLabel`, `ContactList`, `Location`, `UpdateDateTime`, `3rdDevice`, `IpTableNote`, `CameraList`, `SN`, `State`, `FCM`) VALUES
	(3, '325', '1', 'LumexGateway-20180430145227', '', '', '', 1, '127.0.0.1', ' ', ' ', ' ', 0, 'IDP-RGIPG', 0, 0, -2, -2, -1, '', NULL, '', '2018-09-25 11:57:32', 0, '*****', '', '1', '11111', NULL),
	(4, '324', '1', 'FeibitGateway-20190510145655', '', '', '', 1, '127.0.0.1', ' ', ' ', ' ', 0, 'FeibitGateway', 0, 0, -2, -2, -1, '', NULL, '', '2019-06-26 12:01:58', 0, 'FeibitGateway', '', '4', '11111', NULL);
/*!40000 ALTER TABLE `iot_system_device_tree` ENABLE KEYS */;


-- 導出  表 cms_mini.iot_system_device_tree_log 結構
CREATE TABLE IF NOT EXISTS `iot_system_device_tree_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `Code` varchar(10) NOT NULL,
  `SubCode` varchar(5) NOT NULL,
  `ID` varchar(50) NOT NULL DEFAULT '',
  `IP` varchar(50) NOT NULL DEFAULT '',
  `NickName` varchar(255) NOT NULL DEFAULT '',
  `UpdateDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `State` varchar(10) DEFAULT 'ON',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iot_system_device_tree_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `iot_system_device_tree_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `iot_system_device_tree_log` ENABLE KEYS */;


-- 導出  表 cms_mini.iptable_update_log 結構
CREATE TABLE IF NOT EXISTS `iptable_update_log` (
  `UpdateDT` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `Content` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.iptable_update_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `iptable_update_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `iptable_update_log` ENABLE KEYS */;


-- 導出  表 cms_mini.message_detail 結構
CREATE TABLE IF NOT EXISTS `message_detail` (
  `msg_ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '訊息識別碼',
  `subject` varchar(500) NOT NULL DEFAULT '' COMMENT '主旨',
  `priority` int(10) NOT NULL DEFAULT '0' COMMENT '重要性',
  `content_text` text NOT NULL COMMENT '文字內容',
  `attach_count` int(10) NOT NULL DEFAULT '0' COMMENT '附件數量',
  `msg_datetime` datetime DEFAULT NULL COMMENT '訊息建立時間',
  `receive_datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '訊息接收時間',
  `size` int(10) NOT NULL DEFAULT '0' COMMENT '訊息大小',
  `read_notice` int(10) NOT NULL DEFAULT '0' COMMENT '讀取通知',
  `owner_ident` varchar(50) NOT NULL DEFAULT '' COMMENT '擁有者識別碼',
  `owner_name` varchar(50) NOT NULL DEFAULT '' COMMENT '擁有者姓名',
  `location` varchar(50) NOT NULL DEFAULT '' COMMENT '位置',
  `is_trash` int(10) NOT NULL DEFAULT '0' COMMENT '是否標示為已刪除',
  `edit_to` text NOT NULL COMMENT '編輯用TO清單',
  `edit_cc` text NOT NULL COMMENT '編輯用CC清單',
  `edit_bcc` text NOT NULL COMMENT '編輯用BCC清單',
  PRIMARY KEY (`msg_ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='訊息發佈';

-- 正在導出表  cms_mini.message_detail 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `message_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_detail` ENABLE KEYS */;


-- 導出  表 cms_mini.message_folder 結構
CREATE TABLE IF NOT EXISTS `message_folder` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `parent_id` varchar(50) DEFAULT NULL,
  `folder_type` varchar(50) DEFAULT NULL,
  `owner_ident` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.message_folder 的資料：~1 rows (大約)
/*!40000 ALTER TABLE `message_folder` DISABLE KEYS */;
INSERT INTO `message_folder` (`id`, `name`, `parent_id`, `folder_type`, `owner_ident`) VALUES
	(1, 'aaa', 'INBOX', 'INBOX', '33');
/*!40000 ALTER TABLE `message_folder` ENABLE KEYS */;


-- 導出  表 cms_mini.message_marquee 結構
CREATE TABLE IF NOT EXISTS `message_marquee` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `MsgText` varchar(255) NOT NULL,
  `Who` text NOT NULL,
  `BeginDateTime` datetime NOT NULL,
  `EndDateTime` datetime NOT NULL,
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.message_marquee 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `message_marquee` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_marquee` ENABLE KEYS */;


-- 導出  表 cms_mini.message_marquee_receiver 結構
CREATE TABLE IF NOT EXISTS `message_marquee_receiver` (
  `MQIdent` int(11) NOT NULL,
  `ID` varchar(50) NOT NULL,
  `Info` varchar(255) NOT NULL,
  KEY `FK_message_marquee_receiver_message_marquee` (`MQIdent`),
  CONSTRAINT `FK_message_marquee_receiver_message_marquee` FOREIGN KEY (`MQIdent`) REFERENCES `message_marquee` (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.message_marquee_receiver 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `message_marquee_receiver` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_marquee_receiver` ENABLE KEYS */;


-- 導出  表 cms_mini.message_post 結構
CREATE TABLE IF NOT EXISTS `message_post` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `Subject` varchar(255) NOT NULL,
  `Content` text,
  `ImgContent` longblob,
  `ImgContentType` varchar(50) DEFAULT NULL,
  `Who` text NOT NULL,
  `PostDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `MsgType` int(11) NOT NULL,
  `EditorId` varchar(50) NOT NULL,
  `EditorName` varchar(50) NOT NULL,
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.message_post 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `message_post` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_post` ENABLE KEYS */;


-- 導出  表 cms_mini.message_post_receiver 結構
CREATE TABLE IF NOT EXISTS `message_post_receiver` (
  `MQIdent` int(11) NOT NULL,
  `ID` varchar(50) NOT NULL,
  `Info` varchar(255) NOT NULL,
  KEY `FK_message_post_receiver_message_post` (`MQIdent`),
  CONSTRAINT `FK_message_post_receiver_message_post` FOREIGN KEY (`MQIdent`) REFERENCES `message_post` (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.message_post_receiver 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `message_post_receiver` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_post_receiver` ENABLE KEYS */;


-- 導出  表 cms_mini.message_receiver 結構
CREATE TABLE IF NOT EXISTS `message_receiver` (
  `msg_ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '訊息識別碼',
  `address_type` int(11) NOT NULL COMMENT '0=SENT 1=TO 2=CC 3=BCC',
  `user_ident` varchar(50) NOT NULL COMMENT '所屬人員識別碼',
  `location` varchar(50) NOT NULL COMMENT '訊息位置=>INBOX SENT DRAFT TRASH {FOLDER_IDENT}',
  `is_trash` int(10) NOT NULL DEFAULT '0' COMMENT '是否標示為垃圾桶訊息',
  `read_flag` int(10) NOT NULL DEFAULT '0' COMMENT '已閱讀標記',
  `read_datetime` datetime DEFAULT NULL COMMENT '閱讀時間',
  `read_notified` int(10) NOT NULL DEFAULT '0' COMMENT '讀取通知設定=> 0=無需回條 1=需回條 2=已發送回條',
  PRIMARY KEY (`msg_ident`,`user_ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='內部訊息接收者';

-- 正在導出表  cms_mini.message_receiver 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `message_receiver` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_receiver` ENABLE KEYS */;


-- 導出  表 cms_mini.mobile_list 結構
CREATE TABLE IF NOT EXISTS `mobile_list` (
  `DeviceId` varchar(50) NOT NULL,
  `GCM` varchar(255) NOT NULL,
  `UserId` varchar(8) NOT NULL,
  `RegDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`DeviceId`),
  KEY `UserId` (`UserId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.mobile_list 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `mobile_list` DISABLE KEYS */;
/*!40000 ALTER TABLE `mobile_list` ENABLE KEYS */;


-- 導出  表 cms_mini.pumplog 結構
CREATE TABLE IF NOT EXISTS `pumplog` (
  `logdatetime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `wdatetime` datetime NOT NULL,
  `pcst1` int(11) DEFAULT '0',
  `pcst2` int(11) DEFAULT '0',
  `cpst1` int(11) DEFAULT '0',
  `cpst2` int(11) DEFAULT '0',
  `fanst1` int(11) DEFAULT '0',
  `fanst2` int(11) DEFAULT '0',
  `pcoutc1` float DEFAULT NULL,
  `pcoutc2` float DEFAULT NULL,
  `pcinc1` float DEFAULT NULL,
  `pcinc2` float DEFAULT NULL,
  `outc1` float DEFAULT NULL,
  `outc2` float DEFAULT NULL,
  `hwc1` float DEFAULT NULL,
  `hwc2` float DEFAULT NULL,
  `bwc1` float DEFAULT NULL,
  `bwc2` float DEFAULT NULL,
  `pckw1` float DEFAULT NULL,
  `pckw2` float DEFAULT NULL,
  `pckw3` float DEFAULT NULL,
  `pckw4` float DEFAULT NULL,
  `ckw1` float DEFAULT NULL,
  `ckw2` float DEFAULT NULL,
  `ckw3` float DEFAULT NULL,
  `ckw4` float DEFAULT NULL,
  `cop1` float DEFAULT NULL,
  `cop2` float DEFAULT NULL,
  `cop3` float DEFAULT NULL,
  `cop4` float DEFAULT NULL,
  `coldoutc1` float DEFAULT NULL,
  `bucketc1` float DEFAULT NULL,
  `bucketc2` float DEFAULT NULL,
  `hotoutc1` float DEFAULT NULL,
  `watermeter` float DEFAULT NULL,
  `alarmcode1` int(11) DEFAULT NULL,
  `alarmcode2` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.pumplog 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `pumplog` DISABLE KEYS */;
/*!40000 ALTER TABLE `pumplog` ENABLE KEYS */;


-- 導出  表 cms_mini.sampletree 結構
CREATE TABLE IF NOT EXISTS `sampletree` (
  `FolderID` int(11) NOT NULL AUTO_INCREMENT,
  `FolderName` varchar(45) NOT NULL,
  `ParentFolderID` int(11) DEFAULT NULL,
  PRIMARY KEY (`FolderID`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.sampletree 的資料：~9 rows (大約)
/*!40000 ALTER TABLE `sampletree` DISABLE KEYS */;
INSERT INTO `sampletree` (`FolderID`, `FolderName`, `ParentFolderID`) VALUES
	(51, '根目錄', NULL),
	(67, '1111', 51),
	(68, '2222', 51),
	(69, '33333', 51),
	(70, '44444', 51),
	(71, 'awqwqwqw', 67),
	(72, 'wqwqw', 68),
	(73, 'wqwqwqw', 69),
	(74, 'qwqwqw', 70);
/*!40000 ALTER TABLE `sampletree` ENABLE KEYS */;


-- 導出  表 cms_mini.system_access_log 結構
CREATE TABLE IF NOT EXISTS `system_access_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '識別碼',
  `UserIdent` varchar(20) NOT NULL COMMENT '使用者Ident',
  `UserId` varchar(45) NOT NULL COMMENT '使用者ID',
  `UserName` varchar(45) NOT NULL COMMENT '使用者名稱',
  `LoginDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '登入時間',
  `LogoutDateTime` datetime DEFAULT NULL COMMENT '登出時間',
  `UserIP` varchar(30) NOT NULL COMMENT '使用者IP',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COMMENT='系統登出登入記錄';

-- 正在導出表  cms_mini.system_access_log 的資料：~21 rows (大約)
/*!40000 ALTER TABLE `system_access_log` DISABLE KEYS */;
INSERT INTO `system_access_log` (`Ident`, `UserIdent`, `UserId`, `UserName`, `LoginDateTime`, `LogoutDateTime`, `UserIP`) VALUES
	(1, '-1', 'sysadm', 'sysadm', '2018-09-25 12:42:29', NULL, '192.168.0.222'),
	(2, '-1', 'sysadm', 'sysadm', '2018-09-27 12:15:06', NULL, '192.168.0.222'),
	(3, '-1', 'sysadm', 'sysadm', '2018-09-27 12:15:09', NULL, '192.168.0.222'),
	(4, '-1', 'sysadm', 'sysadm', '2018-10-04 11:01:02', '2018-10-04 13:59:25', '192.168.0.222'),
	(5, '-1', 'sysadm', 'sysadm', '2018-10-04 13:59:31', NULL, '192.168.0.222'),
	(6, '-1', 'sysadm', 'sysadm', '2018-11-28 11:44:10', NULL, '192.168.0.222'),
	(7, '-1', 'sysadm', 'sysadm', '2019-04-11 17:06:25', NULL, '192.168.0.222'),
	(8, '-1', 'sysadm', 'sysadm', '2019-04-11 17:16:15', NULL, '192.168.0.6'),
	(9, '-1', 'sysadm', 'sysadm', '2019-06-26 11:36:04', NULL, '192.168.0.222'),
	(10, '-1', 'sysadm', 'sysadm', '2019-07-02 14:34:59', NULL, '192.168.0.222'),
	(11, '-1', 'sysadm', 'sysadm', '2019-07-05 13:11:26', NULL, '192.168.0.222'),
	(12, '-1', 'sysadm', 'sysadm', '2019-07-09 11:14:32', '2019-07-09 11:20:11', '192.168.0.222'),
	(13, '-1', 'sysadm', 'sysadm', '2019-07-09 11:20:17', '2019-07-09 11:48:03', '192.168.0.222'),
	(14, '-1', 'sysadm', 'sysadm', '2019-07-09 11:48:10', '2019-07-09 11:49:08', '192.168.0.222'),
	(15, '-1', 'sysadm', 'sysadm', '2019-07-09 11:49:14', '2019-07-09 12:48:44', '192.168.0.222'),
	(16, '-1', 'sysadm', 'sysadm', '2019-07-09 12:48:51', '2019-07-09 12:49:20', '192.168.0.222'),
	(17, '-1', 'sysadm', 'sysadm', '2019-07-09 12:49:33', '2019-07-09 14:21:02', '192.168.0.222'),
	(18, '-1', 'sysadm', 'sysadm', '2019-07-09 14:21:07', '2019-07-09 14:44:00', '192.168.0.222'),
	(19, '-1', 'sysadm', 'sysadm', '2019-07-09 14:44:09', '2019-07-09 19:42:21', '192.168.0.222'),
	(20, '-1', 'sysadm', 'sysadm', '2019-07-10 09:42:45', '2019-07-10 20:39:00', '192.168.0.222'),
	(21, '-1', 'sysadm', 'sysadm', '2019-07-12 15:07:37', NULL, '192.168.0.222');
/*!40000 ALTER TABLE `system_access_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_apps 結構
CREATE TABLE IF NOT EXISTS `system_apps` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '識別碼',
  `Id` varchar(45) NOT NULL COMMENT 'ID',
  `Name` varchar(45) NOT NULL COMMENT '名稱',
  `ParentIdent` varchar(45) NOT NULL COMMENT '父系Ident',
  `IconPath` varchar(255) NOT NULL DEFAULT '' COMMENT '圖示路徑',
  `IsFolder` varchar(45) NOT NULL COMMENT '目錄否',
  `URL` varchar(255) NOT NULL DEFAULT '' COMMENT '程式路徑',
  `Sort` varchar(45) NOT NULL DEFAULT '0' COMMENT '排序值',
  `Note` varchar(45) NOT NULL DEFAULT '' COMMENT '備註',
  `EditorId` varchar(45) NOT NULL COMMENT '編輯者ID',
  `EditorName` varchar(45) NOT NULL COMMENT '編輯者',
  `EditDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '編輯日期',
  PRIMARY KEY (`Ident`),
  UNIQUE KEY `Id_UNIQUE` (`Id`),
  UNIQUE KEY `U1` (`ParentIdent`,`Name`,`IsFolder`)
) ENGINE=InnoDB AUTO_INCREMENT=161 DEFAULT CHARSET=utf8 COMMENT='系統功能';

-- 正在導出表  cms_mini.system_apps 的資料：~33 rows (大約)
/*!40000 ALTER TABLE `system_apps` DISABLE KEYS */;
INSERT INTO `system_apps` (`Ident`, `Id`, `Name`, `ParentIdent`, `IconPath`, `IsFolder`, `URL`, `Sort`, `Note`, `EditorId`, `EditorName`, `EditDateTime`) VALUES
	(17, 'ROOT', '功能选单根目录', '17', '', '1', '', '0', '', 'sysadm', 'sysadm', '2013-08-09 22:23:11'),
	(18, 'Device', '设备管理', '17', '/Common/DMZ/Images/16x16/devices.png', '1', '', '1', '', 'sysadm', 'sysadm', '2015-05-13 21:10:26'),
	(23, 'System', '系统管理', '17', '/Common/DMZ/Images/16x16/sysadm.png', '1', '', '4', '', 'sysadm', 'sysadm', '2017-05-25 10:33:06'),
	(24, 'AccountGroup', '账号与群组', '23', '', '1', '', '1', '', 'sysadm', 'sysadm', '2014-05-21 23:52:22'),
	(25, 'Group', '群组权限管理', '24', '', '0', '/Common/SystemAdmin/Group/Main.aspx', '2', '', 'sysadm', 'sysadm', '2013-11-21 00:48:44'),
	(26, 'Account', '账号管理', '24', '', '0', '/Common/SystemAdmin/Account/Main.aspx', '1', '', 'sysadm', 'sysadm', '2013-08-09 22:34:10'),
	(27, 'Setting', '設定', '23', '', '0', '/Common/SystemAdmin/Setting/Main.aspx', '4', '', 'sysadm', 'sysadm', '2014-05-22 00:10:45'),
	(28, 'AccessLog', '注销入记录', '23', '', '0', '/Common/SystemAdmin/AccessLog/Main.aspx', '3', '', 'sysadm', 'sysadm', '2014-05-22 00:10:37'),
	(57, 'DeviceMgt', '设备清单', '18', '', '0', '/Apps/DeviceSystem/DeviceMgt.aspx', '1', '', 'sysadm', 'sysadm', '2013-12-23 23:18:11'),
	(60, 'Building', '小区', '23', '', '1', '', '2', '', 'sysadm', 'sysadm', '2014-03-25 00:51:09'),
	(61, 'IDRule', '编码原则', '60', '', '0', '/Common/SystemAdmin/Building/Rule.aspx', '0', '', 'sysadm', 'sysadm', '2014-01-13 22:32:10'),
	(62, 'Structure', '小区结构', '60', '', '0', '/Common/SystemAdmin/Building/Structure.aspx', '0', '', 'sysadm', 'sysadm', '2014-03-25 00:51:16'),
	(113, '功能选单管理', '功能选单管理', '23', '', '0', '/Common/SystemAdmin/Apps/Main.aspx', '5', '', 'sysadm', 'sysadm', '2017-05-25 10:34:22'),
	(114, '報警系統', '报警系统', '17', '/Common/DMZ/Images/16x16/siren.png', '1', '', '3', '', 'sysadm', 'sysadm', '2014-11-06 23:16:20'),
	(121, '区域卷标', '区域卷标', '60', '', '0', '/Common/SystemAdmin/Building/Area.aspx', '0', '', 'sysadm', 'sysadm', '2017-05-25 10:34:13'),
	(127, '报警记录', '报警记录', '114', '', '0', '/Apps/AlarmSystem/Log/Main.aspx', '0', '', 'sysadm', 'sysadm', '2017-05-25 10:32:40'),
	(134, '134', '维护', '18', '', '1', '', '8', '', 'sysadm', 'sysadm', '2015-02-03 02:37:39'),
	(135, '工具', '工具', '134', '', '0', '/Apps/DeviceSystem/Utility.aspx', '5', '', 'sysadm', 'sysadm', '2015-02-03 02:37:58'),
	(137, '第三方设备维护', '第三方设备维护', '134', '', '0', '/Apps/DeviceSystem/Device3rdMgt.aspx', '2', '', 'sysadm', 'sysadm', '2017-05-25 10:32:00'),
	(138, '设备维护', '设备维护', '134', '', '0', '/Apps/DeviceSystem/DeviceList.aspx', '1', '', 'sysadm', 'sysadm', '2017-05-25 10:31:55'),
	(140, '140', '通话纪录', '18', '', '1', '', '7', '', 'sysadm', 'sysadm', '2015-02-05 19:34:24'),
	(141, '所有设备通话记录', '所有设备通话记录', '140', '', '0', '/Apps/DeviceSystem/VDPLog/Main.aspx', '0', '', 'sysadm', 'sysadm', '2017-05-25 10:31:45'),
	(142, '特定设备通话纪录', '特定设备通话纪录', '140', '', '0', '/Apps/DeviceSystem/VDPLog/ByDevice.aspx', '0', '', 'sysadm', 'sysadm', '2017-05-25 10:31:50'),
	(148, '设备在线状态', '设备在线状态', '18', '', '0', '/Apps/DeviceSystem/DeviceStatus.aspx', '5', '', 'sysadm', 'sysadm', '2015-08-12 18:01:02'),
	(150, '150', 'IOT 设备管理', '17', '/Common/DMZ/Images/16x16/devices.png', '1', '', '2', '', 'sysadm', 'sysadm', '2016-06-15 23:01:39'),
	(151, 'IOTDevice', 'IOT设备', '150', '', '0', '/Apps/IOTDeviceSystem/DeviceList.aspx', '0', '', 'sysadm', 'sysadm', '2016-06-16 22:45:11'),
	(152, 'deviceRelease', '设备发布', '150', '', '0', '/Apps/IOTDeviceSystem/DevRelease.aspx', '0', '', 'sysadm', 'sysadm', '2017-05-25 10:32:19'),
	(155, '开门纪录', '开门纪录', '140', '', '0', '/Apps/DeviceSystem/VDPLog/Opendoorlog.aspx', '0', '', 'sysadm', 'sysadm', '2017-06-01 16:16:28'),
	(156, '系统备份', '系统备份', '23', '', '0', '/Apps/Common/DMZ/DBBackup.aspx', '5', '', 'sysadm', 'sysadm', '2017-07-25 13:28:20'),
	(157, '系统还原', '系统还原', '23', '', '0', '/Apps/Common/DMZ/DBRestore.aspx', '6', '', 'sysadm', 'sysadm', '2017-07-25 13:28:26'),
	(158, 'Mobilelist', '使用者管理', '150', '', '0', '/Apps/IOTDeviceSystem/MobileList.aspx', '4', '', 'sysadm', 'sysadm', '2017-08-25 10:13:49'),
	(159, 'IOTDeviceLog', 'IOT设备Log', '150', '', '0', '/Apps/IOTDeviceSystem/DeviceListLog.aspx', '3', '', 'sysadm', 'sysadm', '2017-07-28 16:43:04'),
	(160, 'SceneLog', '执行场景纪录', '150', '', '0', '/Apps/IOTDeviceSystem/SceneLog.aspx', '6', '', 'sysadm', 'sysadm', '2017-08-01 17:57:38');
/*!40000 ALTER TABLE `system_apps` ENABLE KEYS */;


-- 導出  表 cms_mini.system_attachment 結構
CREATE TABLE IF NOT EXISTS `system_attachment` (
  `ident` int(11) NOT NULL AUTO_INCREMENT,
  `obj_ident` varchar(50) NOT NULL DEFAULT '',
  `uploader_id` varchar(50) NOT NULL DEFAULT '',
  `url` varchar(1000) NOT NULL DEFAULT '',
  `file_name` varchar(255) NOT NULL DEFAULT '',
  `size` bigint(20) unsigned zerofill NOT NULL,
  `file_desc` varchar(255) NOT NULL DEFAULT '',
  `md5` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_attachment 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_attachment` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_attachment` ENABLE KEYS */;


-- 導出  表 cms_mini.system_building_area 結構
CREATE TABLE IF NOT EXISTS `system_building_area` (
  `Id` int(11) NOT NULL COMMENT '代號',
  `Name` varchar(45) NOT NULL COMMENT '區域名稱',
  `Enable` int(11) NOT NULL,
  `EditorId` varchar(45) NOT NULL COMMENT '編輯人Ident',
  `EditorName` varchar(45) NOT NULL COMMENT '編輯人',
  `EditDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '編輯日期',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='社區區域';

-- 正在導出表  cms_mini.system_building_area 的資料：~15 rows (大約)
/*!40000 ALTER TABLE `system_building_area` DISABLE KEYS */;
INSERT INTO `system_building_area` (`Id`, `Name`, `Enable`, `EditorId`, `EditorName`, `EditDateTime`) VALUES
	(1, '住宅区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(2, '游泳池', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(3, 'C 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(4, 'D 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(5, 'E 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(6, 'F 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(7, 'G 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(8, 'H 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(9, 'I 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(10, 'J 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(11, 'K 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(12, 'L 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(13, 'M 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(14, 'N 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16'),
	(15, 'O 区', 1, 'sysadm', 'sysadm', '2015-11-30 16:42:16');
/*!40000 ALTER TABLE `system_building_area` ENABLE KEYS */;


-- 導出  表 cms_mini.system_building_tree 結構
CREATE TABLE IF NOT EXISTS `system_building_tree` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(50) NOT NULL,
  `ParentIdent` int(11) NOT NULL,
  `Level` int(11) NOT NULL,
  `IsLeaf` int(11) NOT NULL DEFAULT '0',
  `AreaLabel` varchar(50) NOT NULL DEFAULT '',
  `MapSetting` int(11) NOT NULL DEFAULT '0',
  `Map` longblob,
  `MapContentType` varchar(50) NOT NULL DEFAULT '',
  `MapSize` varchar(50) NOT NULL DEFAULT '',
  `Location` varchar(255) NOT NULL DEFAULT '',
  `EditorId` varchar(50) NOT NULL,
  `EditorName` varchar(50) NOT NULL,
  `EditDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_building_tree 的資料：~1 rows (大約)
/*!40000 ALTER TABLE `system_building_tree` DISABLE KEYS */;
INSERT INTO `system_building_tree` (`Ident`, `Name`, `ParentIdent`, `Level`, `IsLeaf`, `AreaLabel`, `MapSetting`, `Map`, `MapContentType`, `MapSize`, `Location`, `EditorId`, `EditorName`, `EditDateTime`) VALUES
	(1, '全区', 1, 0, 0, '', 0, NULL, '', '', '', 'sysadm', 'sysadm', '2016-12-21 17:04:11');
/*!40000 ALTER TABLE `system_building_tree` ENABLE KEYS */;


-- 導出  表 cms_mini.system_building_tree_temp 結構
CREATE TABLE IF NOT EXISTS `system_building_tree_temp` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(50) NOT NULL,
  `ParentIdent` int(11) NOT NULL,
  `Level` int(11) NOT NULL,
  `IsLeaf` int(11) NOT NULL DEFAULT '0',
  `AreaLabel` varchar(50) NOT NULL DEFAULT '',
  `MapSetting` int(11) NOT NULL DEFAULT '0',
  `Map` longblob,
  `MapContentType` varchar(50) NOT NULL DEFAULT '',
  `MapSize` varchar(50) NOT NULL DEFAULT '',
  `Location` varchar(255) NOT NULL DEFAULT '',
  `EditorId` varchar(50) NOT NULL,
  `EditorName` varchar(50) NOT NULL,
  `EditDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_building_tree_temp 的資料：~1 rows (大約)
/*!40000 ALTER TABLE `system_building_tree_temp` DISABLE KEYS */;
INSERT INTO `system_building_tree_temp` (`Ident`, `Name`, `ParentIdent`, `Level`, `IsLeaf`, `AreaLabel`, `MapSetting`, `Map`, `MapContentType`, `MapSize`, `Location`, `EditorId`, `EditorName`, `EditDateTime`) VALUES
	(1, '全区', 1, 0, 0, '', 0, NULL, '', '', '', 'sysadm', 'sysadm', '2016-12-21 17:04:11');
/*!40000 ALTER TABLE `system_building_tree_temp` ENABLE KEYS */;


-- 導出  表 cms_mini.system_debug_log 結構
CREATE TABLE IF NOT EXISTS `system_debug_log` (
  `LogInfo` text NOT NULL,
  `LogTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_debug_log 的資料：~1 rows (大約)
/*!40000 ALTER TABLE `system_debug_log` DISABLE KEYS */;
INSERT INTO `system_debug_log` (`LogInfo`, `LogTime`) VALUES
	('RemoveDevice(刪除該類型設備)@192.168.0.222==>Delete From system_device_tree Where Code=\'270\' And SubCode=\'1\' And 3rdDevice=0', '2018-11-28 11:54:10');
/*!40000 ALTER TABLE `system_debug_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_alarm_log 結構
CREATE TABLE IF NOT EXISTS `system_device_alarm_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `MAC` varchar(30) NOT NULL,
  `Code` varchar(10) NOT NULL,
  `SubCode` varchar(5) NOT NULL,
  `ID` varchar(10) NOT NULL,
  `SubID` varchar(3) NOT NULL,
  `IP` varchar(50) NOT NULL,
  `AlarmNo` int(11) NOT NULL,
  `AlarmDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `Processed` int(11) NOT NULL DEFAULT '0',
  `Porcesser` varchar(50) NOT NULL DEFAULT '',
  `ProcessDateTime` datetime DEFAULT NULL,
  `ProcessDesc` varchar(255) NOT NULL DEFAULT '',
  `name` varchar(100) DEFAULT NULL,
  `mode` int(3) DEFAULT NULL,
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_alarm_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_device_alarm_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_device_alarm_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_belong_check 結構
CREATE TABLE IF NOT EXISTS `system_device_belong_check` (
  `ident` int(11) NOT NULL DEFAULT '0',
  `list` longtext,
  `DeviceID` varchar(8) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_belong_check 的資料：0 rows
/*!40000 ALTER TABLE `system_device_belong_check` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_device_belong_check` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_ehome_log 結構
CREATE TABLE IF NOT EXISTS `system_device_ehome_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '識別碼',
  `CellPhoneID` varchar(32) NOT NULL COMMENT '手機ID',
  `SceneName` varchar(32) NOT NULL COMMENT '情境名稱',
  `LogDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_ehome_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_device_ehome_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_device_ehome_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_info_log 結構
CREATE TABLE IF NOT EXISTS `system_device_info_log` (
  `MAC` varchar(50) DEFAULT NULL,
  `ID` varchar(50) DEFAULT NULL,
  `SubID` varchar(50) DEFAULT NULL,
  `ModelID` varchar(50) DEFAULT NULL,
  `ModelSubID` varchar(50) DEFAULT NULL,
  `IP` varchar(50) DEFAULT NULL,
  `LogTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_info_log 的資料：~2 rows (大約)
/*!40000 ALTER TABLE `system_device_info_log` DISABLE KEYS */;
INSERT INTO `system_device_info_log` (`MAC`, `ID`, `SubID`, `ModelID`, `ModelSubID`, `IP`, `LogTime`) VALUES
	('88:5D:90:99:89:29', 'Z0000001', '1', '250', '1', '192.168.0.76', '2019-07-12 15:25:17'),
	('88:5D:90:9E:6A:D1', 'Z0000001', '1', '270', '1', '192.168.100.100', '2019-07-12 15:25:46');
/*!40000 ALTER TABLE `system_device_info_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_json 結構
CREATE TABLE IF NOT EXISTS `system_device_json` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(50) NOT NULL,
  `UIText` varchar(50) NOT NULL,
  `ParentIdent` int(11) NOT NULL,
  `IsFolder` int(11) NOT NULL,
  `ObjType` int(11) NOT NULL,
  `Content` varchar(1000) NOT NULL,
  `DefaultValue` varchar(50) NOT NULL,
  `ObjDesc` varchar(1000) NOT NULL,
  `Sort` int(11) NOT NULL DEFAULT '99',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB AUTO_INCREMENT=431 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_json 的資料：~278 rows (大約)
/*!40000 ALTER TABLE `system_device_json` DISABLE KEYS */;
INSERT INTO `system_device_json` (`Ident`, `Name`, `UIText`, `ParentIdent`, `IsFolder`, `ObjType`, `Content`, `DefaultValue`, `ObjDesc`, `Sort`) VALUES
	(14, 'System', '系统参数', -1, 1, 0, '', '', '', 1),
	(15, 'Who', '设备识别', 14, 1, 0, '', '', '', 1),
	(16, 'Where', '设备位置', 14, 1, 0, '', '', '', 2),
	(17, 'ID', '标识符 ( 8码, 不足8码 请补 0)', 15, 0, 1, '', '', '', 1),
	(18, 'SubID', '识别子码', 15, 0, 1, '', '', '', 2),
	(19, 'ReportGroup', '巡检群组', 15, 0, 1, '', '', '', 3),
	(20, 'ReportID', '巡检标识符', 15, 0, 1, '', '', '', 4),
	(21, '_MAC', 'MAC', 15, 0, 1, '', '', 'ReadOnly', 12),
	(22, '_Model', '型号', 15, 0, 1, '', '', 'ReadOnly', 13),
	(23, '_ModelID', '型号代码', 15, 0, 1, '', '', 'ReadOnly', 14),
	(24, '_ModelSubID', '型号子代码', 15, 0, 1, '', '', 'ReadOnly', 15),
	(26, '_SW_R1_Version', '软件R1版本', 15, 0, 1, '', '', 'ReadOnly', 16),
	(27, '_SW_R2_Version', '软件R2版本', 15, 0, 1, '', '', 'ReadOnly', 17),
	(28, '_DB_Version', '数据库版本', 15, 0, 1, '', '', 'ReadOnly', 18),
	(30, 'Rule', '编码原则', 16, 0, 1, '', '', '', 99),
	(31, 'UnitText', '单元文字', 16, 1, 5, '', '', '"区","栋","楼"...等等', 99),
	(34, 'DoorContacts', '门口机呼叫清单', -1, 1, 4, '', '', '', 7),
	(35, '', '', 34, 1, 6, '', '', '', 99),
	(36, 'Name', '设备别名', 35, 0, 1, '', '', '', 99),
	(37, 'ID', '标识符', 35, 0, 1, '', '', '', 99),
	(38, 'SubID', '识别子码', 35, 0, 1, '', '', '', 99),
	(40, 'InDoorContacts2Level', '室内机呼叫清单(2阶)', -1, 1, 4, '', '', '', 9),
	(41, '', '', 40, 1, 6, '', '', '', 99),
	(43, 'CameraContacts', '公共摄影机清单', -1, 1, 4, '', '', '', 8),
	(44, '', '', 43, 1, 6, '', '', '', 99),
	(53, 'HomeSecurity', '家居布防', -1, 1, 0, '', '', '', 2),
	(54, 'SecurityPWD', '用户安防密码', 53, 0, 1, '', '0000', 'Pass****', 1),
	(55, 'CommunityPWD', '小区密码', 53, 0, 1, '', '9999', '', 2),
	(56, 'Zones', '防区', 53, 1, 4, '', '', 'ZONE1~8', 3),
	(57, '', '', 56, 1, 6, '', '', '', 99),
	(61, 'Type', '属性 [ 0:无, 1:门延, 2:紧急, 3:24, 4:盗立, 5:盗PIR, 6:门铃 ]', 57, 0, 2, '无作用#0@大门延迟区#1@紧急求救#2@24小时防区#3@盗警立即防区#4@盗警PIR防区#5@门铃#6', '0', '', 99),
	(62, 'Logic', '逻辑 [ 0：N.O, 1：N.C ]', 57, 0, 2, 'N.O#0@N.C#1', '0', '', 99),
	(63, 'Status', '状态 [ 0：正常, 1：静音, 2：停用 ]', 57, 0, 2, '正常#0@静音#1@停用#2', '0', '', 99),
	(67, 'Setting', '设定', 53, 1, 0, '', '', '', 7),
	(68, 'EnableVisitorMusic', '来客提示音', 67, 0, 2, 'OFF#0@ON#1', '0', '', 1),
	(69, 'VisitorMusic', '提示音曲目', 67, 0, 2, 'Doorbell 01#0@Doorbell 02#1@Doorbell 03#2@Doorbell 04#3@Doorbell 05#4', '0', '', 2),
	(71, 'VisitorMusicVolume', '提示音音量', 67, 0, 2, '低#0@中#1@高#2', '0', '', 4),
	(72, 'VisitorMusicAutoMute', '提示音自动静音(10PM~6AM)', 67, 0, 2, 'OFF#0@ON#1', '0', '', 5),
	(73, 'SirenSec', 'SIREN喇叭声音秒数', 67, 0, 2, '30秒#0@60秒#1@120秒#2@180秒#3', '0', '', 6),
	(74, 'VoiceGuide', '自动语音提示', 67, 0, 2, 'OFF#0@提示语音#1@提示音#2', '1', '', 7),
	(75, 'EmergencySilent', '紧急求救按钮警报音', 67, 0, 2, '静音#0@警报音#1', '0', '', 8),
	(76, 'AlarmOff', '中止警报音', 67, 0, 2, '不需要密码#0@需要密码#1', '0', '', 9),
	(77, 'SendAlarmToAdmin', 'AC 故障传送到管理员机', 67, 0, 2, 'OFF#0@ON#1', '0', '', 10),
	(78, 'AwaySec', '布防延迟时间', 67, 0, 2, '30秒#0@45秒#1@90秒#2@135秒#3@180秒#4', '0', '', 11),
	(79, 'AwayVoiceGuide', '布防延迟提示语音', 67, 0, 2, 'OFF#0@提示语音#1', '1', '', 12),
	(80, 'HomeSec', '撤防延迟时间', 67, 0, 2, '30秒#0@45秒#1@90秒#2@135秒#3@180秒#4', '0', '', 13),
	(81, 'HomeVoiceGuide', '撤防延迟提示语音', 67, 0, 2, 'OFF#0@提示语音#1', '1', '', 14),
	(82, 'PowerBreakDebounce', '停断电布防恢复时间', 67, 0, 2, '30秒#0@60秒#1@90秒#2', '0', '', 15),
	(83, 'Tamper', '防拆警报', 67, 0, 2, 'OFF#0@触发通知#1', '0', '', 16),
	(84, 'ZoneTR', '防区终端电阻', 67, 0, 2, '无终端电阻#0@终端电阻3.6K#1@终端电阻2.2K#2', '0', '', 17),
	(85, 'ARMINType', 'ARMIN 装置设定', 67, 0, 2, '无作用#0@大门延迟区#1@紧急求救#2@24小时防区#3@盗警立即防区#4@盗警PIR防区#5@外部副控密码锁#6', '0', '', 18),
	(86, 'ARMINAllow', '外部布撤防装置设定', 67, 0, 2, '允许布防#0@允许布防撤防#1', '0', '', 19),
	(87, 'ARMINLogic', 'ARMIN N.O/N.C', 67, 0, 2, 'N.O#0@N.C#1', '0', '', 20),
	(88, 'AbnormalArm', '防区触发允许布防', 67, 0, 2, '不允许#0@允许#1', '1', '', 21),
	(89, 'IndoorTriggerOutput', '室内机移报点输出', 67, 0, 2, '警报喇叭#0@住户门口机电锁控制#1@室内机呼叫电梯控制#2', '0', '', 22),
	(90, 'AccessControl', '门禁监控', -1, 1, 0, '', '', '', 3),
	(91, 'Lift', '电梯 & 住户门口机 & 飞比网关', 90, 1, 0, '', '', '', 99),
	(93, 'IndoorIntercom', '室内对讲', -1, 1, 0, '', '', '', 4),
	(94, 'Setting', '组态设定', 93, 1, 0, '', '', '', 99),
	(97, 'IndoorBell', '室内对讲铃声', 94, 0, 2, 'Doorbell 01#0@Doorbell 02#1@Doorbell 03#2@Doorbell 04#3@Doorbell 05#4@Doorbell 06#5@Doorbell 07#6@Doorbell 08#7@Doorbell 09#8@Doorbell 10#9@自定义MP3#10', '0', '', 3),
	(98, 'DoorBell', '门铃/住户门口机铃声', 94, 0, 2, 'Doorbell 01#0@Doorbell 02#1@Doorbell 03#2@Doorbell 04#3@Doorbell 05#4@Doorbell 06#5@Doorbell 07#6@Doorbell 08#7@Doorbell 09#8@Doorbell 10#9@自定义MP3#10', '0', ' ', 5),
	(99, 'IndoorVolume', '室内机铃声音量', 94, 0, 2, '低#0@中#1@高#2', '2', '', 4),
	(100, 'DoorVolume', '门铃/住户门口机铃声音量', 94, 0, 2, '低#0@中#1@高#2', '2', '', 6),
	(101, 'General', '基本设定', -1, 1, 0, '', '', '', 5),
	(102, 'HomePage', '首页设定', 101, 1, 0, '', '', '', 99),
	(103, 'MessageMusic', '讯息提示声', 102, 0, 2, 'OFF#0@ON#1', '1', '', 2),
	(104, 'TouchActionSound', '触碰面板时回馈音', 102, 0, 2, 'OFF#0@ON#1', '1', '', 3),
	(105, 'NeighborCall', '允许邻居呼叫', 102, 0, 2, '不允许#0@允许#1', '1', '', 4),
	(106, 'HourlyChime', '整点报时', 102, 0, 2, 'OFF#0@咕咕钟#1@整点报时#2', '0', '', 5),
	(107, 'Backlight', '屏幕亮度', 102, 0, 2, '小亮#0@中亮#1@大亮#2', '1', '', 6),
	(108, 'ScreensaverMode', '屏幕保护模式', 102, 0, 2, '关掉背光#0@3D动画#1@系统图片(静音模式)#2@系统影片#3@首页#4@SD图片#5@SD影片#6', '2', '', 7),
	(109, 'MemoVideo', '自动影音储存', 102, 0, 2, 'OFF#0@ON#1', '0', '', 8),
	(117, 'CameraType', '摄像头', 102, 0, 2, 'NTSC#0@PAL#1', '0', '', 9),
	(118, 'UiLanguage', '语系', 102, 0, 2, 'ZH 繁中#0@CN 简中#1', '1', '', 10),
	(119, 'TimeFormat', '时间制式', 102, 0, 2, '12 小时制#0@24 小时制#1', '0', '', 11),
	(120, 'RemoteAlarmControl', '远程alarm操作', 102, 0, 2, 'OFF#0@ON#1', '0', '', 12),
	(121, 'BellSetting', '铃声设定', 101, 1, 0, '', '', '', 99),
	(122, 'BellForAdmin', '铃声(管理员机呼叫)', 121, 0, 2, 'Doorbell 01#0@Doorbell 02#1@Doorbell 03#2@Doorbell 04#3@Doorbell 05#4@Doorbell 06#5@Doorbell 07#6@Doorbell 08#7@Doorbell 09#8@Doorbell 10#9@自定义MP3#10', '0', '', 1),
	(123, 'BellForNeighbor', '铃声(邻居呼叫)', 121, 0, 2, 'Doorbell 01#0@Doorbell 02#1@Doorbell 03#2@Doorbell 04#3@Doorbell 05#4@Doorbell 06#5@Doorbell 07#6@Doorbell 08#7@Doorbell 09#8@Doorbell 10#9@自定义MP3#10', '0', ' ', 3),
	(124, 'Volume', '对讲音量', 121, 0, 2, '1#0@2#1@3#2@4#3@5#4', '2', '', 6),
	(125, 'BellSec', '响铃时间', 121, 0, 2, '15 sec#0@20 sec#1@30 sec#2', '1', '', 7),
	(126, 'PhoneSec', '通话时间', 121, 0, 2, '30 sec#0@60 sec#1@90 sec#2', '1', '', 8),
	(127, 'AdminContacts', '管理员呼叫清单', -1, 1, 4, '', '', '', 6),
	(128, '', '', 127, 1, 6, '', '', '', 99),
	(129, 'Name', '设备别名', 128, 0, 1, '', '', '', 99),
	(130, 'ID', '标识符', 128, 0, 1, '', '', '', 99),
	(131, 'SubID', '识别子码', 128, 0, 1, '', '', '', 99),
	(133, 'Name', '设备别名', 44, 0, 1, '', '', '', 99),
	(134, 'ID', '设备码', 44, 0, 1, '', '', '', 99),
	(135, 'SubID', '设备子码', 44, 0, 1, '', '', '', 99),
	(140, 'IP', 'IP Address', 15, 0, 1, '', '', '', 6),
	(141, 'SubMask', '子网掩码', 15, 0, 1, '', '', '', 7),
	(146, 'List', '清单', 41, 0, 1, '', '', '1A01####,1A010201,1A010202,1A010203', 99),
	(147, '_SW_Version', '软件版本', 15, 0, 1, '', '', '', 19),
	(148, 'Manager', 'PMA6000 设定参数', -1, 1, 0, '', '', '', 99),
	(149, 'Sysdoorphone', 'PDV 设定参数', -1, 1, 0, '', '', '', 99),
	(153, 'IndoorMusicIndex', '室内机铃声选取', 148, 0, 2, 'Music 1#0@Music 2#1@Music 3#2@Music 4#3@Music 5#4@Music 6#5@Music 7#6@Music 8#7@Music 9#8@Music 10#9', '', '', 99),
	(154, 'SysdoorphoneMusicIndex', '门口机铃声选取', 148, 0, 2, 'Music 1#0@Music 2#1@Music 3#2@Music 4#3@Music 5#4@Music 6#5@Music 7#6@Music 8#7@Music 9#8@Music 10#9', '', '', 99),
	(155, 'ManagerMusicIndex', '管理员机铃声选取', 148, 0, 2, 'Music 1#0@Music 2#1@Music 3#2@Music 4#3@Music 5#4@Music 6#5@Music 7#6@Music 8#7@Music 9#8@Music 10#9', '', '', 99),
	(156, 'BellVolume', '铃声音量', 148, 0, 2, '0#0@1#1@2#2@3#3@4#4@5#5@6#6@7#7@8#8@9#9@10#10', '', '0~10', 99),
	(157, 'IntercomVolume', '对讲音量', 148, 0, 2, '0#0@1#1@2#2@3#3@4#4@5#5@6#6@7#7@8#8@9#9@10#10@11#11@12#12@13#13@14#14@15#15', '', '0~15', 99),
	(158, 'IntercomTimer', '通话时间', 148, 0, 2, '30 sec#0@60 sec#1@90 sec#2@120 sec#3@150 sec#4@180 sec#5', '', '', 99),
	(159, 'LockerStartTime', '电锁启动时间', 148, 0, 2, '1 sec#1@2 sec#2@3 sec#3@4 sec#4@5 sec#5@6 sec#6@7 sec#7@8 sec#8@9 sec #9@10 sec#10', '', '', 99),
	(160, 'LockerStatusType', '电锁门状态开关', 148, 0, 2, 'NO断电开锁#0@NO供电开锁#1@NC断电开锁#2@NC供电开锁#3', '', '', 99),
	(161, 'Deploy', '布防设定记录(布撤防)', 148, 0, 2, 'OFF#0@ON#1', '', '', 99),
	(162, 'AlarmCheckMachineID', '警报是否检查机码', 148, 0, 2, 'OFF#0@ON#1', '', '', 99),
	(163, 'AlarmAck', '警报是否响应', 148, 0, 2, 'OFF#0@ON#1', '', '', 99),
	(164, 'AlarmPlaySoundTime', '报警音输出时间', 148, 0, 2, '30 sec#0@60 sec#1@90 sec#2@120 sec#3@150 sec#4@180 sec#5', '', '', 99),
	(165, 'AlarmPlaySoundVolume', '报警音音量', 148, 0, 2, '1#1@2#2@3#3@4#4@5#5@6#6@7#7@8#8@9#9@10#10@11#11@12#12@13#13@14#14@15#15', '', '1~15', 99),
	(166, 'ManagerPassword', '管理员机密码(4~8码,0~9, A~J)', 148, 0, 1, '', '0000', 'Pass****', 99),
	(167, 'OpenDoorAlarmTime', '开门警报时间', 148, 0, 2, '30 sec#0@60 sec#1@90 sec#2@120 sec#3@150 sec#4@180 sec#5', '', '', 99),
	(168, 'AlarmRange', '呼叫/警报范围01~30 ( 8码,0~9, A~J, # )', 148, 1, 5, '', '', '输入范围: 0~9, A~J, #', 99),
	(169, 'Screensaver', '屏幕保护模式', 149, 0, 2, '关掉背光#0@影片播放#1@首页#2@欢迎光临#3', '', '', 2),
	(170, 'VoicePrompt', '语音提示', 149, 0, 2, 'OFF#0@ON#1', '', '', 3),
	(171, 'VoiceLeadPrompt', '语音导引提示', 149, 0, 2, 'OFF#0@ON#1', '', '', 4),
	(172, 'VoicePromptVolume', '语音提示音量', 149, 0, 2, '0#0@1#1@2#2@3#3@4#4@5#5@6#6@7#7@8#8@9#9@10#10@11#11@12#12@13#13@14#14@15#15', '', '', 5),
	(173, 'SensitivePIR', 'PIR感应灵敏度', 149, 0, 2, 'OFF#0@Level-1 远#1@Level-2 中#2@Level-3 近#3', '', '', 6),
	(174, 'VideoVolume', '影片播放音量', 149, 0, 2, '0#0@1#1@2#2@3#3@4#4@5#5@6#6@7#7@8#8@9#9@10#10@11#11@12#12@13#13@14#14@15#15', '', '', 7),
	(175, 'PreviewEnable', '显示预览画面', 149, 0, 2, 'OFF#0@ON#1', '', '', 8),
	(176, 'FixedID', '固码设定( 8 码, 0~9, A~J, # )', 149, 0, 1, '', '', '', 9),
	(177, 'BellVolume', '铃声音量', 149, 0, 2, '0#0@1#1@2#2@3#3@4#4@5#5@6#6@7#7@8#8@9#9@10#10@11#11@12#12@13#13@14#14@15#15', '', '', 10),
	(178, 'IntercomVolume', '对讲音量', 149, 0, 2, '1#1@2#2@3#3@4#4@5#5', '', '', 11),
	(179, 'IntercomTimer', '通话时间', 149, 0, 2, '30 sec#0@60 sec#1@90 sec#2@120 sec#3@150 sec#4@180 sec#5', '', '', 12),
	(180, 'LockerStartTime', '电锁启动时间', 149, 0, 2, '1 sec#1@2 sec#2@3 sec#3@4 sec#4@5 sec#5@6 sec#6@7 sec#7@8 sec#8@9 sec#9@10 sec#10', '', '', 13),
	(181, 'NoResponeToAdmin', '没响应时, 转接管理室', 149, 0, 2, 'OFF#0@ON#1', '', '', 14),
	(182, 'WiegandType', 'WIEGAND 型式', 149, 0, 2, 'W34_B0b0#0@W34_B0b7#1@W34_B3b0#2@W34_B3b7#3@W26_B0b0#4@W26_B0b7#5@W26_B3b0#6@W26_B3b7#7@W40_B0b0#8@W40_B0b7#9@W40_B3b0#10@W40_B3b7#11', '', '', 15),
	(183, 'OpenDoorByPassword', '使用密码开门', 149, 0, 2, 'OFF#0@ON#1', '', '', 16),
	(184, 'AntiPassword', '反胁迫密码( 7码, 0~9, A~J )', 149, 0, 1, '', '', 'Pass****', 17),
	(185, 'Password', '开门密码( 7码, 0~9, A~J )', 149, 0, 1, '', '', 'Pass****', 18),
	(186, 'OpenDoorAlarmTime', '开门警报时间', 149, 0, 2, '30 sec#0@60 sec#1@90 sec#2@120 sec#3@150 sec#4@180 sec#5', '', '', 19),
	(198, 'LocationWeather', '天气区域代号(1~169)', 149, 0, 1, '', '', '', 1),
	(199, 'BellForDoor', '铃声(系统门口机呼叫)', 121, 0, 2, 'Doorbell 01#0@Doorbell 02#1@Doorbell 03#2@Doorbell 04#3@Doorbell 05#4@Doorbell 06#5@Doorbell 07#6@Doorbell 08#7@Doorbell 09#8@Doorbell 10#9@自定义MP3#10', '', '', 2),
	(200, 'VolumeDoorbell', '来电铃声音量大小', 121, 0, 2, '0#0@1#1@2#2@3#3@4#4@5#5@6#6@7#7@8#8@9#9@10#10', '', '', 4),
	(201, 'MuteDoorbell', '来电静音与否', 121, 0, 2, '非静音#0@静音#1', '', '', 5),
	(202, 'Count', '电梯数量', 91, 0, 2, '无#0@1台#1@2台#2@3台#3@4台#4', '', '', 99),
	(203, 'CardAction', '住户门口机刷卡动作', 91, 0, 2, '布撤防#0@开门#1', '', '', 99),
	(204, 'ReleaseHouseholdDoorSec', '住户门口机开门秒数', 91, 0, 2, '1 sec#1@2 sec#2@3 sec#3@4 sec#4@5 sec#5@6 sec#6@7 sec#7@8 sec#8@9 sec#9@10 sec#10', '', '', 99),
	(205, 'IndoorCount', '室内机数量 (含主机)', 94, 0, 2, '1 台#1@2 台#2@3 台#3@4 台#4', '', '', 1),
	(206, 'DoorCount', '住户门口机数量', 94, 0, 2, '无#0@1 台#1@2 台#2@3 台#3@4 台#4@5 台#5@6 台#6@7 台#7@8 台#8@9台#9@10 台#10@11 台#11@12 台#12@13 台#13@14 台#14@15 台#15@16 台#16@17 台#17@18 台#18@19 台#19', '', '', 2),
	(207, 'ExitModeBypass', '离家模式 - 0: 关闭(bypass), 1:开启 [ ZONE1~8, ARMIN ]', 53, 1, 5, '', '', '', 4),
	(208, 'IndoorModeBypass', '居家模式 - 0: 关闭(bypass), 1:开启 [ ZONE1~8, ARMIN ]', 53, 1, 5, '', '', '', 5),
	(209, 'SleepModeBypass', '就寝模式 - 0: 关闭(bypass), 1:开启 [ ZONE1~8, ARMIN ]', 53, 1, 5, '', '', '', 6),
	(210, 'VisitorMusicRepeat', '提示音播放次数', 67, 0, 2, '1 次#1@2 次#2', '', '', 3),
	(211, 'FeibitIP', '飞比网关 IP', 91, 0, 1, '', '192.168.0.1', '', 99),
	(212, 'MifareSetting', '刷卡参数设定', -1, 1, 0, '', '', '', 99),
	(217, 'CmsOpenDoorScheme', 'CMS开门机制', 212, 0, 2, '离线(编码原则)#0@离线(刷卡范围)#1@在线#2', '', '', 1),
	(218, 'MifareHouseholder', 'MIFARE住户卡', 212, 0, 2, 'OFF#0@ON#1', '', '', 2),
	(219, 'MifareAdmin', 'MIFARE管理员卡', 212, 0, 2, 'OFF#0@ON#1', '', '', 3),
	(220, 'MifareVisitor', 'MIFARE访客卡', 212, 0, 2, 'OFF#0@ON#1', '', '', 4),
	(221, 'MifarePeriod', 'MIFARE周期卡', 212, 0, 2, 'OFF#0@ON#1', '', '', 5),
	(222, 'MifarePatrol', 'MIFARE巡逻卡', 212, 0, 2, 'OFF#0@ON#1', '', '', 6),
	(223, 'MifarePatrolOpenDoor', 'MIFARE巡逻卡开门', 212, 0, 2, 'OFF#0@ON#1', '', '', 7),
	(224, 'MifareArea', 'MIFARE区域 1~15 ( 1:ON  或 0: OFF )', 212, 1, 5, '', '', '', 8),
	(225, 'MifareApply', 'MIFARE套用区域', 212, 0, 2, 'OFF#0@ON#1', '', '', 9),
	(226, 'CommunityServiceUrl', '小区网址', 102, 0, 1, '', '', '', 1),
	(227, 'MifareCallRange', '刷卡范围', 212, 1, 5, '', '', '', 10),
	(228, '5700Param', '5700Param', -1, 1, 0, '', '', '5700参数', 99),
	(229, 'CallType', 'CallType', 228, 0, 2, 'SIP Mode#0@VDP Mode#1', '1', '', 3),
	(231, 'SIPMODE', 'SIPMODE', 228, 0, 2, 'Server Mode#0@P2P Mode#1@Tutk Mode#2', '1', '', 4),
	(232, 'ModeType', 'ModeType', 228, 0, 2, '住户门口机#0@紧急门口机#1@SIP摄影机#2', '0', '', 1),
	(233, 'CallNumber', 'CallNumber', 228, 0, 1, '', '3001', 'SIP呼叫账号', 8),
	(234, 'SIPServer', 'SIPServer', 228, 0, 1, '', '192.168.0.170', 'SIPServer IP Address', 5),
	(235, 'SIPUser', 'SIPUser', 228, 0, 1, '', '3005', 'SIP账号', 6),
	(236, 'SIPPass', 'SIPPass', 228, 0, 1, '', 'giga3005', 'SIP密码', 7),
	(237, 'TEMPMode', 'TEMPMode', 228, 0, 2, '防拆开关#0@门状态#1@门位置侦测#2', '0', '', 9),
	(238, 'PANMode', 'PANMode', 228, 0, 2, '紧急求救开关#0@内部外出开门开关#1@紧急求救开关+呼管理机#2', '0', '', 10),
	(239, 'SIRTime', 'SIRTime', 228, 0, 3, '0@999', '60', '', 11),
	(240, 'ModelSubID', 'ModelSubID', 228, 0, 2, 'PDV5700#1@PDV5600#2@PDV2000#3@PDV2500#4@PCM2200#5', '1', '', 2),
	(241, 'ExitOpenTime', 'ExitOpenTime', 228, 0, 3, '0@99', '3', '外出开门', 12),
	(245, 'DtmfUnlock', 'DtmfUnlock', 228, 0, 2, '0#0@1#1@2#2@3#3@4#4@5#5@6#6@7#7@8#8@9#9@*#10', '9', '', 13),
	(246, 'GateWay', '默认网关', 15, 0, 1, '', '', '', 8),
	(247, 'DHCP', 'DHCP', 15, 0, 2, 'Disable#0@Enable#1', '1', '', 5),
	(248, 'IPCam', '监视器', 228, 0, 2, 'Disable#0@Enable#1', '', '', 14),
	(249, 'PBV4180Param', 'PBV4180Param', -1, 1, 0, '', '', '', 99),
	(312, 'WorkMode', '工作模式', 249, 0, 2, '楼层开放#1@业主呼梯#2@访客呼梯#3@楼层显示#4', '1', '', 99),
	(313, 'FloorScope', '楼层范围', 249, 0, 2, '1-16楼#0@17-32楼#1@33-48楼#2@49-64楼#3@65-80楼#4@81-96楼#5@97-112楼#6', '0', '', 99),
	(314, 'FilterRule', '呼梯条件(筛选代码,最多30笔,0~9,A~Z,&楼层代码,#不需比对', 249, 1, 5, '', '', '', 99),
	(315, 'Floor', '楼层开放信息(最多10组)', 249, 1, 4, '', '', '', 99),
	(316, '', '', 315, 1, 6, '', '', '', 99),
	(317, 'cID', '门口机ID', 316, 0, 1, '', '', '', 1),
	(318, 'cSubID', '门口机子码(SubID)', 316, 0, 1, '', '', '', 2),
	(321, 'cSec', '控制秒数', 316, 0, 1, '', '', '', 5),
	(322, 'uCtrlSec', '业主呼梯-控制秒数', 249, 0, 1, '', '', '', 99),
	(323, 'VMachine', '访客呼梯信息(最多10组)', 249, 1, 4, '', '', '', 99),
	(324, '', '', 323, 1, 6, '', '', '', 99),
	(325, 'vID', '门口机ID', 324, 0, 1, '', '', '', 1),
	(326, 'vSubID', '门口机子码(SubID)', 324, 0, 1, '', '', '', 2),
	(329, 'vSec', '控制秒数', 324, 0, 1, '', '', '', 5),
	(330, 'CtrlPoint', '输出接点(最多10点,中间用逗号区隔,ex:1,2,3,4,5)', 324, 0, 1, '', '', '', 6),
	(331, 'cMID', '门口机型号', 316, 0, 2, 'PDV5700#1@PDV5600#2@PDV2000#3@PDV2500#4@PDV4101#5@PDV4121#6@PDV1501#7@PDV1511#8', '5', '', 3),
	(333, 'vMID', '门口机型号', 324, 0, 2, 'PDV5700#1@PDV5600#2@PDV2000#3@PDV2500#4@PDV4101#5@PDV4121#6@PDV1501#7@PDV1511#8', '5', '', 3),
	(334, 'SoundEnable', 'SoundEnable', 245, 0, 2, 'disable#0@enable#1', '0', '', 99),
	(335, 'MusicEnable', '背景音乐广播', 228, 0, 2, 'Disable#0@Enable#1', '0', '', 16),
	(336, 'VoiceEnable', '语音广播', 228, 0, 2, 'Disable#0@Enable#1', '0', '', 17),
	(337, '_BOOT_Version', 'Boot服务版本', 15, 0, 1, '', '', '', 20),
	(338, '_SIP_Version', 'SIP服务版本', 15, 0, 1, '', '', '', 21),
	(339, 'CommonUser', 'phv7102使用者常用设定', -1, 1, 0, '', '', '', 99),
	(340, 'ZoneAlias', '防区别名', 339, 1, 5, '', '', '', 99),
	(341, 'OutdoorMode', '离家模式防区启用', 339, 1, 5, '', '', '', 99),
	(342, 'IndoorMode', '居家模式防区启用', 339, 1, 5, '', '', '', 99),
	(343, 'SleepMode', '睡眠模式防区启用', 339, 1, 5, '', '', '', 99),
	(344, 'NeighborCall', '是否允许邻居呼叫', 339, 0, 2, '不允许#0@允许#1', '0', '', 99),
	(345, 'PtoMusic', '来客报知音乐', 339, 0, 2, 'Music1#0@Music2#1@Music3#2@Music4#3@Music5#4@Music6#5@Music7#6@Music8#7', '0', '', 99),
	(346, 'PtoMusicRepeat', '来客报知音乐次数', 339, 0, 2, '无#0@1次#1@2次#2', '1', '', 99),
	(347, 'PtoMusicVol', '来客报知音乐音量', 339, 0, 2, '最小#0@10%#1@20%#2@30%#3@40%#4@50%#5@60%#6@70%#7@80%#8@90%#9@最大#10', '5', '', 99),
	(348, 'PtoMute', '夜间自动静音', 339, 0, 2, '否#0@是#1', '0', '', 99),
	(349, 'IncomingMusic', '来电音乐', 339, 0, 2, '音乐1#0@音乐2#1@音乐3#2', '0', '', 99),
	(350, 'IncomingVol', '来电音乐音量', 339, 0, 2, '最小#0@10%#1@20%#2@30%#3@40%#4@50%#5@60%#6@70%#7@80%#8@90%#9@最大#10', '5', '', 99),
	(351, 'DoNotDisturbMode', '勿打扰模式', 339, 0, 2, '正常模式#0@静音模式#1@全时勿扰#2', '0', '', 99),
	(353, 'IndoorSecu', '室内机布防设定(简易版)', -1, 1, 0, '', '', '', 99),
	(354, 'ArmDelaySec', '布防延迟秒数', 353, 0, 2, '30秒#0@45秒#1@90秒#2@135秒#3@180秒#4', '0', '', 99),
	(355, 'ArmDelayNotice', '布防延迟提示音', 353, 0, 2, '静音#0@警报音#1', '1', '', 99),
	(356, 'DisArmDelaySec', '撤防延迟秒数', 353, 0, 2, '30秒#0@45秒#1@90秒#2@135秒#3@180秒#4', '0', '', 99),
	(357, 'DisArmDelayNotice', '撤防延迟提示音', 353, 0, 2, '静音#0@警报音#1', '1', '', 99),
	(358, 'SirenSec', '喇叭秒数', 353, 0, 2, '30秒#0@60秒#1@90秒#2', '0', '', 99),
	(359, 'TalkTimeMode', '通话时间', 353, 0, 2, '15/30#0@20/60#1@30/90#2', '2', '', 99),
	(360, 'PanicNotice', '紧急求救警报音', 353, 0, 2, '静音#0@警报音#1', '1', '', 99),
	(361, 'DeployRecoverySec', '停断电防区恢复时间', 353, 0, 2, '30秒#0@60秒#1@90秒#2', '0', '', 99),
	(362, 'TamperAlarm', '防拆警报', 353, 0, 2, '无#0@警报#1', '0', '', 99),
	(363, 'ZoneTr', '防区终端电阻', 353, 0, 2, '无终端电阻#0@3.6K#1@2.2K#2', '0', '', 99),
	(364, 'ArminType', 'Armin装置', 353, 0, 2, '无作用#0@大门延迟防区#1@紧急求救按钮#2@24小时防区#3@盗警立即防区#4@盗警PPIR防区#5@外部副控密码锁#6', '0', '', 99),
	(365, 'ArminNoNc', 'Armin No/Nc', 353, 0, 2, 'NO#0@NC#1', '0', '', 99),
	(366, 'HHController', '外部布撤防装置设定', 353, 0, 2, '允许布防#0@布防撤防#1', '0', '', 99),
	(367, 'StopAlarmByPw', '解除警报密码', 353, 0, 2, '不需要#0@需要#1', '0', '', 99),
	(368, 'AcFailReport', 'AC故障通知管理员机', 353, 0, 2, '不需要#0@需要#1', '0', '', 99),
	(369, 'DeployWhenTrigger', '防区触发允许布防', 353, 0, 2, '不允许#0@允许#1', '1', '', 99),
	(370, 'ArmSt', '室内机移报点输出', 353, 0, 2, '警报喇叭#0@门口机电锁#1@呼叫电梯#2', '0', '', 99),
	(371, 'HHCardAction', '住户门口机刷卡动作', 353, 0, 2, '布撤防#0@开门#1', '1', '', 99),
	(372, 'HHLockerSec', '住户门口机开锁时间', 353, 0, 2, '1秒#1@2秒#2@3秒#3@4秒#4@5秒#5@6秒#6@7秒#7@8秒#8@9秒#9@10秒#10', '1', '', 99),
	(373, 'Brightness', '亮度', 353, 0, 2, '最小#0@10%#1@20%#2@30%#3@40%#4@50%#5@60%#6@70%#7@80%#8@90%#9@最大#10', '8', '', 99),
	(374, 'ScreensaverMode', '屏幕保护模式', 353, 0, 2, '无#0@时钟#1@黑屏#2', '1', '', 99),
	(375, 'ScreensaverTime', '屏幕保护时间', 353, 0, 2, '1分钟#0@2分钟#1@3分钟#2', '0', '', 99),
	(376, 'UserPassword', '用户密码', 353, 0, 1, '', '0000', '', 99),
	(377, 'EngrPassword', '工程密码', 353, 0, 1, '', '9194739', '', 99),
	(378, 'Zones', '防区属性', 353, 1, 4, '', '', '', 99),
	(379, '', '', 378, 1, 6, '', '', '', 99),
	(380, 'Type', '防区属性', 379, 0, 2, '无作用#0@大门延迟防区#1@紧急求救按钮#2@24小时防区#3@盗警立即防区#4@盗警PIR防区#5@门铃#6', '0', '', 99),
	(381, 'Logic', 'NO/NC', 379, 0, 2, 'NO#0@NC#1', '0', '', 99),
	(382, 'Status', '状态', 379, 0, 2, '正常#0@静音#1@停用#2', '0', '', 99),
	(383, 'AdminId', '默认管理员机id', 353, 0, 1, '', '12345678', '', 99),
	(384, 'AdminSubId', '默认管理员机subid', 353, 0, 1, '', '1', '', 99),
	(385, 'Password', '网页登入密码', 15, 0, 1, '', 'admin', '', 22),
	(386, 'Resolution', 'Resolution', 228, 0, 2, '480X640(10 fps)#0@640X360(10 fps)#1@1280X720(8 fps)#2', '0', '', 15),
	(387, 'PML1000Param', 'PML1000Param', -1, 1, 0, '', '', '', 99),
	(388, 'DI_Name', '16组DI别名设定', 387, 1, 5, '', '', '长度 < 14', 99),
	(389, 'DO_Name', '16组DO别名设定', 387, 1, 5, '', '', '长度 < 14', 99),
	(392, '_IOTQRData', 'IOT QRCode Data', 15, 0, 1, '', '', 'ReadOnly', 11),
	(393, 'System', 'System', -1, 1, 0, '', '', '', 99),
	(394, 'System', 'System', -1, 1, 0, '', '', '', 99),
	(395, '_HW_Version', '硬件版本', 15, 0, 1, '', '', ' ReadOnly', 23),
	(396, 'Community', '小区网', 14, 1, 0, '', '', '', 99),
	(397, 'DHCP', 'DHCP', 396, 0, 2, 'Disable#0@Enable#1', '1', '', 99),
	(398, 'IP', 'IP Address', 396, 0, 1, '', '', '', 99),
	(399, 'SubMask', '子网掩码', 396, 0, 1, '', '', '', 99),
	(400, '_MAC', 'MAC', 396, 0, 1, '', '', 'ReadOnly', 99),
	(401, 'PGW1000Param', 'PGW1000Param', -1, 1, 0, '', '', '', 99),
	(403, 'Register', '注册MiniCMS网口', 401, 0, 2, '从家网#0@从小区网#1', '0', '', 1),
	(404, 'Control', '控制', 401, 1, 0, '', '', '', 99),
	(405, 'CMSIP', '模拟发布CMSIP', 404, 0, 2, '  #0@发布#1', '0', '', 99),
	(406, 'DnsServer', 'DNS服务器', 15, 0, 1, '', '', '', 10),
	(407, 'CallNumber', '呼叫手机号码', 401, 0, 1, '', '', '', 99),
	(409, 'EngineerPWD', '工程密码', 53, 0, 1, '', '', 'Pass****', 3),
	(410, 'EscapePWD', '离开APP密码', 53, 0, 1, '', '', 'Pass****', 4),
	(411, 'NickName', '别名', 401, 0, 1, '', '', '', 99),
	(412, 'RobotSn', '小白序號', 401, 0, 1, '', '', '', 99),
	(416, 'BLEScan', '掃描BLE', -1, 1, 0, '', '', '', 99),
	(418, 'EM2220Param', 'EM2220Param', -1, 1, 0, '', '', '', 99),
	(419, 'BLEPairing', 'BLE綁定', 418, 0, 1, '', '', '', 99),
	(421, 'BLEMAC', 'BLEMAC', 418, 1, 5, '', '', '', 99),
	(422, '_BLEString', '掃描BLE', 416, 0, 1, '', '', 'ReadOnly', 99),
	(423, 'Routing', '路由設定', 396, 1, 5, '', '', '', 99),
	(424, 'WeatherInfo', '首页显示当日天气', 353, 0, 2, '关闭#0@开启#1', '0', '', 99),
	(425, 'Elevator', '电梯开启', 353, 0, 2, '关闭#0@开启#1', '0', '', 99),
	(426, 'MifarePrinciple', '刷卡判斷原則', 212, 0, 2, '依據機種原則#0@依據cms刷卡原則#1', '', '', 11),
	(427, 'CmsIP', 'CMS IP Address', 15, 0, 1, '', '', '', 9),
	(428, 'SIMULATION_HIP', '模擬CMSIP(Home)', 404, 0, 1, '', '', '', 99),
	(429, 'SIMULATION_CIP', '模擬CMSIP(Community)', 404, 0, 1, '', '', '', 99),
	(430, 'TimeSync', '發送對時命令', 404, 0, 2, 'Disable#0@從家網#1@從小區網#2@從家網/小區網#3', '0', '發送對時命令', 99);
/*!40000 ALTER TABLE `system_device_json` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_lock_log 結構
CREATE TABLE IF NOT EXISTS `system_device_lock_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT COMMENT '識別碼',
  `CellPhoneID` varchar(32) NOT NULL COMMENT '手機ID',
  `LockType` varchar(16) NOT NULL COMMENT '鎖類型',
  `LockAction` varchar(16) NOT NULL COMMENT '鎖動作',
  `LockName` varchar(32) NOT NULL COMMENT '鎖名稱',
  `LogDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_lock_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_device_lock_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_device_lock_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_main 結構
CREATE TABLE IF NOT EXISTS `system_device_main` (
  `Code` varchar(10) NOT NULL COMMENT '代號',
  `SubCode` varchar(5) NOT NULL DEFAULT '',
  `Name_GA` varchar(50) NOT NULL COMMENT '名稱',
  `Model_GA` varchar(50) NOT NULL COMMENT '型號',
  `Name_KCA` varchar(50) NOT NULL,
  `Model_KCA` varchar(50) NOT NULL,
  `Name_BOSCH` varchar(50) NOT NULL,
  `Model_BOSCH` varchar(50) NOT NULL,
  `Type` int(11) NOT NULL COMMENT '系統類型。0=NVP。1=SIP(Android IP)',
  `IconPath` varchar(255) NOT NULL DEFAULT '',
  `CardReader` int(11) NOT NULL DEFAULT '0' COMMENT '是否為刷卡機',
  `MessageDisplay` int(11) NOT NULL DEFAULT '0' COMMENT '是否顯示訊息',
  `MessageFormat` int(11) NOT NULL DEFAULT '0' COMMENT '訊息格式。0=純文字。1=圖檔',
  PRIMARY KEY (`Code`,`SubCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_main 的資料：~40 rows (大約)
/*!40000 ALTER TABLE `system_device_main` DISABLE KEYS */;
INSERT INTO `system_device_main` (`Code`, `SubCode`, `Name_GA`, `Model_GA`, `Name_KCA`, `Model_KCA`, `Name_BOSCH`, `Model_BOSCH`, `Type`, `IconPath`, `CardReader`, `MessageDisplay`, `MessageFormat`) VALUES
	('210', '1', 'PC管理员机', 'AdminPC', 'PC管理员机', '', 'PC管理员机', 'PVP-CMS-2', 0, '/Common/DMZ/Images/16x16/admin_phone.png', 0, 0, 0),
	('210', '2', '管理员机', 'PMA6000', '管理员机', '', '管理员机', 'PMA-600', 0, '/Common/DMZ/Images/16x16/admin_phone.png', 0, 0, 0),
	('220', '1', '系统门口机', 'PDV4100', '系统门口机', '', '系统门口机', 'PVP-N2', 0, '/Common/DMZ/Images/16x16/gt_bdoor.png', 0, 0, 0),
	('220', '2', '4寸物理按键门口机', 'PDV4121', '4寸物理按键门口机', '', '4寸物理按键门口机', 'NVP-N2', 0, '/Common/DMZ/Images/16x16/gt_bdoor.png', 0, 0, 0),
	('220', '3', '15寸物理按键门口机', 'PDV1501', '15寸物理按键门口机', '', '15寸物理按键门口机', 'PVP-1500', 0, '/Common/DMZ/Images/16x16/gt_bdoor.png', 0, 0, 0),
	('220', '4', '10寸物理按键门口机', 'PDV1511', '10寸物理按键门口机', '', '10寸物理按键门口机', 'PVP-1010', 0, '/Common/DMZ/Images/16x16/gt_bdoor.png', 0, 0, 0),
	('230', '1', '10寸室内机', 'PHV540', '10寸室内机', '', '10寸室内机', 'PVP-N10', 0, '/Common/DMZ/Images/16x16/device-desktop.png', 0, 0, 0),
	('230', '2', '7寸室内机', 'PHV7100', '7寸室内机', '', '7寸室内机', 'PVP-N7', 0, '/Common/DMZ/Images/16x16/device-desktop.png', 0, 0, 0),
	('230', '3', '7寸简易版', 'PHV7102', '7寸简易版', '', '7寸简易版', 'PHV7102', 0, '/Common/DMZ/Images/16x16/device-desktop.png', 0, 0, 0),
	('230', '4', '10寸簡易版室内机', 'PHV542', '10寸簡易版室内机', 'PHV542', '10寸簡易版室内机', 'PHV542', 0, '/Common/DMZ/Images/16x16/device-desktop.png', 0, 0, 0),
	('230', '5', '7寸室内机', 'PHV7300', '7寸室内机', '', '7寸室内机', 'PHV7300', 0, '/Common/DMZ/Images/16x16/device-desktop.png', 0, 0, 0),
	('240', '1', 'IPCAM', 'IPCAM', 'IPCAM', '', 'IPCAM', 'IPCAM', 0, '/Common/DMZ/Images/16x16/cctv_camera.png', 0, 0, 0),
	('240', '2', '第三方 IP Cam', '3rdIPCam', '第三方 IP Cam', '', '第三方 IP Cam', '3rdIPCam', 0, '/Common/DMZ/Images/16x16/cctv_camera.png', 0, 0, 0),
	('250', '1', '住户门口机', 'PDV5700', '住户门口机', '', '住户门口机', 'PDV-570', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('250', '13', '住户门口机', 'PDV2001', '住户门口机', 'PDV2001', '住户门口机', 'PDV2001', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('250', '14', '住户门口机', 'PDV2501', '住户门口机', 'PDV2501', '住户门口机', 'PDV2501', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('250', '15', 'SIP CAM', 'PCM2201', 'SIP CAM', 'PCM2201', 'SIP CAM', 'PCM2201', 0, '/Common/DMZ/Images/16x16/cctv_camera.png', 0, 0, 0),
	('250', '2', '住户门口机', 'PDV5600', '住户门口机', '', '住户门口机', 'PDV-N1', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('250', '3', '住户门口机', 'PDV2000', '住户门口机', '', '住户门口机', 'PDV-2000', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('250', '4', '住户门口机', 'PDV2500', '住户门口机', '', '住户门口机', 'PDV-2500', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('250', '5', 'SIP CAM', 'PCM2200', 'SIP CAM', '', 'SIP CAM', 'PCM-2200', 0, '/Common/DMZ/Images/16x16/cctv_camera.png', 0, 0, 0),
	('260', '1', '紧急对讲机', 'PDV5700', '紧急对讲机', '', '紧急对讲机', 'PDV-570', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('260', '13', '紧急门口机', 'PDV2001', '紧急门口机', 'PDV2001', '紧急门口机', 'PDV2001', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('260', '14', '紧急门口机', 'PDV2501', '紧急门口机', 'PDV2501', '紧急门口机', 'PDV2501', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('260', '15', 'SIP CAM', 'PCM2201', 'SIP CAM', 'PCM2201', 'SIP CAM', 'PCM2201', 0, '/Common/DMZ/Images/16x16/cctv_camera.png', 0, 0, 0),
	('260', '2', '紧急门口机', 'PDV5600', '紧急门口机', '', '紧急对讲机', 'PDV-560', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('260', '3', '紧急门口机', 'PDV2000', '紧急门口机', '', '紧急对讲机', 'LD-811', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('260', '4', '紧急门口机', 'PDV2500', '紧急门口机', '', '紧急对讲机', 'PDV-2500', 0, '/Common/DMZ/Images/16x16/gt_sdoor.png', 0, 0, 0),
	('260', '5', 'SIP CAM', 'PCM2200', 'SIP CAM', '', 'SIP CAM', 'PCM-2200', 0, '/Common/DMZ/Images/16x16/cctv_camera.png', 0, 0, 0),
	('270', '1', 'IOT 网关', 'IOT_GW', 'IOT 网关', 'IOT_GW', 'IOT 网关', 'IOT_GW', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('271', '1', 'EM2200', 'EM2200', 'EM2200', 'EM2200', 'EM2200', 'EM2200', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('271', '2', 'EM2210', 'EM2210', 'EM2210', 'EM2210', 'EM2210', 'EM2210', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('271', '3', 'EM2220', 'EM2220', 'EM2220', 'EM2220', 'EM2220', 'EM2220', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('280', '1', '电梯层位控制器-楼层开放', 'PBV418', '电梯层位控制器-楼层开放', '', '电梯层位控制器-楼层开放', 'PBV-418', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('280', '2', '电梯楼层控制器-业主呼梯', 'PBV418', '电梯楼层控制器-业主呼梯', '', '电梯楼层控制器-业主呼梯', 'PBV-418', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('280', '3', '电梯层位控制器-访客呼梯', 'PBV418', '电梯层位控制器-访客呼梯', '', '电梯层位控制器-访客呼梯', 'PBV-418', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('280', '4', '电梯层位控制器-层位显示', 'PBV418', '电梯层位控制器-层位显示', '', '电梯层位控制器-层位显示', 'PBV-418', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('290', '1', '可程序逻辑控制器', 'PML1000', '可程序逻辑控制器', '', '可程序逻辑控制器', 'PML1000', 0, '/Common/DMZ/Images/16x16/network_hub.png', 0, 0, 0),
	('300', '1', '安卓手机', 'Adnroid', '安卓手机', 'Adnroid', '安卓手机', 'Adnroid', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0),
	('300', '2', '苹果手机', 'IOS', '苹果手机', 'IOS', '苹果手机', 'IOS', 0, '/Common/DMZ/Images/16x16/kfm_home.png', 0, 0, 0);
/*!40000 ALTER TABLE `system_device_main` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_main_version 結構
CREATE TABLE IF NOT EXISTS `system_device_main_version` (
  `Code` varchar(50) NOT NULL,
  `SubCode` varchar(50) NOT NULL,
  `Version` varchar(50) NOT NULL,
  `JSONLink` longtext,
  PRIMARY KEY (`Code`,`SubCode`,`Version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_main_version 的資料：~36 rows (大約)
/*!40000 ALTER TABLE `system_device_main_version` DISABLE KEYS */;
INSERT INTO `system_device_main_version` (`Code`, `SubCode`, `Version`, `JSONLink`) VALUES
	('210', '1', '0', '-1,14,15,17,18,19,20,140,141,21,22,23,24,26,27,28,147,395,16,30,31'),
	('210', '2', '1', '-1,14,15,17,18,141,21,22,23,24,26,28,147,337,338,395,16,30,31,101,102,104,107,118,119,148,153,154,155,156,158,159,160,161,162,163,164,165,166,167,168'),
	('220', '1', '1', '-1,14,15,17,18,141,21,22,23,24,26,28,147,337,338,395,16,30,31,101,102,104,107,117,118,119,149,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,212,217,218,219,220,221,222,223,224,225,227'),
	('220', '2', '1', '-1,14,15,17,18,141,21,22,23,24,26,28,147,337,338,395,16,30,31,101,102,104,107,117,118,119,149,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,212,217,218,219,220,221,222,223,224,225,227'),
	('220', '3', '1', '-1,14,15,17,18,141,21,22,23,24,26,28,147,337,338,395,16,30,31,101,102,104,107,117,118,119,149,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,212,217,218,219,220,221,222,223,224,225,227'),
	('220', '4', '1', '-1,14,15,17,18,141,21,22,23,24,27,28,147,337,338,395,16,30,31,101,102,104,107,117,118,119,149,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,212,217,218,219,220,221,222,223,224,225,227'),
	('230', '1', '1', '-1,14,15,17,18,141,21,22,23,24,26,28,147,337,338,395,16,30,31,53,54,56,57,61,62,63,207,208,209,67,68,69,210,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,202,203,204,211,93,94,205,206,97,98,101,102,226,103,104,105,106,107,108,109,118,119,120,121,122,199,123,200,201,124,125,126'),
	('230', '2', '1', '-1,14,15,17,18,141,21,22,23,24,26,28,147,337,338,395,16,30,31,53,54,56,57,61,62,63,207,208,209,67,68,69,210,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,202,203,204,211,93,94,205,206,97,98,101,102,226,103,104,105,106,107,108,109,118,119,120,121,122,199,123,200,201,124,125,126'),
	('230', '3', '1', '-1,14,15,17,18,141,21,22,23,24,147,395,16,30,31,339,340,341,342,343,344,345,346,347,349,350,351,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,369,370,371,372,373,374,375,376,377,378,379,380,381,382,424,425'),
	('230', '4', '1', '-1,14,15,17,18,141,21,22,23,24,147,395,16,30,31,339,340,341,342,343,344,345,346,347,349,350,351,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,369,370,371,372,373,374,375,376,377,378,379,380,381,382,424,425'),
	('230', '5', '1', '-1,14,15,17,18,141,21,22,24,26,28,147,337,338,395,16,30,31,53,54,56,57,61,62,63,207,208,209,67,68,69,210,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,202,203,204,211,93,94,205,206,97,98,101,102,226,103,104,105,106,107,108,109,118,119,120,121,122,199,123,200,201,124,125,126'),
	('250', '1', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('250', '13', '1', '-1,14,15,17,18,247,140,141,246,427,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,426,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('250', '14', '1', '-1,14,15,17,18,247,140,141,246,427,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,426,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('250', '15', '1', '-1,14,15,17,18,247,140,141,246,427,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,426,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('250', '2', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,335,336'),
	('250', '3', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('250', '4', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,335,336'),
	('250', '5', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,335,336'),
	('260', '1', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('260', '13', '1', '-1,14,15,17,18,247,140,141,246,427,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,426,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('260', '14', '1', '-1,14,15,17,18,247,140,141,246,427,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,426,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('260', '15', '1', '-1,14,15,17,18,247,140,141,246,427,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,426,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,386,335,336'),
	('260', '2', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,335,336'),
	('260', '3', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,335,336'),
	('260', '4', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,335,336'),
	('260', '5', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,101,102,117,212,217,218,219,220,221,222,223,224,225,227,228,232,240,229,231,234,235,236,233,237,238,239,241,245,248,335,336'),
	('270', '1', '1', '-1,14,15,17,18,247,140,141,246,406,392,21,22,23,24,26,28,147,395,396,397,398,399,400,423,401,403,404,405,428,429,430,407,411,412'),
	('271', '1', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,147,395'),
	('271', '2', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,147,395'),
	('271', '3', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,147,395,416,422,418,419,421'),
	('280', '1', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,249,312,313,314,315,316,317,318,331,321,322,323,324,325,326,333,329,330'),
	('280', '2', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,249,312,313,314,315,316,317,318,331,321,322,323,324,325,326,333,329,330'),
	('280', '3', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,249,312,313,314,315,316,317,318,331,321,322,323,324,325,326,333,329,330'),
	('280', '4', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,395,249,312,313,314,315,316,317,318,331,321,322,323,324,325,326,333,329,330'),
	('290', '1', '1', '-1,14,15,17,18,247,140,141,246,21,22,23,24,28,147,385,395,387,388,389');
/*!40000 ALTER TABLE `system_device_main_version` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_online 結構
CREATE TABLE IF NOT EXISTS `system_device_online` (
  `IP` varchar(50) NOT NULL,
  `OnlineDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`IP`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_online 的資料：3 rows
/*!40000 ALTER TABLE `system_device_online` DISABLE KEYS */;
INSERT INTO `system_device_online` (`IP`, `OnlineDateTime`) VALUES
	('192.168.0.59', '2019-07-12 15:33:06'),
	('192.168.0.86', '2019-07-12 15:33:06'),
	('192.168.0.76', '2019-07-12 15:29:49');
/*!40000 ALTER TABLE `system_device_online` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_opendoor_log 結構
CREATE TABLE IF NOT EXISTS `system_device_opendoor_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `CallerMAC` varchar(50) NOT NULL,
  `CallerModelID` varchar(50) DEFAULT NULL,
  `CallerModelSubID` varchar(50) DEFAULT NULL,
  `CallerID` varchar(50) NOT NULL,
  `CallerSubID` varchar(50) NOT NULL,
  `CallerIP` varchar(50) NOT NULL,
  `TargetMAC` varchar(50) NOT NULL,
  `TargetModelID` varchar(50) NOT NULL,
  `TargetModelSubID` varchar(50) NOT NULL,
  `TargetID` varchar(50) NOT NULL,
  `TargetSubID` varchar(50) NOT NULL,
  `TargetIP` varchar(50) NOT NULL,
  `ActionDateTime` datetime NOT NULL,
  `Result` int(11) NOT NULL,
  `CallerType` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`Ident`),
  KEY `CallerMAC` (`CallerMAC`),
  KEY `TargetMAC` (`TargetMAC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_opendoor_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_device_opendoor_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_device_opendoor_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_param 結構
CREATE TABLE IF NOT EXISTS `system_device_param` (
  `MAC` varchar(50) NOT NULL,
  `ConfigName` varchar(50) NOT NULL,
  `JSON` text,
  PRIMARY KEY (`MAC`,`ConfigName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_param 的資料：~1 rows (大約)
/*!40000 ALTER TABLE `system_device_param` DISABLE KEYS */;
INSERT INTO `system_device_param` (`MAC`, `ConfigName`, `JSON`) VALUES
	('88:5D:90:99:89:29', '5700Param', '{\n  "ModeType": 0,\n  "ModelSubID": 1,\n  "CallType": 0,\n  "SIPMODE": 1,\n  "SIPServer": "192.168.0.200:5060",\n  "SIPUser": "",\n  "SIPPass": "",\n  "CallNumber": "1,2,3,4",\n  "TEMPMode": 1,\n  "PANMode": 1,\n  "SIRTime": 60,\n  "ExitOpenTime": 98,\n  "DtmfUnlock": 9,\n  "IPCam": 0,\n  "Resolution": 0,\n  "MusicEnable": 0,\n  "VoiceEnable": 0\n}');
/*!40000 ALTER TABLE `system_device_param` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_reboot_log 結構
CREATE TABLE IF NOT EXISTS `system_device_reboot_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `MAC` varchar(30) NOT NULL,
  `Code` varchar(10) NOT NULL,
  `SubCode` varchar(5) NOT NULL,
  `ID` varchar(10) NOT NULL,
  `SubID` varchar(3) NOT NULL,
  `IP` varchar(50) NOT NULL,
  `AlarmNo` int(11) NOT NULL,
  `AlarmDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `Processed` int(11) NOT NULL DEFAULT '0',
  `Porcesser` varchar(50) NOT NULL DEFAULT '',
  `ProcessDateTime` datetime DEFAULT NULL,
  `ProcessDesc` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`Ident`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_reboot_log 的資料：~5 rows (大約)
/*!40000 ALTER TABLE `system_device_reboot_log` DISABLE KEYS */;
INSERT INTO `system_device_reboot_log` (`Ident`, `MAC`, `Code`, `SubCode`, `ID`, `SubID`, `IP`, `AlarmNo`, `AlarmDateTime`, `Processed`, `Porcesser`, `ProcessDateTime`, `ProcessDesc`) VALUES
	(8, '88:5D:90:9E:6A:D1', '270', '1', 'Z0000001', '1', '192.168.100.100', 10, '2019-06-30 10:04:56', 0, '', NULL, ''),
	(9, '88:5D:90:9E:6A:D1', '270', '1', 'Z0000001', '1', '192.168.100.100', 10, '2019-07-05 13:01:39', 0, '', NULL, ''),
	(10, '88:5D:90:9E:6A:D1', '270', '1', 'Z0000001', '1', '192.168.100.100', 10, '2019-07-05 13:48:05', 0, '', NULL, ''),
	(11, '88:5D:90:9E:6A:D1', '270', '1', 'Z0000001', '1', '192.168.100.100', 10, '2019-07-11 01:26:17', 0, '', NULL, ''),
	(12, '88:5D:90:9E:6A:D1', '270', '1', 'Z0000001', '1', '192.168.100.100', 10, '2019-07-12 15:25:46', 0, '', NULL, '');
/*!40000 ALTER TABLE `system_device_reboot_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_tree 結構
CREATE TABLE IF NOT EXISTS `system_device_tree` (
  `MAC` varchar(30) NOT NULL,
  `Code` varchar(10) NOT NULL,
  `SubCode` varchar(5) NOT NULL,
  `ID` varchar(10) NOT NULL DEFAULT '',
  `SubID` varchar(3) NOT NULL DEFAULT '',
  `NewID` varchar(10) NOT NULL DEFAULT '',
  `NewSubID` varchar(3) NOT NULL DEFAULT '',
  `ParaVersion` float NOT NULL,
  `IP` varchar(50) NOT NULL DEFAULT '',
  `SubMask` varchar(50) NOT NULL DEFAULT ' ' COMMENT '子網遮罩',
  `NetSeg` varchar(50) NOT NULL DEFAULT ' ' COMMENT '網段(由IP與子網遮罩運算取得)',
  `ParentMAC` varchar(30) NOT NULL,
  `Online` int(11) NOT NULL,
  `NickName` varchar(255) NOT NULL DEFAULT '',
  `ReportGroup` int(11) NOT NULL DEFAULT '0',
  `ReportID` int(11) NOT NULL DEFAULT '0',
  `BuildingIdent` int(11) NOT NULL DEFAULT '-2',
  `NewBuildingIdent` int(11) NOT NULL DEFAULT '-2',
  `Language` int(11) NOT NULL DEFAULT '-1' COMMENT '設備語系(0=繁體中文、1=簡體中文)',
  `AreaLabel` varchar(50) NOT NULL DEFAULT '',
  `ContactList` text COMMENT '聯絡清單',
  `Location` varchar(255) NOT NULL DEFAULT '',
  `UpdateDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `3rdDevice` int(11) NOT NULL DEFAULT '0',
  `IpTableNote` varchar(255) NOT NULL DEFAULT '',
  `CameraList` varchar(255) NOT NULL DEFAULT '',
  `SWVersion` varchar(100) DEFAULT NULL,
  `HWVersion` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`MAC`),
  KEY `Code_SubCode` (`Code`,`SubCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_tree 的資料：~2 rows (大約)
/*!40000 ALTER TABLE `system_device_tree` DISABLE KEYS */;
INSERT INTO `system_device_tree` (`MAC`, `Code`, `SubCode`, `ID`, `SubID`, `NewID`, `NewSubID`, `ParaVersion`, `IP`, `SubMask`, `NetSeg`, `ParentMAC`, `Online`, `NickName`, `ReportGroup`, `ReportID`, `BuildingIdent`, `NewBuildingIdent`, `Language`, `AreaLabel`, `ContactList`, `Location`, `UpdateDateTime`, `3rdDevice`, `IpTableNote`, `CameraList`, `SWVersion`, `HWVersion`) VALUES
	('88:5D:90:99:89:29', '250', '1', 'Z0000001', '1', '', '', 1, '192.168.0.76', '255.255.255.0', '192.168.0.255', '-1', 1, '', 0, 0, -2, -2, -1, '', NULL, '', '2019-07-12 15:25:17', 0, '', '', NULL, NULL),
	('88:5D:90:9E:6A:D1', '270', '1', 'Z0000001', '1', '', '', 1, '192.168.100.100', '255.255.255.0', '192.168.100.255', '-1', 0, '', 0, 0, -2, -2, -1, '', NULL, '', '2019-07-12 15:25:46', 0, '', '', NULL, NULL);
/*!40000 ALTER TABLE `system_device_tree` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_tree_copy 結構
CREATE TABLE IF NOT EXISTS `system_device_tree_copy` (
  `MAC` varchar(30) NOT NULL,
  `Code` varchar(10) NOT NULL,
  `SubCode` varchar(5) NOT NULL,
  `ID` varchar(10) NOT NULL DEFAULT '',
  `SubID` varchar(3) NOT NULL DEFAULT '',
  `NewID` varchar(10) NOT NULL DEFAULT '',
  `NewSubID` varchar(3) NOT NULL DEFAULT '',
  `ParaVersion` int(11) NOT NULL,
  `IP` varchar(50) NOT NULL DEFAULT '',
  `ParentMAC` varchar(30) NOT NULL,
  `Online` int(11) NOT NULL,
  `NickName` varchar(255) NOT NULL DEFAULT '',
  `ReportGroup` int(11) NOT NULL DEFAULT '0',
  `ReportID` int(11) NOT NULL DEFAULT '0',
  `BuildingIdent` int(11) NOT NULL DEFAULT '-2',
  `NewBuildingIdent` int(11) NOT NULL DEFAULT '-2',
  `Language` int(11) NOT NULL DEFAULT '-1' COMMENT '設備語系(0=繁體中文、1=簡體中文)',
  `AreaLabel` varchar(50) NOT NULL DEFAULT '',
  `ContactList` text COMMENT '聯絡清單',
  `UpdateDateTime` datetime NOT NULL,
  PRIMARY KEY (`MAC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- 正在導出表  cms_mini.system_device_tree_copy 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_device_tree_copy` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_device_tree_copy` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_tree_data_bk 結構
CREATE TABLE IF NOT EXISTS `system_device_tree_data_bk` (
  `MAC` varchar(30) NOT NULL,
  `Location` varchar(255) NOT NULL DEFAULT '',
  `NickName` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`MAC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_tree_data_bk 的資料：~1 rows (大約)
/*!40000 ALTER TABLE `system_device_tree_data_bk` DISABLE KEYS */;
INSERT INTO `system_device_tree_data_bk` (`MAC`, `Location`, `NickName`) VALUES
	('88:5D:90:9E:6A:D1', '', '');
/*!40000 ALTER TABLE `system_device_tree_data_bk` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_tree_seterror 結構
CREATE TABLE IF NOT EXISTS `system_device_tree_seterror` (
  `MAC` varchar(30) NOT NULL,
  `Code` varchar(10) NOT NULL,
  `SubCode` varchar(5) NOT NULL,
  `ID` varchar(10) NOT NULL DEFAULT '',
  `SubID` varchar(3) NOT NULL DEFAULT '',
  `IP` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`MAC`),
  KEY `Code` (`Code`),
  KEY `SubCode` (`SubCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='有相同IP或相同設定的資料放置於此';

-- 正在導出表  cms_mini.system_device_tree_seterror 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_device_tree_seterror` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_device_tree_seterror` ENABLE KEYS */;


-- 導出  表 cms_mini.system_device_vdp_log 結構
CREATE TABLE IF NOT EXISTS `system_device_vdp_log` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `CallerMAC` varchar(50) NOT NULL,
  `CallerModelID` varchar(50) NOT NULL,
  `CallerModelSubID` varchar(50) NOT NULL,
  `CallerID` varchar(50) NOT NULL,
  `CallerSubID` varchar(50) NOT NULL,
  `CallerIP` varchar(50) NOT NULL,
  `TargetMAC` varchar(50) NOT NULL,
  `TargetModelID` varchar(50) NOT NULL,
  `TargetModelSubID` varchar(50) NOT NULL,
  `TargetID` varchar(50) NOT NULL,
  `TargetSubID` varchar(50) NOT NULL,
  `TargetIP` varchar(50) NOT NULL,
  `ActionDateTime` datetime NOT NULL,
  `Result` int(11) NOT NULL,
  PRIMARY KEY (`Ident`),
  KEY `CallerMAC` (`CallerMAC`),
  KEY `TargetMAC` (`TargetMAC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_device_vdp_log 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_device_vdp_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_device_vdp_log` ENABLE KEYS */;


-- 導出  表 cms_mini.system_elevator 結構
CREATE TABLE IF NOT EXISTS `system_elevator` (
  `MAC` varchar(30) NOT NULL,
  `BuildingIdent` int(11) NOT NULL,
  PRIMARY KEY (`MAC`,`BuildingIdent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_elevator 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_elevator` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_elevator` ENABLE KEYS */;


-- 導出  表 cms_mini.system_group 結構
CREATE TABLE IF NOT EXISTS `system_group` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `Id` varchar(45) NOT NULL,
  `Name` varchar(45) NOT NULL,
  `Permission` varchar(255) NOT NULL DEFAULT '',
  `Note` varchar(45) NOT NULL DEFAULT '',
  `EditorId` varchar(45) NOT NULL,
  `EditorName` varchar(45) NOT NULL,
  `EditDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ident`),
  UNIQUE KEY `Id_UNIQUE` (`Id`),
  UNIQUE KEY `Name_UNIQUE` (`Name`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_group 的資料：~3 rows (大約)
/*!40000 ALTER TABLE `system_group` DISABLE KEYS */;
INSERT INTO `system_group` (`Ident`, `Id`, `Name`, `Permission`, `Note`, `EditorId`, `EditorName`, `EditDateTime`) VALUES
	(1, 'Admins', '管理员', '18,57,122,123,23,24,26,25,60,61,62,121,28,27,113', '', 'sysadm', 'sysadm', '2017-05-05 17:50:32'),
	(2, 'Users', '住户', '18,143,95,132', '', 'sysadm', 'sysadm', '2015-03-24 15:30:18'),
	(6, 'PowerAdmins', '管委会', '18,57,122,123,148,140,141,142,134,138,137,135,150,151,152,114,127,23,24,26,25,60,61,62,121,28,27,113,153', '', 'sysadm', 'sysadm', '2017-05-05 17:50:48');
/*!40000 ALTER TABLE `system_group` ENABLE KEYS */;


-- 導出  表 cms_mini.system_id_rule 結構
CREATE TABLE IF NOT EXISTS `system_id_rule` (
  `Level` int(11) NOT NULL,
  `Text` varchar(5) NOT NULL,
  `Length` int(11) NOT NULL,
  `Format` varchar(7) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_id_rule 的資料：~3 rows (大約)
/*!40000 ALTER TABLE `system_id_rule` DISABLE KEYS */;
INSERT INTO `system_id_rule` (`Level`, `Text`, `Length`, `Format`) VALUES
	(1, '栋', 2, 'X0'),
	(2, '楼', 3, '000'),
	(3, '室', 3, '000');
/*!40000 ALTER TABLE `system_id_rule` ENABLE KEYS */;


-- 導出  表 cms_mini.system_pc_longin 結構
CREATE TABLE IF NOT EXISTS `system_pc_longin` (
  `UserIdent` int(11) NOT NULL,
  `PCAddress` varchar(50) NOT NULL,
  `LoginDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`UserIdent`,`PCAddress`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_pc_longin 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_pc_longin` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_pc_longin` ENABLE KEYS */;


-- 導出  表 cms_mini.system_setting 結構
CREATE TABLE IF NOT EXISTS `system_setting` (
  `Name` varchar(45) NOT NULL,
  `Value` varchar(45) NOT NULL,
  `Mode` int(11) NOT NULL DEFAULT '0' COMMENT '0:一般。1:啟動時放置到Session',
  `GroupType` int(11) NOT NULL DEFAULT '0' COMMENT '0:一般。1:後臺設定頁面欄位',
  PRIMARY KEY (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系統參數設定檔';

-- 正在導出表  cms_mini.system_setting 的資料：~17 rows (大約)
/*!40000 ALTER TABLE `system_setting` DISABLE KEYS */;
INSERT INTO `system_setting` (`Name`, `Value`, `Mode`, `GroupType`) VALUES
	('Area@CN', 'zhongshan', 0, 0),
	('Area@ZH', 'taipei', 0, 0),
	('CheckPWD', '0', 0, 1),
	('CMSNW', '134217728', 0, 0),
	('DBVer', '20180726000001', 0, 0),
	('EnableCaptch', '0', 0, 1),
	('IOTID', 'Z0000001', 0, 0),
	('IPADD', 'System.Collections.Generic.List`1[System.Stri', 0, 0),
	('PWDLength', '5', 0, 1),
	('PWDMIX', '0', 0, 1),
	('SMTPAuth', '0', 0, 1),
	('SMTPId', '', 0, 1),
	('SMTPIP', '', 0, 1),
	('SMTPPort', '', 0, 1),
	('SMTPPWD', '', 0, 1),
	('SYSADM_PWD', '6OjyScs7Ops=', 0, 0),
	('SYSTEM_GUID', '36d62e6c-3ae9-43b7-b11c-81956146bbdb', 0, 0);
/*!40000 ALTER TABLE `system_setting` ENABLE KEYS */;


-- 導出  表 cms_mini.system_temp_files 結構
CREATE TABLE IF NOT EXISTS `system_temp_files` (
  `FileID` smallint(6) NOT NULL,
  `Content` longblob,
  `FileSize` int(11) DEFAULT NULL,
  `SavePath` varchar(255) DEFAULT NULL,
  `Action` varchar(10) DEFAULT NULL,
  `FileDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`FileID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_temp_files 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_temp_files` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_temp_files` ENABLE KEYS */;


-- 導出  表 cms_mini.system_user 結構
CREATE TABLE IF NOT EXISTS `system_user` (
  `Ident` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(45) NOT NULL,
  `Id` varchar(45) NOT NULL,
  `Password` varchar(45) NOT NULL,
  `Status` int(11) NOT NULL,
  `LastLoginDateTime` datetime DEFAULT NULL,
  `Note` varchar(45) NOT NULL DEFAULT '',
  `Mobile` varchar(45) NOT NULL DEFAULT '',
  `Email` varchar(45) NOT NULL DEFAULT '',
  `EditorId` varchar(45) NOT NULL,
  `EditorName` varchar(45) NOT NULL,
  `EditDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ident`),
  UNIQUE KEY `Id_UNIQUE` (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_user 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_user` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_user` ENABLE KEYS */;


-- 導出  表 cms_mini.system_user_group 結構
CREATE TABLE IF NOT EXISTS `system_user_group` (
  `UserIdent` int(11) NOT NULL,
  `GroupIdent` int(11) NOT NULL,
  PRIMARY KEY (`UserIdent`,`GroupIdent`),
  KEY `UserIdent_idx` (`UserIdent`),
  KEY `GroupIdent_idx` (`GroupIdent`),
  CONSTRAINT `GroupIdent` FOREIGN KEY (`GroupIdent`) REFERENCES `system_group` (`Ident`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `UserIdent` FOREIGN KEY (`UserIdent`) REFERENCES `system_user` (`Ident`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.system_user_group 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `system_user_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `system_user_group` ENABLE KEYS */;


-- 導出  表 cms_mini.user_mail 結構
CREATE TABLE IF NOT EXISTS `user_mail` (
  `UserID` varchar(8) NOT NULL,
  `OL` int(11) NOT NULL DEFAULT '0',
  `RL` int(11) NOT NULL DEFAULT '0',
  `PK` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.user_mail 的資料：~0 rows (大約)
/*!40000 ALTER TABLE `user_mail` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_mail` ENABLE KEYS */;


-- 導出  表 cms_mini.weather_info 結構
CREATE TABLE IF NOT EXISTS `weather_info` (
  `CityName` varchar(50) DEFAULT NULL,
  `Openweathermap` text,
  `Aqicn` text,
  `UpdateDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 正在導出表  cms_mini.weather_info 的資料：~1 rows (大約)
/*!40000 ALTER TABLE `weather_info` DISABLE KEYS */;
INSERT INTO `weather_info` (`CityName`, `Openweathermap`, `Aqicn`, `UpdateDateTime`) VALUES
	('中山', '', '155', '2017-01-19 15:20:06');
/*!40000 ALTER TABLE `weather_info` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
