-- http://www.phpmyadmin.net
--
-- 服务器版本： 10.1.19-MariaDB




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

--
-- 表的结构 `area`
--

CREATE TABLE `area` (
  `id` int(10) UNSIGNED NOT NULL,
  `text` varchar(80) NOT NULL COMMENT '地区名称',
  `pid` int(10) UNSIGNED DEFAULT '0' COMMENT '父地区',
  `lft` int(10) UNSIGNED DEFAULT '0' COMMENT '分类左值',
  `rgt` int(10) UNSIGNED DEFAULT '0' COMMENT '分类右值',
  `type` tinyint(3) UNSIGNED DEFAULT '0' COMMENT '地区类型,0-国家,1-省份,2-城市,3-地区'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- 表的结构 `authlimit`
--

CREATE TABLE `authlimit` (
  `id` int(10) UNSIGNED NOT NULL,
  `username` varchar(500) NOT NULL DEFAULT '' COMMENT '用户名',
  `status` tinyint(1) DEFAULT '0' COMMENT '登陆状态:1-成功,0-失败',
  `create_time` int(11) DEFAULT NULL COMMENT '请求时间',
  `times` tinyint(1) UNSIGNED DEFAULT '1' COMMENT '请求错误次数'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='登陆日志';

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

INSERT INTO `authlimit` (`id`, `username`, `status`, `create_time`, `times`) VALUES
(1, 'admin', 0, 1511418503, 2),
(2, 'admin', 0, 1511506359, 1);

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

--
-- 表的结构 `backup`
--

CREATE TABLE `backup` (
  `id` int(10) UNSIGNED NOT NULL,
  `filename` varchar(80) NOT NULL COMMENT '本分文件名',
  `filesize` varchar(80) NOT NULL COMMENT '文件大小',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '备份时间',
  `remark` varchar(80) NOT NULL DEFAULT '' COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据库备份';

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

--
-- 表的结构 `buyer`
--

CREATE TABLE `buyer` (
  `id` int(11) NOT NULL COMMENT '买家',
  `name` varchar(28) NOT NULL COMMENT '买家名称',
  `tel` varchar(80) DEFAULT '' COMMENT '联系电话',
  `tag` varchar(88) NOT NULL COMMENT '标签',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='买家';

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

INSERT INTO `buyer` (`id`, `name`, `tel`, `tag`, `create_time`) VALUES
(1, '万禾配送', '18007877303', '', NULL);

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

--
-- 表的结构 `buyerbinding`
--

CREATE TABLE `buyerbinding` (
  `id` int(11) NOT NULL,
  `wid` int(11) NOT NULL COMMENT '用户ID',
  `buyer` int(11) NOT NULL COMMENT '买家'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='买家绑定';

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

INSERT INTO `buyerbinding` (`id`, `wid`, `buyer`) VALUES
(4, 5, 1),
(3, 9, 1),
(5, 10, 1);

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

--
-- 表的结构 `buyerstatistic`
--

CREATE TABLE `buyerstatistic` (
  `id` int(10) UNSIGNED NOT NULL,
  `buyer` int(11) NOT NULL COMMENT '买家',
  `money` decimal(9,2) NOT NULL COMMENT '销售额',
  `order_amount` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '订单数',
  `date` date DEFAULT NULL COMMENT '日期'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='买家统计';

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

INSERT INTO `buyerstatistic` (`id`, `buyer`, `money`, `order_amount`, `date`) VALUES
(1, 1, '3224.00', 2, '2017-12-05');

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

--
-- 表的结构 `cart`
--

CREATE TABLE `cart` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `goods_id` int(10) UNSIGNED NOT NULL COMMENT '商品',
  `goods_name` varchar(28) NOT NULL COMMENT '食品名称',
  `buyer` int(10) UNSIGNED NOT NULL COMMENT '买家',
  `seller` int(10) UNSIGNED NOT NULL COMMENT '卖家',
  `amount` float(6,1) NOT NULL DEFAULT '1.0' COMMENT '购买数量',
  `unit` varchar(28) DEFAULT '斤' COMMENT '单位',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='购物车';

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

--
-- 表的结构 `category`
--

CREATE TABLE `category` (
  `id` int(10) UNSIGNED NOT NULL,
  `text` varchar(50) NOT NULL COMMENT '分类名称',
  `lft` int(10) UNSIGNED DEFAULT '0' COMMENT '分类左值',
  `rgt` int(10) UNSIGNED DEFAULT '0' COMMENT '分类右值',
  `pid` int(10) UNSIGNED DEFAULT '0' COMMENT '父ID',
  `hide` tinyint(3) UNSIGNED DEFAULT '1' COMMENT '是否隐藏:0-隐藏,1-显示'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='内容分类';

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

INSERT INTO `category` (`id`, `text`, `lft`, `rgt`, `pid`, `hide`) VALUES
(1, '内容分类', 1, 2, 0, 1);

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

--
-- 表的结构 `document`
--

CREATE TABLE `document` (
  `id` int(10) UNSIGNED NOT NULL,
  `cid` smallint(5) UNSIGNED NOT NULL COMMENT '分类ID',
  `title` varchar(35) NOT NULL COMMENT '文章标题',
  `content` text NOT NULL COMMENT '文章内容',
  `hide` smallint(5) UNSIGNED DEFAULT '1' COMMENT '是否隐藏:0-隐藏,1-显示',
  `admin_id` int(10) UNSIGNED NOT NULL COMMENT '发布人',
  `keywords` varchar(200) NOT NULL COMMENT '关键字',
  `description` varchar(200) NOT NULL COMMENT '文章描述',
  `url` varchar(200) NOT NULL COMMENT '原文地址',
  `rank` tinyint(3) UNSIGNED DEFAULT '0' COMMENT '排序',
  `view` int(10) UNSIGNED NOT NULL COMMENT '阅读次数',
  `publish_date` date DEFAULT NULL COMMENT '发表时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='文章内容';

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

--
-- 表的结构 `emailcode`
--

CREATE TABLE `emailcode` (
  `id` int(11) NOT NULL,
  `email` varchar(30) NOT NULL DEFAULT '' COMMENT '电子邮箱',
  `code` varchar(20) NOT NULL DEFAULT '' COMMENT '验证码',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='邮箱验证码';

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

--
-- 表的结构 `func`
--

CREATE TABLE `func` (
  `id` int(10) UNSIGNED NOT NULL,
  `text` varchar(50) NOT NULL COMMENT '功能名',
  `code` varchar(50) NOT NULL COMMENT '功能代码',
  `description` varchar(100) NOT NULL COMMENT '功能描述',
  `type` tinyint(3) UNSIGNED DEFAULT '2' COMMENT '功能类型:1-模块,2-控制器,3-动作',
  `lft` int(10) UNSIGNED DEFAULT '0' COMMENT '分类左值',
  `rgt` int(10) UNSIGNED DEFAULT '0' COMMENT '分类右值',
  `pid` int(10) UNSIGNED DEFAULT '0' COMMENT '父ID',
  `remark` varchar(80) NOT NULL DEFAULT '' COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限';

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

INSERT INTO `func` (`id`, `text`, `code`, `description`, `type`, `lft`, `rgt`, `pid`, `remark`) VALUES
(1, '功能模块', 'Func', '功能模块根节点', 0, 1, 2, 0, '根节点请勿删除!');

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

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

CREATE TABLE `goods` (
  `id` int(11) NOT NULL COMMENT '物品',
  `cid` int(11) NOT NULL COMMENT '物品分类',
  `name` varchar(28) NOT NULL COMMENT '物品名称',
  `pinyin` varchar(20) NOT NULL COMMENT '物品拼音'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='物品';

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

INSERT INTO `goods` (`id`, `cid`, `name`, `pinyin`) VALUES
(1, 4, '西红柿', ''),
(2, 4, '冬瓜', ''),
(12, 4, '白菜', ''),
(21, 4, '西兰花', ''),
(22, 4, '青椒', ''),
(24, 1, '红辣椒', ''),
(25, 1, '洋葱', ''),
(26, 1, '鸡肉', ''),
(27, 1, '土豆', ''),
(28, 1, '草鱼', ''),
(30, 1, '花生', ''),
(31, 1, '南瓜', ''),
(32, 1, '丝瓜', ''),
(33, 1, '茄子', ''),
(34, 1, '生菜', ''),
(35, 1, '牛腩', ''),
(36, 1, '花菜', ''),
(37, 1, '香蕉', ''),
(38, 1, '猪肉', ''),
(39, 1, '鸡蛋', ''),
(40, 1, '果园鸡', ''),
(41, 1, '苹果', ''),
(42, 1, '芹菜', ''),
(43, 1, '菜花', ''),
(44, 1, '黄豆', ''),
(45, 1, '排骨', ''),
(46, 1, '青瓜', ''),
(47, 1, '生抽', ''),
(48, 1, '海天酱油', ''),
(49, 1, '干辣椒', ''),
(50, 1, '青辣椒', ''),
(51, 1, '鸭蛋', ''),
(54, 7, '腐竹', ''),
(55, 3, '卤水', ''),
(56, 3, '包装酸菜', ''),
(57, 7, '散豆鼓', ''),
(58, 3, '海天料酒', ''),
(59, 3, '三花奶', ''),
(60, 5, '大鸡蛋', ''),
(61, 5, '中鸡蛋', ''),
(62, 5, '鹌鹑蛋', ''),
(63, 1, '茼蒿', ''),
(64, 1, '苦麻菜', ''),
(65, 1, '酸菜鱼料', '');

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

--
-- 表的结构 `goodsalias`
--

CREATE TABLE `goodsalias` (
  `id` int(11) NOT NULL COMMENT '物品别名',
  `goods` int(11) NOT NULL COMMENT '物品',
  `name` varchar(28) NOT NULL COMMENT '别名',
  `pinyin` varchar(20) NOT NULL COMMENT '别名拼音'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='物品别名';

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

INSERT INTO `goodsalias` (`id`, `goods`, `name`, `pinyin`) VALUES
(5, 1, '番茄', ''),
(6, 2, '白瓜', ''),
(21, 2, '东瓜', '');

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

--
-- 表的结构 `goodscategory`
--

CREATE TABLE `goodscategory` (
  `id` int(11) NOT NULL COMMENT '分类ID',
  `name` varchar(28) NOT NULL COMMENT '分类名称'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='物品分类';

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

INSERT INTO `goodscategory` (`id`, `name`) VALUES
(7, '干杂'),
(1, '未知分类'),
(2, '肉类'),
(4, '蔬菜'),
(5, '蛋类'),
(3, '调味品');

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

--
-- 表的结构 `image`
--

CREATE TABLE `image` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL COMMENT '用户ID',
  `user_type` varchar(10) DEFAULT '' COMMENT '用户类型:admin-管理员,user-用户',
  `rtable` varchar(15) NOT NULL COMMENT '关联表',
  `rid` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '关联ID',
  `type` tinyint(1) DEFAULT '0' COMMENT '类型',
  `path` varchar(200) DEFAULT '' COMMENT '图片地址',
  `title` varchar(50) DEFAULT '' COMMENT '图片名称',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '上传时间',
  `remark` varchar(80) NOT NULL DEFAULT '' COMMENT '备注'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='上传图片';

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

INSERT INTO `image` (`id`, `user_id`, `user_type`, `rtable`, `rid`, `type`, `path`, `title`, `create_time`, `remark`) VALUES
(4, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120269709721.png', '15120269709721.png', '2017-11-30 07:29:47', 'ojWzzjuhUkREXt45SUw0HtPaGeVs'),
(3, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120269709978.png', '15120269709978.png', '2017-11-30 07:29:46', 'ojWzzjgnqDg721EdAOHoTu8SYeVw'),
(5, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120269707456.png', '15120269707456.png', '2017-11-30 07:29:49', 'ojWzzjqJKzkzsNQWdUyxA2PzNCnQ'),
(9, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120272598638.png', '15120272598638.png', '2017-11-30 07:34:35', 'o6EX5w8dwFuOEgcMuEAGUvrMaGkY'),
(8, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120272571213.png', '15120272571213.png', '2017-11-30 07:34:34', 'o6EX5wxoagFqQYam58J8fRz6pLdU'),
(10, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/1512027259145.png', '1512027259145.png', '2017-11-30 07:34:37', 'o6EX5wwRkZGXkdkehkDQKDVgzHKc'),
(11, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120272607475.png', '15120272607475.png', '2017-11-30 07:34:38', 'o6EX5w60NdE4PwKGuzYpegoaxuyg'),
(12, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120272608660.png', '15120272608660.png', '2017-11-30 07:34:38', 'o6EX5w5GXmMze5iepMEEGtrtoJzM'),
(13, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120272597516.png', '15120272597516.png', '2017-11-30 07:34:39', 'o6EX5w0GHs0bgEu_f9WbSbnoSyuA'),
(16, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15123095621102.png', '15123095621102.png', '2017-12-03 13:59:41', 'o6EX5w-Z1c8sJychRP3VUWWH9t_Q'),
(15, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15120275169647.png', '15120275169647.png', '2017-11-30 07:38:54', 'o6EX5w_R4g7IPm9FG0bq0GK1PyeM'),
(17, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/1512351039469.png', '1512351039469.png', '2017-12-04 01:30:57', 'o6EX5w1Kpqoi8Xf0n4rNFrrHAtGI'),
(18, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15123539526577.png', '15123539526577.png', '2017-12-04 02:19:31', 'o6EX5w41qQ7m7HvkL_WEJ_Vat_lQ'),
(19, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15123549661409.png', '15123549661409.png', '2017-12-04 02:36:21', 'o6EX5w-zFHVawgPRM8bUOX6IosuM'),
(20, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15123557012215.png', '15123557012215.png', '2017-12-04 02:48:36', 'o6EX5w3GqO8X_cLNP-RhKm75tdC0'),
(21, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/1512357445284.png', '1512357445284.png', '2017-12-04 03:17:41', 'o6EX5w_g7IqLhi0IrDzZtrgmOOhM'),
(22, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15123610663485.png', '15123610663485.png', '2017-12-04 04:17:32', 'o6EX5w3Fw_6HYG2V_hIl3mlW5J0c'),
(23, 0, 'wechat', 'WechatUser', 0, 0, 'Resources/grab/wechat/15123828065174.png', '15123828065174.png', '2017-12-04 10:20:23', 'o6EX5w9g817p720WF46EVivwuagk');

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

--
-- 表的结构 `imagematerial`
--

CREATE TABLE `imagematerial` (
  `id` int(10) UNSIGNED NOT NULL,
  `type` tinyint(1) DEFAULT '1' COMMENT '是否订阅:1-图片,2-缩略图',
  `media_id` varchar(100) DEFAULT '' COMMENT '媒体标识',
  `url` varchar(160) DEFAULT '' COMMENT '访问地址',
  `remark` varchar(50) DEFAULT '' COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='微信永久图片素材';

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

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

CREATE TABLE `menu` (
  `id` int(10) UNSIGNED NOT NULL,
  `text` varchar(30) NOT NULL DEFAULT '' COMMENT '菜单名',
  `level` tinyint(3) UNSIGNED DEFAULT '1' COMMENT '菜单类型:0-顶级菜单,1-一级菜单,2-二级菜单',
  `url` varchar(50) NOT NULL COMMENT '请求地址',
  `icon` varchar(30) NOT NULL COMMENT '菜单图标',
  `rank` tinyint(3) UNSIGNED DEFAULT '0' COMMENT '菜单排序',
  `pid` int(10) UNSIGNED DEFAULT '0' COMMENT '父菜单ID',
  `func` int(10) UNSIGNED DEFAULT '0' COMMENT '功能ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='菜单';

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

--
-- 表的结构 `myseller`
--

CREATE TABLE `myseller` (
  `id` int(11) NOT NULL COMMENT '我的卖家',
  `buyer` int(11) NOT NULL COMMENT '买家',
  `seller` int(11) NOT NULL COMMENT '卖家'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='我的卖家';

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

INSERT INTO `myseller` (`id`, `buyer`, `seller`) VALUES
(2, 1, 1),
(3, 1, 2),
(4, 1, 3),
(6, 1, 4),
(7, 1, 5),
(5, 1, 6),
(8, 1, 7);

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

--
-- 表的结构 `newsarticle`
--

CREATE TABLE `newsarticle` (
  `id` int(10) UNSIGNED NOT NULL,
  `nid` int(10) UNSIGNED DEFAULT '0' COMMENT '图文素材ID',
  `title` varchar(50) NOT NULL COMMENT '标题',
  `thumb_media_id` varchar(100) NOT NULL COMMENT '封面图ID',
  `author` varchar(50) NOT NULL COMMENT '作者',
  `digest` varchar(150) NOT NULL COMMENT '摘要,仅单图文有效',
  `show_cover_pic` tinyint(1) DEFAULT '1' COMMENT '显示封面:0-不显示,1-显示',
  `content` text NOT NULL COMMENT '内容',
  `content_source_url` varchar(150) NOT NULL COMMENT '原文地址',
  `rank` tinyint(3) UNSIGNED DEFAULT '0' COMMENT '排序',
  `sequence` tinyint(3) UNSIGNED DEFAULT '0' COMMENT '内部排序',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='微信永久图文素材文章';

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

--
-- 表的结构 `newsmaterial`
--

CREATE TABLE `newsmaterial` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL COMMENT '图文素材名称',
  `media_id` varchar(100) DEFAULT '' COMMENT '素材标示',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='微信永久图片素材';

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

--
-- 表的结构 `orderitem`
--

CREATE TABLE `orderitem` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '订单',
  `goods` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '食品',
  `goods_name` varchar(28) NOT NULL COMMENT '食品名称',
  `selling` decimal(9,1) NOT NULL DEFAULT '0.0' COMMENT '销售价',
  `unit` varchar(5) DEFAULT '斤' COMMENT '单位',
  `amount` float(6,1) NOT NULL DEFAULT '1.0' COMMENT '数量',
  `actual` float(6,1) NOT NULL DEFAULT '1.0' COMMENT '实送',
  `actual_unit` varchar(5) DEFAULT '斤' COMMENT '实送单位',
  `is_replenish` tinyint(4) DEFAULT '0' COMMENT '是否补货:0-否,1-是'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单详情';

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

INSERT INTO `orderitem` (`id`, `order_id`, `goods`, `goods_name`, `selling`, `unit`, `amount`, `actual`, `actual_unit`, `is_replenish`) VALUES
(1, 1, 55, '卤水', '65.0', '件', 1.0, 1.0, '件', 0),
(2, 1, 56, '包装酸菜', '65.0', '件', 1.0, 1.0, '件', 0),
(3, 1, 57, '散豆鼓', '4.0', '斤', 5.0, 5.0, '斤', 0),
(4, 1, 58, '海天料酒', '60.0', '件', 5.0, 5.0, '件', 0),
(5, 1, 59, '三花奶', '7.0', '瓶', 2.0, 2.0, '瓶', 0),
(6, 2, 60, '大鸡蛋', '260.0', '件', 5.0, 5.0, '件', 0),
(7, 2, 61, '中鸡蛋', '253.0', '件', 5.0, 5.0, '件', 0),
(8, 2, 62, '鹌鹑蛋', '135.0', '件', 1.0, 1.0, '件', 0),
(10, 4, 63, '茼蒿', '0.0', '斤', 7.0, 7.0, '斤', 0),
(11, 4, 64, '苦麻菜', '0.0', '斤', 3.0, 3.0, '斤', 0),
(12, 5, 38, '猪肉', '22.0', '斤', 2.0, 2.0, '斤', 0),
(13, 1, 65, '酸菜鱼料', '60.0', '件', 1.0, 1.0, '件', 1);

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

--
-- 表的结构 `purchasingorder`
--

CREATE TABLE `purchasingorder` (
  `id` int(11) NOT NULL,
  `seller` int(11) NOT NULL COMMENT '卖家',
  `buyer` int(11) NOT NULL COMMENT '买家',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态:0-订单取消,1-下单成功,2-报价完成',
  `trade_no` varchar(20) NOT NULL COMMENT '订单号',
  `wid` int(11) NOT NULL COMMENT '下单人',
  `total` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总价',
  `amount` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '总数',
  `remark` varchar(88) NOT NULL COMMENT '特别叮嘱',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `delivery_date` date DEFAULT NULL COMMENT '配送时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单';

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

INSERT INTO `purchasingorder` (`id`, `seller`, `buyer`, `status`, `trade_no`, `wid`, `total`, `amount`, `remark`, `create_time`, `delivery_date`) VALUES
(1, 1, 1, 4, 'DC04927472510315', 9, '524.00', 6, '手写一份配送单', '2017-12-04 21:05:47', '2017-12-05'),
(2, 4, 1, 2, 'DC04928051663860', 9, '2700.00', 3, '手写一份配送单', '2017-12-04 21:06:45', '2017-12-05'),
(4, 2, 1, 1, 'DC05276541162418', 9, '0.00', 2, '', '2017-12-05 06:47:34', '2017-12-05'),
(5, 7, 1, 1, 'DC05334474229207', 5, '44.00', 1, '', '2017-12-05 08:24:07', '2017-12-06');

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

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

CREATE TABLE `role` (
  `id` int(10) UNSIGNED NOT NULL,
  `role_name` varchar(50) NOT NULL COMMENT '角色名',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `remark` varchar(80) NOT NULL DEFAULT '' COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色';

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

--
-- 表的结构 `roleaccess`
--

CREATE TABLE `roleaccess` (
  `id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL COMMENT '角色ID',
  `func_id` int(10) UNSIGNED NOT NULL COMMENT '原子功能ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色权限';

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

--
-- 表的结构 `seller`
--

CREATE TABLE `seller` (
  `id` int(11) NOT NULL COMMENT '卖家',
  `name` varchar(28) NOT NULL COMMENT '卖家名称',
  `description` varchar(88) NOT NULL COMMENT '卖家简介',
  `tel` varchar(80) DEFAULT '' COMMENT '联系电话',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态:0-吊销,1-营业',
  `rank` int(11) NOT NULL DEFAULT '0' COMMENT '公司排序',
  `tag` varchar(88) NOT NULL COMMENT '标签',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='卖家';

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

INSERT INTO `seller` (`id`, `name`, `description`, `tel`, `status`, `rank`, `tag`, `create_time`) VALUES
(1, '（五里店）小刘调料', '供货商简介', '18007877303', 1, 0, '', '2017-11-30 15:37:04'),
(2, '（西门）谭采购', '优秀、新鲜、快速送达', '18007877303', 1, 0, '', '2017-12-03 22:04:03'),
(3, '（汇东）龙干杂', '汇东', '', 1, 0, '', '2017-12-04 09:51:29'),
(4, '（五里店）老周蛋类', '五里店', '', 1, 0, '', '2017-12-04 09:51:49'),
(5, '（汇东）彭牛奶总代', '汇东', '', 1, 0, '', '2017-12-04 09:52:05'),
(6, '（五里店）小白干货辣椒', '五里店', '', 1, 0, '', '2017-12-04 09:52:49'),
(7, '测试账号', '测试订单，请勿点击', '', 1, 0, '', '2017-12-04 18:21:07');

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

--
-- 表的结构 `sellerbinding`
--

CREATE TABLE `sellerbinding` (
  `id` int(11) NOT NULL,
  `wid` int(11) NOT NULL COMMENT '用户ID',
  `seller` int(11) NOT NULL COMMENT '卖家'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='卖家绑定';

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

INSERT INTO `sellerbinding` (`id`, `wid`, `seller`) VALUES
(5, 1, 2),
(14, 8, 7),
(7, 11, 1),
(8, 12, 6),
(9, 13, 4),
(10, 14, 5),
(11, 15, 3);

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

--
-- 表的结构 `sellerstatistic`
--

CREATE TABLE `sellerstatistic` (
  `id` int(10) UNSIGNED NOT NULL,
  `seller` int(11) NOT NULL COMMENT '卖家',
  `money` decimal(9,2) NOT NULL COMMENT '销售额',
  `order_amount` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '订单数',
  `date` date DEFAULT NULL COMMENT '日期'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='卖家统计';

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

INSERT INTO `sellerstatistic` (`id`, `seller`, `money`, `order_amount`, `date`) VALUES
(1, 4, '2700.00', 1, '2017-12-05'),
(2, 1, '524.00', 1, '2017-12-05'),
(3, 7, '5.00', 1, '2017-12-05');

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

--
-- 表的结构 `userinfo`
--

CREATE TABLE `userinfo` (
  `id` int(11) NOT NULL,
  `wid` int(11) NOT NULL COMMENT '用户ID',
  `openid` varchar(100) NOT NULL COMMENT '用户标识',
  `phone` varchar(300) DEFAULT '' COMMENT '电话',
  `name` varchar(100) DEFAULT '' COMMENT '姓名',
  `code` varchar(5) DEFAULT '' COMMENT '验证码',
  `inform_flag` tinyint(4) DEFAULT '1' COMMENT '接收通知:0-否,1-是'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信用户';

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

INSERT INTO `userinfo` (`id`, `wid`, `openid`, `phone`, `name`, `code`, `inform_flag`) VALUES
(1, 1, 'o6EX5wxoagFqQYam58J8fRz6pLdU', '', '', '022', 1),
(2, 2, 'o6EX5w8dwFuOEgcMuEAGUvrMaGkY', '', '', '774', 1),
(3, 3, 'o6EX5w0GHs0bgEu_f9WbSbnoSyuA', '', '', 'ce3', 1),
(4, 4, 'o6EX5wwRkZGXkdkehkDQKDVgzHKc', '', '', '5db', 1),
(5, 5, 'o6EX5w60NdE4PwKGuzYpegoaxuyg', '', '万禾周', '8e3', 1),
(6, 6, 'o6EX5w5GXmMze5iepMEEGtrtoJzM', '', '', 'ae1', 1),
(8, 8, 'o6EX5w_R4g7IPm9FG0bq0GK1PyeM', '', '小何', '62d', 1),
(9, 9, 'o6EX5w-Z1c8sJychRP3VUWWH9t_Q', '', '', 'bc2', 1),
(10, 10, 'o6EX5w1Kpqoi8Xf0n4rNFrrHAtGI', '', '', '633', 1),
(11, 11, 'o6EX5w41qQ7m7HvkL_WEJ_Vat_lQ', '', '', '90b', 1),
(12, 12, 'o6EX5w-zFHVawgPRM8bUOX6IosuM', '', '', '726', 1),
(13, 13, 'o6EX5w3GqO8X_cLNP-RhKm75tdC0', '', '', 'b74', 1),
(14, 14, 'o6EX5w_g7IqLhi0IrDzZtrgmOOhM', '', '', 'eed', 1),
(15, 15, 'o6EX5w3Fw_6HYG2V_hIl3mlW5J0c', '', '', '62a', 1),
(16, 16, 'o6EX5w9g817p720WF46EVivwuagk', '', '', '3d2', 1);

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

--
-- 表的结构 `usertag`
--

CREATE TABLE `usertag` (
  `id` int(10) UNSIGNED NOT NULL,
  `tid` int(10) UNSIGNED DEFAULT '0' COMMENT '标签ID',
  `uid` int(10) UNSIGNED DEFAULT '0' COMMENT '用户ID'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='用户标签关联表';

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

--
-- 表的结构 `wechatmenu`
--

CREATE TABLE `wechatmenu` (
  `id` int(10) UNSIGNED NOT NULL,
  `type` varchar(10) NOT NULL COMMENT '响应类型',
  `temp_type` varchar(10) NOT NULL COMMENT '临时类型',
  `name` varchar(10) NOT NULL COMMENT '标题',
  `k` varchar(128) NOT NULL COMMENT '推送值',
  `url` varchar(300) NOT NULL COMMENT '跳转链接',
  `media_id` varchar(100) NOT NULL COMMENT '素材ID',
  `pid` int(10) UNSIGNED DEFAULT '0' COMMENT '父ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='微信菜单';

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

INSERT INTO `wechatmenu` (`id`, `type`, `temp_type`, `name`, `k`, `url`, `media_id`, `pid`, `create_time`, `update_time`) VALUES
(1, 'view', '', '供应商管理', '', 'http://yxs.ganlongjt.com/Wechat.php', '', 0, '2017-11-27 20:08:05', '2017-11-30 07:40:48'),
(2, 'view', '', '配送系统', '', 'http://yxs.ganlongjt.com/Ag/Wechat.php/Front/Home/index', '', 0, '2017-11-30 15:40:11', '2017-12-03 13:53:33');

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

--
-- 表的结构 `wechatreply`
--

CREATE TABLE `wechatreply` (
  `id` int(11) NOT NULL,
  `type` varchar(10) NOT NULL COMMENT '响应类型',
  `keywords` varchar(128) NOT NULL COMMENT '关键字',
  `reply` varchar(128) DEFAULT '' COMMENT '返回信息',
  `media_id` varchar(100) DEFAULT '' COMMENT '素材ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='微信菜单';

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

INSERT INTO `wechatreply` (`id`, `type`, `keywords`, `reply`, `media_id`, `create_time`, `update_time`) VALUES
(-1, 'text', '关注回复', '感谢关注本公众号!', '', '2017-11-21 03:52:51', '2017-11-21 02:52:51'),
(-2, 'text', '默认回复', '感谢您的支持!', '', '2017-11-21 03:52:51', '2017-11-21 02:52:51');

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

--
-- 表的结构 `wechattag`
--

CREATE TABLE `wechattag` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(30) NOT NULL COMMENT '标签名称',
  `tagid` int(10) UNSIGNED DEFAULT '0' COMMENT '标签ID'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='微信标签管理';

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

--
-- 表的结构 `wechatuser`
--

CREATE TABLE `wechatuser` (
  `id` int(10) UNSIGNED NOT NULL,
  `subscribe` tinyint(1) DEFAULT '1' COMMENT '是否订阅:1-是,0-否',
  `openid` varchar(100) NOT NULL COMMENT '用户的标识',
  `nickname` varchar(100) NOT NULL COMMENT '用户的昵称',
  `sex` tinyint(1) DEFAULT '0' COMMENT '性别:0-未知,1-男,2-女',
  `country` varchar(15) DEFAULT '' COMMENT '所在国家',
  `province` varchar(15) DEFAULT '' COMMENT '所在省份',
  `city` varchar(15) DEFAULT '' COMMENT '所在城市',
  `language` varchar(10) DEFAULT '' COMMENT '语言',
  `headimgurl` varchar(150) DEFAULT '' COMMENT '头像',
  `groupid` int(11) NOT NULL DEFAULT '0' COMMENT '管理地区',
  `subscribe_time` int(10) UNSIGNED NOT NULL COMMENT '关注时间',
  `unionid` varchar(100) DEFAULT '' COMMENT '开放平台ID',
  `remark` varchar(50) DEFAULT '' COMMENT '备注'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='微信用户';

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

INSERT INTO `wechatuser` (`id`, `subscribe`, `openid`, `nickname`, `sex`, `country`, `province`, `city`, `language`, `headimgurl`, `groupid`, `subscribe_time`, `unionid`, `remark`) VALUES
(1, 1, 'o6EX5wxoagFqQYam58J8fRz6pLdU', '万（谭）', 1, 'China', 'Guangxi', 'Guilin', 'zh_CN', 'http://wx.qlogo.cn/mmopen/ajNVdqHZLLBYIlHq7H7UKJdAmE9ZG6ibib3aSSKQzWSbRIbLy6p1G8gzquia6akp5rFpGYYV0lTSCJDLPuAlLP8Dg/0', 0, 1508499091, '', ''),
(2, 1, 'o6EX5w8dwFuOEgcMuEAGUvrMaGkY', '爱船说 王浩宇', 1, 'China', 'Guangxi', 'Guilin', 'zh_CN', 'http://wx.qlogo.cn/mmopen/icMToSS3kxIvxRPfxW6w3TShAzvn1bmabqnkX1N5RQDXibe0onDTf3YbRMlMzZ0OyDDXK5yV4rY7Sdp8SwVk5GNsLIIM55uibxA/0', 0, 1511788911, '', ''),
(3, 1, 'o6EX5w0GHs0bgEu_f9WbSbnoSyuA', '凡人', 0, '', '', '', 'zh_CN', 'http://wx.qlogo.cn/mmopen/ajNVdqHZLLCNK5KV57eZqgVFdhCFM42nP52usI3fyIVPB4zicXToVTqP5gI86NHHHOvafWgn9XhMg1KbAFkX0pQ/0', 2, 1508656167, '', ''),
(4, 1, 'o6EX5wwRkZGXkdkehkDQKDVgzHKc', '相思雨', 2, '', '', '', 'zh_CN', 'http://wx.qlogo.cn/mmopen/0yOibuhvkGF8VEwR1b1hPaHm82GeCUPfgHvFFJJzRLQfhAuNCKWN9voGVZBTUa8MYsxypxvicCgH2yQhQmI4mevw/0', 2, 1508656071, '', ''),
(5, 1, 'o6EX5w60NdE4PwKGuzYpegoaxuyg', 'Walter Bishop', 1, 'China', 'Guangxi', 'Guilin', 'zh_CN', 'http://wx.qlogo.cn/mmopen/icMToSS3kxIsdjicAFKAueYFtMiakK5yLbuDAExHsib38F8IB2J2yzEyoZNNiabdWcAq6mk1ic6OTEmKgib1qaTnV4w3icEH8fZzjFAib/0', 0, 1508497761, '', ''),
(6, 1, 'o6EX5w5GXmMze5iepMEEGtrtoJzM', 'づ墨小黑', 1, 'China', 'Guangxi', 'Guilin', 'zh_CN', 'http://wx.qlogo.cn/mmopen/J1JTpA6RQSVqbAUkrvWd2BFDerGf9phicnsVCGRheMichYXt71BkUT2txiazFxMJgRbcZKcicJuM5Xvibc8a0DLQSzuicwMpdiaNISic/0', 0, 1511788890, '', ''),
(9, 1, 'o6EX5w-Z1c8sJychRP3VUWWH9t_Q', '优鲜送', 1, 'China', '', '', 'zh_CN', 'http://wx.qlogo.cn/mmopen/J1JTpA6RQSViaynAaqWwxh7OBKRMG1LKwNTXVmJFA6r6RUoJpDjWyyVldwys4lXFkrI5G6nUgNDZGSoULia97G94gTBvWLymWs/0', 0, 1512309544, '', ''),
(8, 1, 'o6EX5w_R4g7IPm9FG0bq0GK1PyeM', '源科动力', 0, '', '', '', 'zh_CN', 'http://wx.qlogo.cn/mmopen/AFT5OJ1ejFicn5qR0icN3eHoqRRvPlIDnC9QS6n7Og7OyPoyK6KnddqCqjOq32y0Drr6jkrQs8hccbeY1zdoHibGibbcp6D8BD8E/0', 0, 1512027488, '', ''),
(10, 1, 'o6EX5w1Kpqoi8Xf0n4rNFrrHAtGI', '物是人非????', 1, 'China', '', '', 'zh_CN', 'http://wx.qlogo.cn/mmopen/J1JTpA6RQSWdLj18Hc1D0toWDk2RAMYwoSzCNZ3sLrr1SbcxkV01ObNNEAIRGNkicV6Z018UubpR3rJwuLS3AuuK39cV8ibtsZ/0', 0, 1512351039, '', ''),
(11, 1, 'o6EX5w41qQ7m7HvkL_WEJ_Vat_lQ', '凯^o^歌', 2, 'China', 'Guangxi', 'Guilin', 'zh_CN', 'http://wx.qlogo.cn/mmopen/J1JTpA6RQSVicR7wjn2oK7MtxNhJ2uiceMnWgqOaWeuXY7Jz76FTPYw7DOJGxT5UFCQoIpZjeasCL0ibpr4LWpozelico99HqtGP/0', 0, 1512353952, '', ''),
(12, 1, 'o6EX5w-zFHVawgPRM8bUOX6IosuM', '白云飞', 1, 'China', 'Guangxi', 'Guilin', 'zh_CN', 'http://wx.qlogo.cn/mmopen/fo6LdnuU58icxcib8fT8WA82ZgDbWgbJ59dfhicEFRmIpWhqQYpLXBnNHW1aE7iabHXQO968E8XFz01OcbGRfiaUw0EicGTKB2DJUz/0', 0, 1512354965, '', ''),
(13, 1, 'o6EX5w3GqO8X_cLNP-RhKm75tdC0', '素君', 0, '', '', '', 'zh_CN', 'http://wx.qlogo.cn/mmopen/ajNVdqHZLLDSl3oQf4EdlxJHJq1GcqaDLFHZNsicV3XiaxQlhjEKn19njUSFWcAN5qFVeT39oicL0LqE6BhK9TC1pXXM7ib0kejcwlJp3Ryicjag/0', 0, 1512355701, '', ''),
(14, 1, 'o6EX5w_g7IqLhi0IrDzZtrgmOOhM', ' 彭秋琼', 2, 'China', 'Guangxi', 'Guilin', 'zh_CN', 'http://wx.qlogo.cn/mmopen/fo6LdnuU58ibF8icsbwmThBL6oEFD5IRtxjwly6lMQEnqxiaRd3bAQ5mILqf5S0IREiciccH3nne0vADPoK4e6vOFN0JoiaNHwusZe/0', 0, 1512357443, '', ''),
(15, 1, 'o6EX5w3Fw_6HYG2V_hIl3mlW5J0c', '小龙凉拌菜2535168', 0, 'China', '', '', 'zh_CN', 'http://wx.qlogo.cn/mmopen/fo6LdnuU58ibr2Bsu0M1WbQAErYIunnkbFJbmukuO0Blf8bWia5j2syEOLhsvia5NaZicxNxFM3MHZKIzO1ZicD4FuLgIdS18MREQ/0', 0, 1512361034, '', ''),
(16, 1, 'o6EX5w9g817p720WF46EVivwuagk', 'EFFER', 1, 'China', 'Guangxi', 'Guilin', 'zh_CN', 'http://wx.qlogo.cn/mmopen/AFT5OJ1ejFicn5qR0icN3eHrhgF73FFlgG13uDdWXFfZ3ZI7C0mvzDVgp8xZCx9mF6OCVmgm6tdERNTzWrkC8KkMXAakayN1ca/0', 0, 1512382755, '', '');

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

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

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

--
-- Indexes for table `buyer`
--
ALTER TABLE `buyer`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_name` (`name`);

--
-- Indexes for table `buyerbinding`
--
ALTER TABLE `buyerbinding`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_wb` (`wid`,`buyer`);

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

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

--
-- Indexes for table `category`
--
ALTER TABLE `category`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `text` (`text`);

--
-- Indexes for table `document`
--
ALTER TABLE `document`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `title` (`title`);

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

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

--
-- Indexes for table `goods`
--
ALTER TABLE `goods`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_name` (`name`);

--
-- Indexes for table `goodsalias`
--
ALTER TABLE `goodsalias`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_name` (`name`);

--
-- Indexes for table `goodscategory`
--
ALTER TABLE `goodscategory`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_name` (`name`);

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

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

--
-- Indexes for table `menu`
--
ALTER TABLE `menu`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `text` (`text`,`level`,`pid`);

--
-- Indexes for table `myseller`
--
ALTER TABLE `myseller`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_buyer_seller` (`buyer`,`seller`);

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

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

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

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

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

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

--
-- Indexes for table `seller`
--
ALTER TABLE `seller`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_name` (`name`);

--
-- Indexes for table `sellerbinding`
--
ALTER TABLE `sellerbinding`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_ws` (`wid`,`seller`);

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

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

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

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

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

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

--
-- Indexes for table `wechatuser`
--
ALTER TABLE `wechatuser`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `openid` (`openid`);
--
-- 使用表AUTO_INCREMENT `area`
--
ALTER TABLE `area`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `authlimit`
--
ALTER TABLE `authlimit`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- 使用表AUTO_INCREMENT `backup`
--
ALTER TABLE `backup`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `buyer`
--
ALTER TABLE `buyer`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '买家', AUTO_INCREMENT=2;
--
-- 使用表AUTO_INCREMENT `buyerbinding`
--
ALTER TABLE `buyerbinding`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- 使用表AUTO_INCREMENT `buyerstatistic`
--
ALTER TABLE `buyerstatistic`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- 使用表AUTO_INCREMENT `cart`
--
ALTER TABLE `cart`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51;
--
-- 使用表AUTO_INCREMENT `category`
--
ALTER TABLE `category`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- 使用表AUTO_INCREMENT `document`
--
ALTER TABLE `document`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `emailcode`
--
ALTER TABLE `emailcode`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `func`
--
ALTER TABLE `func`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- 使用表AUTO_INCREMENT `goods`
--
ALTER TABLE `goods`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '物品', AUTO_INCREMENT=66;
--
-- 使用表AUTO_INCREMENT `goodsalias`
--
ALTER TABLE `goodsalias`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '物品别名', AUTO_INCREMENT=22;
--
-- 使用表AUTO_INCREMENT `goodscategory`
--
ALTER TABLE `goodscategory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '分类ID', AUTO_INCREMENT=8;
--
-- 使用表AUTO_INCREMENT `image`
--
ALTER TABLE `image`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- 使用表AUTO_INCREMENT `imagematerial`
--
ALTER TABLE `imagematerial`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `menu`
--
ALTER TABLE `menu`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `myseller`
--
ALTER TABLE `myseller`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '我的卖家', AUTO_INCREMENT=9;
--
-- 使用表AUTO_INCREMENT `newsarticle`
--
ALTER TABLE `newsarticle`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `newsmaterial`
--
ALTER TABLE `newsmaterial`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `orderitem`
--
ALTER TABLE `orderitem`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- 使用表AUTO_INCREMENT `purchasingorder`
--
ALTER TABLE `purchasingorder`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- 使用表AUTO_INCREMENT `role`
--
ALTER TABLE `role`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `roleaccess`
--
ALTER TABLE `roleaccess`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `seller`
--
ALTER TABLE `seller`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '卖家', AUTO_INCREMENT=8;
--
-- 使用表AUTO_INCREMENT `sellerbinding`
--
ALTER TABLE `sellerbinding`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- 使用表AUTO_INCREMENT `sellerstatistic`
--
ALTER TABLE `sellerstatistic`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- 使用表AUTO_INCREMENT `userinfo`
--
ALTER TABLE `userinfo`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- 使用表AUTO_INCREMENT `usertag`
--
ALTER TABLE `usertag`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `wechatmenu`
--
ALTER TABLE `wechatmenu`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- 使用表AUTO_INCREMENT `wechatreply`
--
ALTER TABLE `wechatreply`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `wechattag`
--
ALTER TABLE `wechattag`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `wechatuser`
--
ALTER TABLE `wechatuser`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
