/*
Navicat SQLite Data Transfer

Source Server         : oam
Source Server Version : 30714
Source Host           : :0

Target Server Type    : SQLite
Target Server Version : 30714
File Encoding         : 65001

Date: 2018-07-09 09:14:03
*/

/*首先需要创建一个空的 main.db文件！！！！！！！！*/
PRAGMA foreign_keys = OFF;

-- ----------------------------
-- Table structure for device_info
-- ----------------------------
DROP TABLE IF EXISTS "main"."device_info";
CREATE TABLE "device_info" (
"device_id"  varchar(128) NOT NULL,
"vendor_id"  INTEGER,
"vendor_name"  varchar(128),
"device_made"  varchar(3),
"device_type"  varchar(3),
"soft_version"  varchar(32),
"interface"  varchar(1024),
"mem_total"  INTEGER,
"cpu_info"  varchar(1024),
"disk_info"  varchar(1024),
"organs"  varchar(64),
"commu_addr"  varchar(16),
"commu_mac"  varchar(18),
"commu_mask"  varchar(16),
"commu_gateway"  varchar(16),
"manage_addr"  varchar(16),
"manage_mac"  varchar(18),
"manage_mask"  varchar(16),
"manage_gateway"  varchar(16),
"center_ip1"  varchar(16),
"center_ip2"  varchar(16),
"manage_interface"  varchar(18),
"commu_interface"  varchar(18),
"insititue"  varchar(18),
"address"  varchar(128),
"address_code"  varchar(10),
"contact"  varchar(1024),
"memo"  varchar(256),
"update_time"  varchar(16),
"update_time_long"  INTEGER,
PRIMARY KEY ("device_id" ASC)
);

-- ----------------------------
-- Records of device_info
-- ----------------------------
INSERT INTO "main"."device_info" VALUES (1, 1, '设备名称', null, '测试类型5', 1.5, null, null, null, null, null, null, '', '', '', '192.168.11.11', '00:00:00:00:00:04', '255.255.255.0', '192.168.10.1', '', null, null, null, null, null, null, null, null, '2018-07-06 11:49:10', 1530848950757);


-- ----------------------------
-- Table structure for system_route_config
-- ----------------------------
DROP TABLE IF EXISTS "main"."system_route_config";
CREATE TABLE "system_route_config" (
"config_id"  INTEGER NOT NULL,
"destination_ip"  varchar(20),
"ip_mask"  varchar(20),
"gateway"  varchar(20),
"interface"  varchar(20),
PRIMARY KEY ("config_id" ASC)
);

-- ----------------------------
-- Records of system_route_config
-- ----------------------------
INSERT INTO "main"."system_route_config" VALUES (1, '192.168.10.34', '00:00:00:00:00:01', '255.255.255.0', 124);

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS "main"."sys_log";
CREATE TABLE "sys_log" (
"id"  INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"type"  char(1) DEFAULT 1,
"title"  varchar(255) DEFAULT "",
"create_by"  varchar(64),
"create_date"  TEXT,
"remote_addr"  varchar(255),
"user_agent"  varchar(255),
"request_uri"  varchar(255),
"method"  varchar(5),
"params"  TEXT,
"exception"  TEXT,
"create_time"  INTEGER,
"remarks"  TEXT
);

-- ----------------------------
-- Records of sys_log
-- ----------------------------

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS "main"."sys_menu";
CREATE TABLE "sys_menu" (
"id"  INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"parent_id"  varchar(64) NOT NULL,
"parent_ids"  varchar(2000) NOT NULL,
"name"  varchar(100) NOT NULL,
"sort"  decimal(10) NOT NULL,
"href"  varchar(2000),
"target"  varhcar(20),
"icon"  varchar(100),
"is_show"  char(1) NOT NULL,
"permission"  varchar(200),
"create_by"  varchar(64) NOT NULL,
"create_date"  TEXT NOT NULL,
"update_by"  varchar(64) NOT NULL,
"update_date"  TEXT NOT NULL,
"remarks"  varchar(255),
"del_flag"  char(1) NOT NULL DEFAULT 0
);

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO "main"."sys_menu" VALUES (1, 0, 0, 'system.config', 1, '/config', '', null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', '', 0);
INSERT INTO "main"."sys_menu" VALUES (13, 0, 0, 'audit.log', 3, '/auditlog', null, null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', null, 0);
INSERT INTO "main"."sys_menu" VALUES (14, 0, 0, 'sign.in', 1, '/login', 1, null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', 'login', 0);
INSERT INTO "main"."sys_menu" VALUES (15, 0, 0, 'sign.out', 1, '/exit', 1, null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', 'exit', 0);
INSERT INTO "main"."sys_menu" VALUES (16, 0, 0, 'route.config', 2, '/route', '', null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', '', 0);
INSERT INTO "main"."sys_menu" VALUES (17, 0, 0, 'route.modify', 1, '/route/modifyRoute', 1, null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', 'route.modify', 0);
INSERT INTO "main"."sys_menu" VALUES (18, 0, 0, 'config.modify', 1, '/config/modifyConfig', 1, null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', 'config.modify', 0);
INSERT INTO "main"."sys_menu" VALUES (19, 0, 0, 'reboot', 1, '/config/rebootConfig', '', null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', 'reboot', 0);
INSERT INTO "main"."sys_menu" VALUES (20, 0, 0, 'shutdown', 1, '/config/shutDownConfig', '', null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', 'shutdown', 0);
INSERT INTO "main"."sys_menu" VALUES (21, 0, 0, '', 1, '', null, null, 1, null, 'th', '2018年6月27日 09:15:12', 'th', '2018年6月27日 09:15:20', null, 0);

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS "main"."sys_user";
CREATE TABLE "sys_user" (
"id"  INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"company_id"  varchar(64),
"office_id"  varchar(64),
"room_no"  varchar(64),
"login_name"  varchar(100) NOT NULL,
"password"  varchar(100) NOT NULL,
"no"  varchar(100),
"name"  varchar(100),
"email"  varchar(200),
"phone"  varchar(200),
"mobile"  varchar(200),
"user_type"  char(1),
"photo"  varchar(1000),
"login_ip"  varchar(100),
"login_date"  TEXT,
"login_flag"  varchar(64),
"create_by"  varchar(64),
"create_date"  TEXT,
"update_by"  varchar(64),
"update_date"  TEXT,
"remarks"  varchar(255),
"del_flag"  char(1) DEFAULT 0,
"qrcode"  varchar(1000),
"sign"  varchar(450)
);

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO "main"."sys_user" VALUES (2, null, null, 1, 'admin', '2DmsiahIc/WLZIMs0QIPFQ==', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null);

-- ----------------------------
-- Table structure for sys_user_menu
-- ----------------------------
DROP TABLE IF EXISTS "main"."sys_user_menu";
CREATE TABLE "sys_user_menu" (
"user_id"  varchar(64) NOT NULL,
"menu_id"  varchar(64) NOT NULL,
primary key (`user_id`,`menu_id`)
);

-- ----------------------------
-- Records of sys_user_menu
-- ----------------------------
INSERT INTO "main"."sys_user_menu" VALUES (2, 1);
INSERT INTO "main"."sys_user_menu" VALUES (2, 13);
INSERT INTO "main"."sys_user_menu" VALUES (2, 16);
