/*start*/

/*Table structure for table `skycaiji_app` */

DROP TABLE IF EXISTS `skycaiji_app`;

CREATE TABLE `skycaiji_app` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app` varchar(100) NOT NULL,
  `provider_id` int(11) NOT NULL DEFAULT '0',
  `addtime` int(11) NOT NULL DEFAULT '0',
  `uptime` int(11) NOT NULL DEFAULT '0',
  `config` mediumtext,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_collected` */

DROP TABLE IF EXISTS `skycaiji_collected`;

CREATE TABLE `skycaiji_collected` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `url` varchar(1000) NOT NULL DEFAULT '',
  `urlMd5` varchar(32) NOT NULL DEFAULT '',
  `release` varchar(10) NOT NULL DEFAULT '',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `target` varchar(1000) NOT NULL DEFAULT '',
  `desc` varchar(1000) NOT NULL DEFAULT '',
  `error` varchar(1000) NOT NULL DEFAULT '',
  `addtime` int(11) NOT NULL DEFAULT '0',
  `titleMd5` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `ix_urlmd5` (`urlMd5`),
  KEY `ix_taskid` (`task_id`),
  KEY `ix_addtime` (`addtime`),
  KEY `ix_titlemd5` (`titleMd5`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_collector` */

DROP TABLE IF EXISTS `skycaiji_collector`;

CREATE TABLE `skycaiji_collector` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `task_id` int(11) NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL,
  `module` varchar(10) NOT NULL DEFAULT '',
  `addtime` int(11) NOT NULL DEFAULT '0',
  `uptime` int(11) NOT NULL DEFAULT '0',
  `config` mediumtext,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_config` */

DROP TABLE IF EXISTS `skycaiji_config`;

CREATE TABLE `skycaiji_config` (
  `cname` varchar(32) NOT NULL,
  `ctype` tinyint(3) unsigned NOT NULL,
  `dateline` int(10) unsigned NOT NULL,
  `data` mediumblob NOT NULL,
  PRIMARY KEY (`cname`),
  KEY `dateline` (`dateline`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Data for the table `skycaiji_config` */

insert  into `skycaiji_config`(`cname`,`ctype`,`dateline`,`data`) values ('version',0,0,'2.5.2'),('caiji',2,0,'a:12:{s:6:"robots";i:1;s:4:"auto";i:0;s:3:"run";s:9:"backstage";s:6:"server";s:0:"";s:10:"server_php";s:0:"";s:3:"num";i:10;s:8:"interval";i:30;s:7:"timeout";i:60;s:13:"interval_html";i:0;s:9:"real_time";i:1;s:5:"retry";i:0;s:4:"wait";i:0;}'),('site',2,0,'a:3:{s:10:"verifycode";i:1;s:8:"hidehome";i:0;s:5:"login";a:3:{s:5:"limit";i:1;s:6:"failed";i:20;s:4:"time";i:1;}}');

/*Table structure for table `skycaiji_func_app` */

DROP TABLE IF EXISTS `skycaiji_func_app`;

CREATE TABLE `skycaiji_func_app` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(20) NOT NULL DEFAULT '',
  `app` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL DEFAULT '',
  `desc` text,
  `enable` tinyint(1) NOT NULL DEFAULT '0',
  `addtime` int(11) NOT NULL DEFAULT '0',
  `uptime` int(11) NOT NULL DEFAULT '0',
  `provider_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ix_app` (`app`),
  UNIQUE KEY `module_app` (`module`,`app`),
  KEY `module_enable` (`module`,`enable`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_provider` */

DROP TABLE IF EXISTS `skycaiji_provider`;

CREATE TABLE `skycaiji_provider` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `url` varchar(255) NOT NULL DEFAULT '',
  `domain` varchar(255) NOT NULL DEFAULT '',
  `authkey` varchar(255) NOT NULL DEFAULT '',
  `enable` tinyint(4) NOT NULL DEFAULT '0',
  `sort` mediumint(9) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `domain` (`domain`(250))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_proxy_group` */

DROP TABLE IF EXISTS `skycaiji_proxy_group`;

CREATE TABLE `skycaiji_proxy_group` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `parent_id` int(11) NOT NULL DEFAULT '0',
  `sort` mediumint(9) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_proxy_ip` */

DROP TABLE IF EXISTS `skycaiji_proxy_ip`;

CREATE TABLE `skycaiji_proxy_ip` (
  `ip` varchar(100) NOT NULL,
  `user` varchar(100) NOT NULL DEFAULT '',
  `pwd` varchar(100) NOT NULL DEFAULT '',
  `invalid` tinyint(4) NOT NULL DEFAULT '0',
  `failed` int(11) NOT NULL DEFAULT '0',
  `num` int(11) NOT NULL DEFAULT '0',
  `time` int(11) NOT NULL DEFAULT '0',
  `type` varchar(20) NOT NULL DEFAULT '',
  `addtime` int(11) NOT NULL DEFAULT '0',
  `no` bigint(20) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ip`),
  KEY `no` (`no`),
  KEY `addtime_no` (`addtime`,`no`),
  KEY `num_no` (`num`,`no`),
  KEY `time_no` (`time`,`no`),
  KEY `gid_no` (`group_id`,`no`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_release` */

DROP TABLE IF EXISTS `skycaiji_release`;

CREATE TABLE `skycaiji_release` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `task_id` int(11) NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL DEFAULT '',
  `module` varchar(10) NOT NULL DEFAULT '',
  `addtime` int(11) NOT NULL DEFAULT '0',
  `config` mediumtext,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_release_app` */

DROP TABLE IF EXISTS `skycaiji_release_app`;

CREATE TABLE `skycaiji_release_app` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(10) NOT NULL DEFAULT '',
  `app` varchar(50) NOT NULL DEFAULT '',
  `name` varchar(100) NOT NULL DEFAULT '',
  `desc` text,
  `addtime` int(11) NOT NULL DEFAULT '0',
  `uptime` int(11) NOT NULL DEFAULT '0',
  `provider_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `module_app` (`module`,`app`),
  UNIQUE KEY `ix_app` (`app`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_rule` */

DROP TABLE IF EXISTS `skycaiji_rule`;

CREATE TABLE `skycaiji_rule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `type` varchar(20) NOT NULL DEFAULT '',
  `module` varchar(20) NOT NULL DEFAULT '',
  `store_id` int(11) NOT NULL DEFAULT '0',
  `addtime` int(11) NOT NULL DEFAULT '0',
  `uptime` int(11) NOT NULL DEFAULT '0',
  `provider_id` int(11) NOT NULL DEFAULT '0',
  `config` mediumtext,
  PRIMARY KEY (`id`),
  KEY `store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_task` */

DROP TABLE IF EXISTS `skycaiji_task`;

CREATE TABLE `skycaiji_task` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '',
  `tg_id` int(11) NOT NULL DEFAULT '0',
  `module` varchar(10) NOT NULL DEFAULT '',
  `auto` tinyint(4) NOT NULL DEFAULT '0',
  `sort` mediumint(9) NOT NULL DEFAULT '0',
  `addtime` int(11) NOT NULL DEFAULT '0',
  `caijitime` int(11) NOT NULL DEFAULT '0',
  `config` mediumtext,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_task_timer` */

DROP TABLE IF EXISTS `skycaiji_task_timer`;

CREATE TABLE `skycaiji_task_timer` (
  `task_id` int(11) NOT NULL DEFAULT '0',
  `name` varchar(10) NOT NULL DEFAULT '',
  `data` varchar(10) NOT NULL DEFAULT '',
  KEY `ix_tid` (`task_id`),
  KEY `ix_name` (`name`,`data`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_taskgroup` */

DROP TABLE IF EXISTS `skycaiji_taskgroup`;

CREATE TABLE `skycaiji_taskgroup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `parent_id` int(11) NOT NULL DEFAULT '0',
  `sort` mediumint(9) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_user` */

DROP TABLE IF EXISTS `skycaiji_user`;

CREATE TABLE `skycaiji_user` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `salt` varchar(50) NOT NULL DEFAULT '',
  `groupid` int(11) NOT NULL DEFAULT '0',
  `email` varchar(255) NOT NULL DEFAULT '',
  `regtime` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `username` (`username`(250)),
  KEY `email` (`email`(250))
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

/*Table structure for table `skycaiji_usergroup` */

DROP TABLE IF EXISTS `skycaiji_usergroup`;

CREATE TABLE `skycaiji_usergroup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `level` int(11) NOT NULL DEFAULT '0',
  `founder` tinyint(4) NOT NULL DEFAULT '0',
  `admin` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

/*Data for the table `skycaiji_usergroup` */

insert  into `skycaiji_usergroup`(`id`,`name`,`level`,`founder`,`admin`) values (1,'创始人',9,1,1),(2,'管理员',8,0,1),(3,'普通用户',0,0,0);

/*end*/