-- phpMyAdmin SQL Dump
-- version 4.4.13.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2016-09-05 10:42:18
-- 服务器版本： 5.6.27-0ubuntu1
-- PHP Version: 5.6.11-1ubuntu3.1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `zcju`
--

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

--
-- 表的结构 `project`
--

CREATE TABLE IF NOT EXISTS `project` (
  `id` int(10) NOT NULL,
  `project_name` varchar(255) NOT NULL,
  `display` varchar(10) NOT NULL COMMENT '0隐藏 1显示'
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

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

INSERT INTO `project` (`id`, `project_name`, `display`) VALUES
(1, '项目一', '1'),
(3, '项目二', '0'),
(4, '项目三', '1');

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

--
-- 表的结构 `role`
--

CREATE TABLE IF NOT EXISTS `role` (
  `id` int(10) NOT NULL,
  `name` varchar(255) NOT NULL COMMENT '职位名',
  `display_name` varchar(255) NOT NULL COMMENT '职位名',
  `description` varchar(255) NOT NULL COMMENT '描述',
  `role` int(10) NOT NULL COMMENT '权限',
  `display` varchar(10) NOT NULL COMMENT '0隐藏  1显示'
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='职位表';

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

INSERT INTO `role` (`id`, `name`, `display_name`, `description`, `role`, `display`) VALUES
(1, 'first', '初审', '初步审查表格', 3, '1'),
(2, 'second', '监审', '复审表格', 4, '1'),
(3, '', '征拆工作人员', '建表', 0, '1'),
(4, '', '核算', '核算提交的表单', 1, '1'),
(5, '', '复核', '复核核算的表单', 2, '1'),
(6, '', '管理员', '后台管理', 5, '1'),
(7, '', '领导', '查看所有表单', 6, '0');

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

--
-- 表的结构 `table_list`
--

CREATE TABLE IF NOT EXISTS `table_list` (
  `id` int(10) NOT NULL,
  `table_id` int(10) NOT NULL COMMENT '表类型id',
  `json` text NOT NULL,
  `status` int(10) NOT NULL COMMENT '0:未提交 1已核算  2已复核 3已提交 4：已初审 5：已复审 6已监审',
  `user_id` int(10) NOT NULL,
  `bzc_name` varchar(255) NOT NULL COMMENT '被征收人姓名',
  `bzc_cardid` varchar(200) NOT NULL COMMENT '被征收人身份证',
  `bzc_addr` varchar(255) NOT NULL COMMENT '被征收地址',
  `bzc_area` varchar(50) NOT NULL COMMENT '被征收房屋面积',
  `house_type` varchar(200) NOT NULL COMMENT '房型',
  `bzc_tel` varchar(200) NOT NULL COMMENT '被征收人联系电话',
  `used` varchar(200) DEFAULT '默认：住房' COMMENT '用途',
  `project_name` varchar(200) NOT NULL COMMENT '项目名',
  `num` varchar(200) NOT NULL COMMENT '编号',
  `table_time` varchar(200) NOT NULL COMMENT '填表时间',
  `sub_description` varchar(255) NOT NULL COMMENT '提交描述',
  `hesuan` varchar(100) NOT NULL,
  `fuhe` varchar(100) NOT NULL,
  `chushen` varchar(100) NOT NULL,
  `jianshen` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='总数据表';

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

--
-- 表的结构 `table_name`
--

CREATE TABLE IF NOT EXISTS `table_name` (
  `id` int(10) NOT NULL,
  `table_name` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='所有表的名字';

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

INSERT INTO `table_name` (`id`, `table_name`) VALUES
(1, '国有土地房屋征收与补偿安置单（货币化安置）'),
(2, '违章建筑自行拆除费用申领表'),
(3, '海勃湾区残疾人房屋征收补贴审批确认单'),
(4, '海勃湾区房屋征收提前搬迁奖励单'),
(5, '房屋逾期过渡安置补助费发放单'),
(6, '海勃湾区房屋征收安置补贴单'),
(7, '国有土地上房屋征收与补偿核算单（货币化安置）'),
(8, '国有土地上房屋征收与补偿核算单（产权调换）'),
(9, '国有土地上房屋征收与补偿核算单（货币补偿）');

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

--
-- 表的结构 `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `id` int(10) NOT NULL,
  `name` varchar(250) NOT NULL COMMENT '登录名(账号)',
  `pswd` varchar(255) NOT NULL COMMENT '密码',
  `department` varchar(255) NOT NULL COMMENT '单位',
  `education` varchar(255) NOT NULL,
  `role` int(10) NOT NULL DEFAULT '1' COMMENT '权限（数字越大越高）',
  `surname` varchar(200) NOT NULL COMMENT '姓名',
  `cardname` varchar(250) NOT NULL COMMENT '证件名称',
  `cardid` varchar(100) NOT NULL COMMENT '证件号',
  `role_id` varchar(10) NOT NULL,
  `display` varchar(10) NOT NULL COMMENT '0：停用  1：启用',
  `thumb` varchar(255) NOT NULL COMMENT '头像图路径',
  `job_name` varchar(250) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='普通用户';

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

INSERT INTO `user` (`id`, `name`, `pswd`, `department`, `education`, `role`, `surname`, `cardname`, `cardid`, `role_id`, `display`, `thumb`, `job_name`) VALUES
(1, 'admin04', 'eyJpdiI6IlpyN3ViYWlMRDhCNFlick8wVWFhTmc9PSIsInZhbHVlIjoieTJRY3RBcVdVXC9aODZGUUxxaWpJV1E9PSIsIm1hYyI6IjczYjBjNmFhOWZiZTcyMWYzMjZhZTdhOWI3Y2NmY2EwMDFiYzM1MzRkYTc3MGY4MDVjM2MwYTk0ZGIwMzVmMGUifQ==', '海勃湾征拆局', '二本', 3, '李四', '居民身份证', '123456789321458967', '1', '1', '', '初审'),
(2, 'admin02', 'eyJpdiI6IlZ1R0lHN0RBM3pCV3V4N1BYdndUVkE9PSIsInZhbHVlIjoiUHBNdk9QMzRyR2RXM3FvVHRTYjlEQT09IiwibWFjIjoiNDMyZTlmZjdmNTMwYWJkNjgwYWZkMWFmODZhMjgyNGUwODM0MGNlYjdmNDEzYWM0MzgxYzI5ZDFlMzljOGY1YyJ9', '海勃湾征拆局', '二本', 1, '王五', '居民身份证', '789456321456879654', '4', '1', '', '核算'),
(3, 'admin03', 'eyJpdiI6IkkrRXFURjZJdkVBVEQweUhnSUZOclE9PSIsInZhbHVlIjoid0lTeFlwWTc0dTRkNXpWTUZEODNtUT09IiwibWFjIjoiY2JiZTM3Njk5MTQ1ZjBiMmE3OGJmNDc5ZWU5MTBkMjdmMmQ3MDlmM2E5YTcyMmViMGIzYWFhNDE3OWM0ZWQ4ZiJ9', '海勃湾征拆局', '二本', 2, '小六', '居民身份证', '789654123654789632', '5', '1', '', '复核'),
(5, 'admin05', 'eyJpdiI6IlwvWTZLaVEzMjFQSTBNSTFDbXNsaTlRPT0iLCJ2YWx1ZSI6InJLK2lRODRZc3NIWFBcL0FTa3NPNnhnPT0iLCJtYWMiOiIyMWE0ODM3OWRmNTAxZmUzODRjZTU3MDVmN2JjMWZkZjEzNzdiMDNkZTUwMDRkYzQ4YmRhYTE3YzA0MjRlZjliIn0=', '海勃湾征拆局', '二本', 4, '染七', '居民身份证', '789654123654789632', '2', '1', '', '监审'),
(6, 'admin01', 'eyJpdiI6InBrdlgyc2d5SzgwTDcxKys5XC9xMmFRPT0iLCJ2YWx1ZSI6IlBEVFZaUXZiMmJYWjdPWjVlWXVrVGc9PSIsIm1hYyI6IjdiNjc2N2MyOWNmODgxZTAzMjJhZTVmYTIyM2JlMzViNzVmZDQ5OTdjN2VlNGUzMTFlYjczM2ViY2E4MWM3ZTcifQ==', '海勃湾征拆局', '二本', 0, '赵三', '居民身份证', '789654123654789632', '3', '1', 'img/20160902085742354.jpg', '工作人员'),
(7, 'admin', 'eyJpdiI6Im11VzA4VFQ4aEVXS1lzR3NOazE2Z1E9PSIsInZhbHVlIjoiQkdZTEdUSll3ZkNaWHVPZ1FjeTFUQT09IiwibWFjIjoiZTBhNzE2YjQ1MzIzNzhhZWE3MzdkYzI2MGZkMGU3OTMwNDk1NmQ2YjVmMGY1NWE3ZmJkMzlmNTYzMzcwZTY3YSJ9', '海勃湾征拆局', '二本', 5, '龙傲天', '居民身份证', '789654123654789632', '6', '1', 'img/20160902085742354.jpg', '管理员'),
(12, 'admin06', 'eyJpdiI6ImNBWmFJVUNiUTZVSElRNjIxTmNlQmc9PSIsInZhbHVlIjoidDJLdG9LOHRJVGREVXQxWVlxRVpDdz09IiwibWFjIjoiMDg2ZGI2NGJkNzExNWEyMDNmYjI5ZTg2ZWJlZmUwMTYxOGVhYjc3YmYwZjVjZjAzOWIxOTIxMzY4NmVkNDJmNSJ9', '海勃湾征拆局', '二本', 6, '李富贵', '居民身份证', '789654123654789632', '7', '1', '', '领导');

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

--
-- 表的结构 `user_role`
--

CREATE TABLE IF NOT EXISTS `user_role` (
  `user_id` int(10) NOT NULL,
  `role_id` int(10) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

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

INSERT INTO `user_role` (`user_id`, `role_id`) VALUES
(1, 1),
(2, 1),
(3, 2);

--
-- Indexes for dumped tables
--

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

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

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

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

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

--
-- Indexes for table `user_role`
--
ALTER TABLE `user_role`
  ADD PRIMARY KEY (`user_id`,`role_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `project`
--
ALTER TABLE `project`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `role`
--
ALTER TABLE `role`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `table_list`
--
ALTER TABLE `table_list`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `table_name`
--
ALTER TABLE `table_name`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `user_role`
--
ALTER TABLE `user_role`
  MODIFY `user_id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
/*!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 */;
