DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT COMMENT '管理员id',
  `name` varchar(45) NOT NULL COMMENT '管理员名称',
  `password` varchar(45) NOT NULL COMMENT '管理员密码',
  `menus` varchar(45) DEFAULT NULL COMMENT '菜单配置1:显示 0:隐藏',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

LOCK TABLES `admin` WRITE;
INSERT INTO `admin` VALUES (1,'admin','e10adc3949ba59abbe56e057f20f883e','1,1,1,1,1,1,1');
INSERT INTO `admin` VALUES (2,'user','e10adc3949ba59abbe56e057f20f883e','1,1,1,1,0,0,0');
UNLOCK TABLES;

DROP TABLE IF EXISTS `ied_dl_record`;
CREATE TABLE `ied_dl_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `config_id` int(11) DEFAULT NULL,
  `remote_path` varchar(200) DEFAULT NULL COMMENT '源路径',
  `filename` varchar(45) DEFAULT NULL COMMENT '文件名',
  `path` varchar(200) DEFAULT NULL COMMENT '本地路径',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `ied_dl_config`;
CREATE TABLE `ied_dl_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ied_id` int(11) DEFAULT NULL,
  `dev_id` int(11) DEFAULT NULL COMMENT '装置ID',
  `path` varchar(2000) DEFAULT NULL COMMENT '目录',
  `contain` varchar(45) DEFAULT NULL COMMENT '包含文字',
  `suffix` varchar(45) DEFAULT NULL COMMENT '后缀名',
  `todel` int(11) DEFAULT NULL COMMENT '下载后删除',
  `active` int(11) DEFAULT NULL COMMENT '0:停用; 1:启用;',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;