-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 10.27.6.148
-- Generation Time: 2017-06-08 09:23:08
-- 服务器版本： 5.7.17-13
-- 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: `jlwebdev`
--

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

--
-- 表的结构 `jl_sign`
--

CREATE TABLE IF NOT EXISTS `jl_sign` (
  `sid` int(11) NOT NULL COMMENT '主键',
  `project` int(11) NOT NULL COMMENT '项目主键',
  `tender` int(11) NOT NULL COMMENT '标段主键',
  `phaseno` int(11) NOT NULL COMMENT '期数',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表名',
  `ownuid` smallint(6) NOT NULL COMMENT '生成人id',
  `intime` int(11) NOT NULL COMMENT '生成时间',
  `pagenum` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '共有多少张报表，未解压默认为0',
  `widhei` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表纸张大小 以mm为单位',
  `audituid` smallint(6) UNSIGNED DEFAULT NULL COMMENT '发起人id',
  `aintime` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '发起时间',
  `status` enum('uncheck','checking','checked') NOT NULL DEFAULT 'uncheck' COMMENT '签署状态',
  `sintime` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '签署完成时间',
  `ishare` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否分享,0不分享（默认），1分享'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='在线签署报表信息表';

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

--
-- 表的结构 `jl_sign_attachment`
--

CREATE TABLE IF NOT EXISTS `jl_sign_attachment` (
  `said` int(11) UNSIGNED NOT NULL COMMENT '主键',
  `sid` int(11) UNSIGNED NOT NULL COMMENT '报表id主键',
  `curnum` smallint(5) UNSIGNED NOT NULL COMMENT '编号，第几张',
  `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表文件路径'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='签署文件信息表';

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

--
-- 表的结构 `jl_sign_audit`
--

CREATE TABLE IF NOT EXISTS `jl_sign_audit` (
  `satid` int(11) UNSIGNED NOT NULL COMMENT '主键',
  `sid` int(11) UNSIGNED NOT NULL COMMENT '报表id主键',
  `status` enum('uncheck','checking','checked') NOT NULL DEFAULT 'uncheck' COMMENT '个人签署状态',
  `audituid` int(11) UNSIGNED NOT NULL COMMENT '签署人id',
  `aname` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '签署人姓名',
  `intime` int(11) NOT NULL COMMENT '签署时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户签署表';

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

--
-- 表的结构 `jl_sign_audit_attachment`
--

CREATE TABLE IF NOT EXISTS `jl_sign_audit_attachment` (
  `saaid` int(11) NOT NULL COMMENT '主键',
  `audituid` int(11) NOT NULL COMMENT '签署人id',
  `said` int(11) NOT NULL COMMENT '报表文件id',
  `picpath` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '签名图片地址',
  `position` varchar(500) CHARACTER SET utf8 NOT NULL COMMENT '签名所在位置'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='用户签名关联表' ROW_FORMAT=COMPACT;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `jl_sign`
--
ALTER TABLE `jl_sign`
  ADD PRIMARY KEY (`sid`);

--
-- Indexes for table `jl_sign_attachment`
--
ALTER TABLE `jl_sign_attachment`
  ADD PRIMARY KEY (`said`);

--
-- Indexes for table `jl_sign_audit`
--
ALTER TABLE `jl_sign_audit`
  ADD PRIMARY KEY (`satid`);

--
-- Indexes for table `jl_sign_audit_attachment`
--
ALTER TABLE `jl_sign_audit_attachment`
  ADD PRIMARY KEY (`saaid`);

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

--
-- 使用表AUTO_INCREMENT `jl_sign`
--
ALTER TABLE `jl_sign`
  MODIFY `sid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=1;
--
-- 使用表AUTO_INCREMENT `jl_sign_attachment`
--
ALTER TABLE `jl_sign_attachment`
  MODIFY `said` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=1;
--
-- 使用表AUTO_INCREMENT `jl_sign_audit`
--
ALTER TABLE `jl_sign_audit`
  MODIFY `satid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=1;
--
-- 使用表AUTO_INCREMENT `jl_sign_audit_attachment`
--
ALTER TABLE `jl_sign_audit_attachment`
  MODIFY `saaid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=1;COMMIT;

ALTER TABLE `jl_user_profiles` ADD `signpath` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'global/signpath/signavatar.png' COMMENT '签名图片地址';

/*!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 */;
