-- phpMyAdmin SQL Dump
-- version 4.0.6
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015-10-28 10:33:01
-- 服务器版本: 10.0.3-MariaDB-1~quantal-log
-- PHP 版本: 5.5.9-1ubuntu4.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

--
-- 数据库: `jlwebtest`
--

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

--
-- 表的结构 `jl_attachment`
--

CREATE TABLE IF NOT EXISTS `jl_attachment` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `pid` mediumint(9) NOT NULL,
  `stid` mediumint(9) NOT NULL,
  `mpid` mediumint(9) NOT NULL,
  `pmid` mediumint(9) NOT NULL,
  `numpname` smallint(6) NOT NULL,
  `times` smallint(6) NOT NULL DEFAULT '0',
  `auditoruid` mediumint(9) NOT NULL,
  `filepath` char(255) NOT NULL,
  `ziphashcode` char(32) NOT NULL,
  `filehashcode` char(32) NOT NULL,
  `isnew` tinyint(4) NOT NULL DEFAULT '1',
  `intime` int(11) NOT NULL,
  PRIMARY KEY (`aid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2178 ;

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

--
-- 表的结构 `jl_auser`
--

CREATE TABLE IF NOT EXISTS `jl_auser` (
  `auid` mediumint(9) NOT NULL AUTO_INCREMENT,
  `auname` char(255) NOT NULL,
  `aupass` char(255) NOT NULL,
  `aemail` char(255) NOT NULL,
  PRIMARY KEY (`auid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

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

--
-- 表的结构 `jl_config`
--

CREATE TABLE IF NOT EXISTS `jl_config` (
  `conid` tinyint(4) NOT NULL AUTO_INCREMENT,
  `proname` char(255) NOT NULL,
  PRIMARY KEY (`conid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

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

--
-- 表的结构 `jl_item_attachment`
--

CREATE TABLE IF NOT EXISTS `jl_item_attachment` (
  `iaid` mediumint(11) NOT NULL AUTO_INCREMENT,
  `mpid` mediumint(11) NOT NULL,
  `ownerid` smallint(11) NOT NULL,
  `itemid` char(255) CHARACTER SET utf8 NOT NULL,
  `filename` char(255) CHARACTER SET utf8 NOT NULL,
  `fileext` char(5) CHARACTER SET utf8 NOT NULL,
  `filesize` char(255) CHARACTER SET utf8 NOT NULL,
  `filepath` char(255) CHARACTER SET utf8 NOT NULL,
  `categoryid` smallint(6) NOT NULL,
  `intime` int(11) NOT NULL,
  `isdel` tinyint(2) NOT NULL DEFAULT '0',
  `tips` text NOT NULL,
  PRIMARY KEY (`iaid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=26 ;

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

--
-- 表的结构 `jl_measure_audit`
--

CREATE TABLE IF NOT EXISTS `jl_measure_audit` (
  `maid` smallint(6) NOT NULL AUTO_INCREMENT,
  `pid` mediumint(9) NOT NULL,
  `creatoruid` mediumint(9) NOT NULL,
  `auditoruid` mediumint(9) NOT NULL DEFAULT '0',
  `mpid` mediumint(9) NOT NULL DEFAULT '0',
  `pmid` mediumint(9) NOT NULL,
  `stid` mediumint(9) NOT NULL,
  `numpname` mediumint(9) NOT NULL,
  `times` smallint(6) NOT NULL DEFAULT '0',
  `mastatus` enum('uncheck','checking','checked','checkno') NOT NULL DEFAULT 'uncheck',
  `last` tinyint(4) NOT NULL DEFAULT '2',
  `audittime` int(11) NOT NULL,
  `auditcontent` text NOT NULL,
  `intime` int(11) NOT NULL,
  PRIMARY KEY (`maid`),
  UNIQUE KEY `auditoruid` (`auditoruid`,`pmid`,`numpname`,`times`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3405 ;

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

--
-- 表的结构 `jl_measure_numofper`
--

CREATE TABLE IF NOT EXISTS `jl_measure_numofper` (
  `mpid` mediumint(9) NOT NULL AUTO_INCREMENT,
  `iszero` tinyint(3) unsigned NOT NULL,
  `uid` mediumint(9) NOT NULL,
  `pid` smallint(6) unsigned NOT NULL,
  `pmid` smallint(5) unsigned NOT NULL,
  `stid` smallint(5) unsigned NOT NULL,
  `numpname` smallint(5) unsigned NOT NULL,
  `times` smallint(6) NOT NULL DEFAULT '0',
  `currcontractval` char(255) NOT NULL COMMENT '本期合同计量',
  `currchangeval` char(255) NOT NULL COMMENT '本期数量变更计量',
  `stopnowtotal` char(255) NOT NULL COMMENT '截止上期累计完成',
  `currdone` char(255) NOT NULL COMMENT '本期完成计量',
  `curralltotal` char(255) NOT NULL COMMENT '累计完成计量',
  `currstatus` enum('uncheck','checking','checked','checkno') NOT NULL DEFAULT 'checking',
  `audittime` int(11) NOT NULL,
  `intime` int(11) NOT NULL,
  PRIMARY KEY (`mpid`),
  UNIQUE KEY `pmid_numpname_times` (`pmid`,`numpname`,`times`),
  UNIQUE KEY `mpid` (`mpid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=691 ;

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

--
-- 表的结构 `jl_project`
--

CREATE TABLE IF NOT EXISTS `jl_project` (
  `pid` int(11) NOT NULL AUTO_INCREMENT,
  `uid` mediumint(9) NOT NULL,
  `pname` char(255) NOT NULL,
  `intime` int(11) NOT NULL,
  PRIMARY KEY (`pid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=159 ;

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

--
-- 表的结构 `jl_project_measure`
--

CREATE TABLE IF NOT EXISTS `jl_project_measure` (
  `pmid` int(11) NOT NULL AUTO_INCREMENT,
  `pid` mediumint(8) DEFAULT '0',
  `stid` mediumint(8) NOT NULL DEFAULT '0',
  `uid` mediumint(9) NOT NULL,
  `pmname` char(255) DEFAULT NULL,
  `contracttotal` char(255) NOT NULL DEFAULT '0',
  `intime` int(11) NOT NULL,
  PRIMARY KEY (`pmid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=608 ;

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

--
-- 表的结构 `jl_section_type`
--

CREATE TABLE IF NOT EXISTS `jl_section_type` (
  `stid` int(11) NOT NULL AUTO_INCREMENT,
  `pid` mediumint(8) NOT NULL DEFAULT '0',
  `uid` mediumint(9) NOT NULL,
  `stname` char(255) NOT NULL,
  `stkey` char(255) NOT NULL,
  `intime` int(11) NOT NULL,
  PRIMARY KEY (`stid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=234 ;

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

--
-- 表的结构 `jl_users`
--

CREATE TABLE IF NOT EXISTS `jl_users` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `uemail` char(255) NOT NULL,
  `upass` char(60) NOT NULL,
  `intime` int(11) NOT NULL,
  `isstop` tinyint(1) NOT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `uemail` (`uemail`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=163 ;

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

--
-- 表的结构 `jl_users_auth`
--

CREATE TABLE IF NOT EXISTS `jl_users_auth` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `token` char(255) NOT NULL,
  `expirestime` int(11) NOT NULL,
  PRIMARY KEY (`aid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- 表的结构 `jl_users_friends`
--

CREATE TABLE IF NOT EXISTS `jl_users_friends` (
  `uid` int(11) NOT NULL,
  `fuid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- 表的结构 `jl_user_profiles`
--

CREATE TABLE IF NOT EXISTS `jl_user_profiles` (
  `userid` int(11) NOT NULL,
  `name` char(50) NOT NULL,
  `company` char(255) NOT NULL,
  `jobs` char(255) NOT NULL,
  `phone` char(255) NOT NULL,
  `mobile` char(255) NOT NULL,
  `qq` char(50) NOT NULL,
  `groups` enum('vip','anonymous') NOT NULL DEFAULT 'anonymous',
  `avatar` char(255) NOT NULL DEFAULT 'global/avatar/avtra.jpg',
  UNIQUE KEY `userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- 表的结构 `jl_zero_audit`
--

CREATE TABLE IF NOT EXISTS `jl_zero_audit` (
  `zaid` smallint(6) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `catid` int(11) NOT NULL,
  `auditstatus` int(11) NOT NULL,
  PRIMARY KEY (`zaid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
