-- phpMyAdmin SQL Dump
-- version 2.11.9.4
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2017 年 05 月 20 日 00:30
-- 服务器版本: 5.1.73
-- PHP 版本: 5.3.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


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

--
-- 数据库: `jxc`
--

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

--
-- 表的结构 `applyout`
--

CREATE TABLE IF NOT EXISTS `applyout` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  `branch` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '-1',
  `outed` smallint(6) NOT NULL DEFAULT '0',
  `applyUser` varchar(20) NOT NULL,
  `applyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  `amount` float NOT NULL,
  `unit` varchar(10) NOT NULL,
  `auditUser` varchar(20) DEFAULT NULL,
  `memo` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='出库申请' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `applyout`
--


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

--
-- 表的结构 `baofei`
--

CREATE TABLE IF NOT EXISTS `baofei` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  `class` int(11) NOT NULL,
  `storage` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL,
  `barcode` varchar(20) NOT NULL,
  `brand` varchar(20) NOT NULL,
  `amount` float NOT NULL,
  `unit` varchar(10) NOT NULL,
  `price` float NOT NULL,
  `auditUser` varchar(20) DEFAULT NULL,
  `auditTime` timestamp NULL DEFAULT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  `memo` varchar(200) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`stock`,`class`,`storage`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='商品报废申请' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `baofei`
--


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

--
-- 表的结构 `branch`
--

CREATE TABLE IF NOT EXISTS `branch` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `address` varchar(50) NOT NULL,
  `telephone` varchar(20) NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='分店表' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `branch`
--


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

--
-- 表的结构 `classify`
--

CREATE TABLE IF NOT EXISTS `classify` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `name` varchar(30) NOT NULL,
  `lrl` float NOT NULL DEFAULT '25',
  `alarm` float NOT NULL DEFAULT '20',
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='货物分类' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `classify`
--


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

--
-- 表的结构 `company`
--

CREATE TABLE IF NOT EXISTS `company` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parentId` int(11) NOT NULL DEFAULT '0',
  `sonSum` int(11) NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL,
  `address` char(100) DEFAULT NULL,
  `telephone` varchar(20) DEFAULT NULL,
  `regTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `addUser` varchar(20) NOT NULL,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `telephone` (`telephone`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='公司企业名称注册' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `company`
--


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

--
-- 表的结构 `fancang`
--

CREATE TABLE IF NOT EXISTS `fancang` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goodsId` int(11) NOT NULL,
  `comId` int(11) NOT NULL,
  `class` int(11) NOT NULL,
  `branch` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  `storage` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '0',
  `amount` float NOT NULL,
  `unit` varchar(10) NOT NULL,
  `auditUser` varchar(20) DEFAULT NULL,
  `auditTime` timestamp NULL DEFAULT NULL,
  `jsUser` varchar(20) DEFAULT NULL,
  `jsTime` timestamp NULL DEFAULT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  `memo` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`class`,`branch`,`status`,`goodsId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='在售商品返回到仓库申请' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `fancang`
--


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

--
-- 表的结构 `goods`
--

CREATE TABLE IF NOT EXISTS `goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  `class` int(20) NOT NULL,
  `branch` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '1',
  `name` varchar(50) NOT NULL,
  `asName` varchar(50) NOT NULL,
  `barcode` varchar(20) NOT NULL,
  `vender` varchar(50) NOT NULL,
  `brand` varchar(20) NOT NULL,
  `colour` varchar(10) NOT NULL,
  `wrap` varchar(20) NOT NULL,
  `spe` varchar(50) NOT NULL,
  `unit` varchar(10) NOT NULL,
  `amount` float NOT NULL,
  `price` float NOT NULL,
  `average` float NOT NULL,
  `retail` float NOT NULL,
  `promotion` float NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`stock`,`class`,`name`,`asName`,`barcode`,`branch`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='库存' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `goods`
--


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

--
-- 表的结构 `grade`
--

CREATE TABLE IF NOT EXISTS `grade` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `name` varchar(20) NOT NULL,
  `start` float NOT NULL DEFAULT '0',
  `end` float NOT NULL DEFAULT '0',
  `sale` float NOT NULL DEFAULT '10',
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='会员等级表' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `grade`
--


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

--
-- 表的结构 `instorage`
--

CREATE TABLE IF NOT EXISTS `instorage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  `barcode` varchar(20) NOT NULL,
  `amount` float NOT NULL DEFAULT '0',
  `price` float NOT NULL DEFAULT '0',
  `unit` varchar(10) NOT NULL,
  `meny` float NOT NULL DEFAULT '0',
  `buyUser` varchar(20) NOT NULL,
  `buyDate` date NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='库存' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `instorage`
--


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

--
-- 表的结构 `member`
--

CREATE TABLE IF NOT EXISTS `member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `branch` int(11) NOT NULL,
  `grade` int(11) NOT NULL,
  `account` varchar(20) NOT NULL,
  `name` varchar(20) NOT NULL,
  `sex` smallint(6) NOT NULL DEFAULT '1',
  `telephone` varchar(20) NOT NULL,
  `address` varchar(50) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '1',
  `meny` float NOT NULL,
  `monetary` float NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`branch`,`grade`,`account`,`telephone`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='会员表' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `member`
