-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 10.252.250.130
-- Generation Time: 2017-08-04 15:46:55
-- 服务器版本： 10.0.17-MariaDB-1~trusty-log
-- PHP Version: 7.0.15-0ubuntu0.16.04.4

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `jlzfver`
--

-- --------------------------------------------------------

--
-- 表的结构 `fc_category`
--

CREATE TABLE `fc_category` (
  `cateid` int(11) UNSIGNED NOT NULL,
  `catename` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '类别名',
  `parentid` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '父类id,默认为0，都是父类',
  `itemid` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '项目id，默认为0，无项目'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='类别表';

-- --------------------------------------------------------

--
-- 表的结构 `fc_item`
--

CREATE TABLE `fc_item` (
  `itemid` int(11) UNSIGNED NOT NULL,
  `itemname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT '项目领取码'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='项目表';

-- --------------------------------------------------------

--
-- 表的结构 `fc_log`
--

CREATE TABLE `fc_log` (
  `id` int(11) UNSIGNED NOT NULL,
  `userid` int(11) UNSIGNED NOT NULL,
  `reportid` int(11) UNSIGNED NOT NULL,
  `verid` int(11) UNSIGNED NOT NULL,
  `content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '操作内容',
  `addtime` int(15) UNSIGNED NOT NULL COMMENT '添加时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='用户操作记录表';

-- --------------------------------------------------------

--
-- 表的结构 `fc_report`
--

CREATE TABLE `fc_report` (
  `reportid` int(11) UNSIGNED NOT NULL,
  `reportname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `areacate` tinyint(4) UNSIGNED NOT NULL DEFAULT '3' COMMENT '适用地区',
  `itemid` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '所属项目，默认为0，通用',
  `cateid` int(11) UNSIGNED NOT NULL COMMENT '所属类别',
  `parentid` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '所属类别父类，默认为0，都为父类',
  `userid` int(11) UNSIGNED NOT NULL COMMENT '谁创建本报表',
  `edittime` int(15) UNSIGNED NOT NULL COMMENT '最新更新时间',
  `lastedit` int(11) NOT NULL COMMENT '最新一次操作时间',
  `lastuser` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '最新一次操作人'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='报表';

-- --------------------------------------------------------

--
-- 表的结构 `fc_user`
--

CREATE TABLE `fc_user` (
  `id` int(11) UNSIGNED NOT NULL,
  `username` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='管理员用户表';

--
-- 转存表中的数据 `fc_user`
--

INSERT INTO `fc_user` (`id`, `username`, `password`) VALUES
(1, '纵横知道', '$2a$08$X2qbaqmSATLNPmrjVoV9AuYFo2i28omEBWsHc16eK0R1VNtTzF/C6'),
(2, '纵横', '$2a$08$/s0ayZBQGcOrOwSJ8RIyUu62RL0dnwzn4BGcax53MN6wd4Tlz9302'),
(3, '纵横青青', '$2a$08$0VaHvE17PLZk23DTB.Y.SOBT7arn8cwTXTsG.CFAzJwl.A11EdpfS'),
(4, '纵横海珠', '$2a$08$M10HfSyQD0NqfJ.aFzrhk.BoDLpndKwNDWtjgZavEA0f28a3FDGUW'),
(5, '纵横小爱', '$2a$08$rj7foT3dD.O8bgfNBMciVubaaHh3H17AbQ2eG/3yhsL2q9g2a863q'),
(6, '纵横佩玲', '$2a$08$RjRFX8/SkbYHd33Jg13nz.EPn6uzar8bc9TwqjqKt4yN.uX4PmQv6');

-- --------------------------------------------------------

--
-- 表的结构 `fc_version`
--

CREATE TABLE `fc_version` (
  `verid` int(11) UNSIGNED NOT NULL,
  `reportid` int(11) UNSIGNED NOT NULL COMMENT '报表id',
  `vername` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '版本名称，以时间为格式',
  `content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '内容',
  `xmlheader` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'xml头文件代码',
  `xmlbody` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'xml报表内容',
  `status` tinyint(2) UNSIGNED NOT NULL COMMENT '状态，0为未发布，1为草稿，2为发布',
  `addtime` int(15) UNSIGNED NOT NULL COMMENT '版本添加时间',
  `edittime` int(15) UNSIGNED NOT NULL COMMENT '最新编辑时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='版本表';

-- --------------------------------------------------------

--
-- 表的结构 `sfu_hosts`
--

CREATE TABLE `sfu_hosts` (
  `id` int(10) UNSIGNED NOT NULL,
  `serverid` mediumint(9) NOT NULL COMMENT '服务器主键id',
  `hostname` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '客户机名称',
  `domain` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '域名',
  `sales` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '销售负责人',
  `status` tinyint(4) NOT NULL COMMENT '状态',
  `webver` varchar(20) COLLATE utf8_unicode_ci NOT NULL COMMENT '云端版本信息',
  `softver` varchar(20) COLLATE utf8_unicode_ci NOT NULL COMMENT '软件版本信息',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='客户机表';

-- --------------------------------------------------------

--
-- 表的结构 `sfu_servers`
--

CREATE TABLE `sfu_servers` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- 表的结构 `sfu_upgradelogs`
--

CREATE TABLE `sfu_upgradelogs` (
  `id` int(10) UNSIGNED NOT NULL,
  `hid` mediumint(9) NOT NULL COMMENT 'hosts主键',
  `scondition` tinyint(1) UNSIGNED NOT NULL COMMENT '版本信息 1：更高版本 2：当前版本',
  `version` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '软件版本号',
  `jsondata` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `fc_category`
--
ALTER TABLE `fc_category`
  ADD PRIMARY KEY (`cateid`),
  ADD KEY `catename` (`catename`,`parentid`);

--
-- Indexes for table `fc_item`
--
ALTER TABLE `fc_item`
  ADD PRIMARY KEY (`itemid`),
  ADD KEY `itemname` (`itemname`),
  ADD KEY `code` (`code`);

--
-- Indexes for table `fc_log`
--
ALTER TABLE `fc_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`,`reportid`,`verid`);

--
-- Indexes for table `fc_report`
--
ALTER TABLE `fc_report`
  ADD PRIMARY KEY (`reportid`),
  ADD KEY `reportname` (`reportname`,`itemid`,`cateid`),
  ADD KEY `parentid` (`parentid`),
  ADD KEY `userid` (`userid`);

--
-- Indexes for table `fc_user`
--
ALTER TABLE `fc_user`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fc_version`
--
ALTER TABLE `fc_version`
  ADD PRIMARY KEY (`verid`),
  ADD KEY `reportid` (`reportid`,`vername`),
  ADD KEY `status` (`status`),
  ADD KEY `vername` (`vername`),
  ADD KEY `addtime` (`addtime`);

--
-- Indexes for table `sfu_hosts`
--
ALTER TABLE `sfu_hosts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sfu_servers`
--
ALTER TABLE `sfu_servers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sfu_upgradelogs`
--
ALTER TABLE `sfu_upgradelogs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `scondition` (`scondition`);

--
-- 在导出的表使用AUTO_INCREMENT
--

--
-- 使用表AUTO_INCREMENT `fc_category`
--
ALTER TABLE `fc_category`
  MODIFY `cateid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;
--
-- 使用表AUTO_INCREMENT `fc_item`
--
ALTER TABLE `fc_item`
  MODIFY `itemid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- 使用表AUTO_INCREMENT `fc_log`
--
ALTER TABLE `fc_log`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1162;
--
-- 使用表AUTO_INCREMENT `fc_report`
--
ALTER TABLE `fc_report`
  MODIFY `reportid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=185;
--
-- 使用表AUTO_INCREMENT `fc_user`
--
ALTER TABLE `fc_user`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- 使用表AUTO_INCREMENT `fc_version`
--
ALTER TABLE `fc_version`
  MODIFY `verid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=341;
--
-- 使用表AUTO_INCREMENT `sfu_hosts`
--
ALTER TABLE `sfu_hosts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- 使用表AUTO_INCREMENT `sfu_servers`
--
ALTER TABLE `sfu_servers`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- 使用表AUTO_INCREMENT `sfu_upgradelogs`
--
ALTER TABLE `sfu_upgradelogs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