--


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

--
-- 表的结构 `menu`
--

CREATE TABLE IF NOT EXISTS `menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `label` varchar(20) NOT NULL,
  `forId` int(11) NOT NULL DEFAULT '0',
  `orderId` int(11) NOT NULL DEFAULT '0',
  `link` varchar(150) DEFAULT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `label` (`label`,`forId`,`orderId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='菜单定义' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `menu`
--


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

--
-- 表的结构 `office`
--

CREATE TABLE IF NOT EXISTS `office` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `parId` int(11) NOT NULL,
  `sonSum` int(11) NOT NULL DEFAULT '0',
  `name` varchar(30) NOT NULL,
  `memory` varchar(200) DEFAULT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='公司设置的部门表' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `office`
--


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

--
-- 表的结构 `online`
--

CREATE TABLE IF NOT EXISTS `online` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `userNick` varchar(20) NOT NULL,
  `onlyMark` varchar(64) NOT NULL,
  `loginTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='登录状态记录表' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `online`
--


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

--
-- 表的结构 `operation`
--

CREATE TABLE IF NOT EXISTS `operation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `operType` smallint(6) NOT NULL DEFAULT '0',
  `userNick` varchar(20) NOT NULL,
  `idList` varchar(500) NOT NULL,
  `memo` varchar(200) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `operType` (`comId`,`operType`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='用户操作记录' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `operation`
--


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

--
-- 表的结构 `outstorage`
--

CREATE TABLE IF NOT EXISTS `outstorage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  `applyOut` int(11) NOT NULL,
  `retail` float NOT NULL DEFAULT '-1',
  `amount` float NOT NULL DEFAULT '-1',
  `unit` varchar(10) NOT NULL,
  `outDate` date NOT NULL,
  `apply` varchar(20) NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='库存' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `outstorage`
--


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

--
-- 表的结构 `power`
--

CREATE TABLE IF NOT EXISTS `power` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `userNick` varchar(20) NOT NULL,
  `comId` int(11) NOT NULL,
  `officeId` int(11) NOT NULL DEFAULT '-1',
  `operateObj` varchar(100) NOT NULL,
  `operate` varchar(500) NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `forUserNick` (`userNick`,`comId`,`officeId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='用户权限设定表' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `power`
--


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

--
-- 表的结构 `promotion`
--

CREATE TABLE IF NOT EXISTS `promotion` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `goodsId` int(11) NOT NULL,
  `branch` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '1',
  `member` smallint(6) NOT NULL DEFAULT '0',
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `start` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `addUser` varchar(20) NOT NULL,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`goodsId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='销售活动' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `promotion`
--


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

--
-- 表的结构 `purchase`
--

CREATE TABLE IF NOT EXISTS `purchase` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `storage` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '0',
  `auditUser` varchar(20) DEFAULT NULL,
  `applyUser` varchar(20) NOT NULL,
  `needDate` timestamp NULL DEFAULT NULL,
  `class` varchar(20) NOT NULL,
  `name` varchar(50) NOT NULL,
  `barcode` varchar(20) NOT NULL,
  `vender` varchar(50) NOT NULL,
  `brand` varchar(20) NOT NULL,
  `colour` varchar(10) NOT NULL,
  `wrap` varchar(20) NOT NULL,
  `spe` varchar(50) NOT NULL,
  `unit` varchar(10) NOT NULL,
  `amount` float NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `comId` (`comId`,`storage`,`status`,`applyUser`,`needDate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='采购' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `purchase`
--


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

--
-- 表的结构 `purnote`
--

CREATE TABLE IF NOT EXISTS `purnote` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `purId` varchar(500) NOT NULL,
  `noteNo` varchar(30) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '0',
  `purUser` varchar(50) NOT NULL,
  `buyTime` timestamp NULL DEFAULT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  `memo` varchar(200) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`noteNo`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='采购单' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `purnote`
--


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

--
-- 表的结构 `soldnote`
--

CREATE TABLE IF NOT EXISTS `soldnote` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `branch` int(11) NOT NULL,
  `barcode` varchar(20) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '1',
  `userNick` varchar(20) NOT NULL,
  `goods` int(11) NOT NULL,
  `member` varchar(20) NOT NULL DEFAULT '0',
  `promotion` smallint(6) NOT NULL DEFAULT '0',
  `amount` float NOT NULL,
  `unit` varchar(10) NOT NULL,
  `retail` float NOT NULL,
  `price` float NOT NULL,
  `meny` float NOT NULL DEFAULT '0',
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`branch`,`status`,`userNick`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='销售记录' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `soldnote`
--


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

--
-- 表的结构 `station`
--

CREATE TABLE IF NOT EXISTS `station` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `stationName` varchar(20) NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='工作岗位' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `station`
--


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

--
-- 表的结构 `stock`
--

CREATE TABLE IF NOT EXISTS `stock` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `storage` int(11) NOT NULL,
  `class` varchar(20) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '1',
  `name` varchar(50) NOT NULL,
  `asName` varchar(50) NOT NULL,
  `barcode` varchar(20) NOT NULL,
  `vender` varchar(50) NOT NULL,
  `brand` varchar(20) NOT NULL,
  `colour` varchar(10) NOT NULL,
  `wrap` varchar(20) NOT NULL,
  `spe` varchar(50) NOT NULL,
  `unit` varchar(10) NOT NULL,
  `amount` float NOT NULL,
  `price` float NOT NULL,
  `average` float NOT NULL,
  `retail` float NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`storage`,`class`,`name`,`asName`,`barcode`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='库存' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `stock`
--


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

--
-- 表的结构 `storage`
--

CREATE TABLE IF NOT EXISTS `storage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '1',
  `name` varchar(50) NOT NULL,
  `address` varchar(50) NOT NULL,
  `telephone` varchar(20) NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='仓库' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `storage`
--


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

--
-- 表的结构 `tongzhi`
--

CREATE TABLE IF NOT EXISTS `tongzhi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comId` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '1',
  `caption` varchar(50) NOT NULL,
  `content` varchar(500) NOT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`comId`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='通知表' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `tongzhi`
--


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

--
-- 表的结构 `tuihuo`
--

CREATE TABLE IF NOT EXISTS `tuihuo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `inId` int(11) NOT NULL,
  `comId` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '0',
  `class` int(11) NOT NULL DEFAULT '0',
  `barcode` varchar(20) NOT NULL,
  `amount` float NOT NULL,
  `sjSum` float NOT NULL DEFAULT '0',
  `unit` varchar(10) NOT NULL,
  `price` float NOT NULL,
  `meny` float NOT NULL,
  `auditUser` varchar(20) NOT NULL,
  `auditTime` timestamp NULL DEFAULT NULL,
  `addUser` varchar(20) NOT NULL,
  `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  `memo` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `comId` (`inId`,`comId`,`stock`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='退货记录表' AUTO_INCREMENT=1 ;

--
-- 导出表中的数据 `tuihuo`
--


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

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

CREATE TABLE IF NOT EXISTS `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userNick` varchar(20) NOT NULL,
  `password` varchar(64) NOT NULL,
  `privatePass` varchar(64) NOT NULL,
  `comId` int(11) NOT NULL,
  `officeId` int(11) NOT NULL,
  `branch` int(11) NOT NULL,
  `station` int(11) NOT NULL DEFAULT '-1',
  `rightId` smallint(6) NOT NULL DEFAULT '3',
  `name` varchar(20) NOT NULL,
  `sex` smallint(6) NOT NULL DEFAULT '1',
  `jiGuan` varchar(30) DEFAULT NULL,
  `telephone` varchar(20) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `birthday` varchar(20) NOT NULL,
  `photo` varchar(20) DEFAULT NULL,
  `teChang` varchar(100) DEFAULT NULL,
  `zhiCheng` varchar(20) DEFAULT NULL,
  `zcDate` varchar(20) DEFAULT NULL,
  `diYiXueLi` varchar(20) DEFAULT NULL,
  `diYibyxx` varchar(30) DEFAULT NULL,
  `diYibysj` varchar(20) DEFAULT NULL,
  `deErXueLi` varchar(20) DEFAULT NULL,
  `deErbyxx` varchar(30) DEFAULT NULL,
  `deErbysj` varchar(20) NOT NULL,
  `workDate` varchar(20) DEFAULT NULL,
  `outDate` varchar(20) DEFAULT NULL,
  `memo` text,
  `addUser` varchar(20) NOT NULL,
  `regTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `userNick` (`userNick`,`password`,`officeId`,`name`,`station`,`branch`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='用户表' AUTO_INCREMENT=2 ;

--
-- 导出表中的数据 `user`
--

INSERT INTO `user` (`id`, `userNick`, `password`, `privatePass`, `comId`, `officeId`, `branch`, `station`, `rightId`, `name`, `sex`, `jiGuan`, `telephone`, `address`, `birthday`, `photo`, `teChang`, `zhiCheng`, `zcDate`, `diYiXueLi`, `diYibyxx`, `diYibysj`, `deErXueLi`, `deErbyxx`, `deErbysj`, `workDate`, `outDate`, `memo`, `addUser`, `regTime`, `ip`) VALUES
(1, 'admin', '37b367907d650255bb4ac73b32eb4076', '25681', 1, 1, 1, -1, 1, '系统管理员', 1, '', '', '', '1982-06-24', '12563.jpg', '计算机应用与维护', '无', '', '专科', '商丘师院', '2014-07', '', '', '', '2017-05', '', NULL, 'admin', '2017-04-08 17:41:54', '192.168.1.90');
