-- phpMyAdmin SQL Dump
-- version 3.4.8
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015 年 07 月 16 日 09:51
-- 服务器版本: 5.5.37
-- PHP 版本: 5.4.43

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

--
-- 数据库: `waimaijiami2`
--

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

--
-- 表的结构 `gg_cate`
--

CREATE TABLE IF NOT EXISTS `gg_cate` (
  `cid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `c_order` int(11) NOT NULL,
  PRIMARY KEY (`cid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=29 ;

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

--
-- 表的结构 `gg_click`
--

CREATE TABLE IF NOT EXISTS `gg_click` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `yesterday` int(11) NOT NULL,
  `today` int(11) NOT NULL,
  `allclick` int(11) NOT NULL,
  `time` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

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

INSERT INTO `gg_click` (`id`, `yesterday`, `today`, `allclick`, `time`) VALUES
(1, 0, 0, 0, '0000-00-00');

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

--
-- 表的结构 `gg_comment`
--

CREATE TABLE IF NOT EXISTS `gg_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` varchar(64) NOT NULL,
  `uid` int(11) NOT NULL,
  `good_id` int(11) NOT NULL,
  `good_star` int(11) NOT NULL,
  `serve_star` varchar(64) NOT NULL,
  `content` varchar(64) NOT NULL,
  `time` datetime NOT NULL,
  `is_show` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=254 ;

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

--
-- 表的结构 `gg_good`
--

CREATE TABLE IF NOT EXISTS `gg_good` (
  `gid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `img` varchar(64) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `infor` mediumtext NOT NULL,
  `cid` int(11) NOT NULL,
  `g_order` int(11) NOT NULL,
  `state` int(11) NOT NULL DEFAULT '1',
  `base_num` int(11) NOT NULL,
  `give_integral` int(11) NOT NULL,
  `is_recommend` tinyint(1) NOT NULL,
  PRIMARY KEY (`gid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=29 ;

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

--
-- 表的结构 `gg_message`
--

CREATE TABLE IF NOT EXISTS `gg_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL,
  `content` mediumtext NOT NULL,
  `time` int(11) NOT NULL,
  `is_activity` int(11) NOT NULL,
  `integral_num` int(11) NOT NULL,
  `end_time` date NOT NULL,
  `cid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;

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

--
-- 表的结构 `gg_message_cate`
--

CREATE TABLE IF NOT EXISTS `gg_message_cate` (
  `cid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `c_order` int(11) NOT NULL,
  PRIMARY KEY (`cid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

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

--
-- 表的结构 `gg_order`
--

CREATE TABLE IF NOT EXISTS `gg_order` (
  `oid` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(64) NOT NULL,
  `name` varchar(64) NOT NULL,
  `tel` varchar(64) NOT NULL,
  `address` varchar(100) NOT NULL,
  `remarks` varchar(255) NOT NULL,
  `time` int(11) NOT NULL,
  `totalAmount` decimal(10,2) NOT NULL,
  `uid` int(11) NOT NULL,
  `state` int(11) NOT NULL,
  `pay_state` int(11) NOT NULL COMMENT '0未付款  1付款',
  `pay_method` int(11) NOT NULL COMMENT ' 0货到付款  1线上支付   2支付宝   3微信支付',
  `give_integral` int(11) NOT NULL,
  `use_inter` int(11) NOT NULL,
  `pay_cash` float NOT NULL,
  PRIMARY KEY (`oid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- 表的结构 `gg_ordergood`
--

CREATE TABLE IF NOT EXISTS `gg_ordergood` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `gid` int(11) NOT NULL,
  `name` varchar(64) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `num` int(11) NOT NULL,
  `order_no` varchar(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- 表的结构 `gg_pay`
--

CREATE TABLE IF NOT EXISTS `gg_pay` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `account` varchar(64) NOT NULL,
  `qr_code` varchar(64) NOT NULL,
  `infor` varchar(64) NOT NULL,
  `is_used` int(11) NOT NULL COMMENT '0  不使用  1使用',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

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

INSERT INTO `gg_pay` (`id`, `name`, `account`, `qr_code`, `infor`, `is_used`) VALUES
(1, '微信支付', '1107106767@qq.com', '55921db38a8ce.png', '使用微信扫一扫，给我转账', 1),
(2, '支付宝支付', '1107106767@qq.com', '55921daa4b56d.png', '使用支付宝钱包给我转账', 1);

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

--
-- 表的结构 `gg_slide`
--

CREATE TABLE IF NOT EXISTS `gg_slide` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(64) NOT NULL,
  `imgurl` varchar(64) NOT NULL,
  `url` varchar(255) NOT NULL,
  `s_order` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;

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

INSERT INTO `gg_slide` (`id`, `title`, `imgurl`, `url`, `s_order`) VALUES
(12, '活动1', '5590c0c705766.png', 'http://', 0),
(13, '活动2', '5590c0d6ac32a.png', 'http://', 0),
(14, '活动3', '5590c0e303261.png', 'http://', 0);

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

--
-- 表的结构 `gg_sms`
--

CREATE TABLE IF NOT EXISTS `gg_sms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(64) NOT NULL,
  `content` varchar(64) NOT NULL,
  `time` datetime NOT NULL,
  `state` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

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

--
-- 表的结构 `gg_user`
--

CREATE TABLE IF NOT EXISTS `gg_user` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `tel` varchar(64) NOT NULL,
  `password` varchar(100) NOT NULL,
  `address` varchar(100) NOT NULL,
  `regtime` int(11) NOT NULL,
  `is_admin` int(11) NOT NULL,
  `integral_num` int(11) NOT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- 表的结构 `gg_user_integral`
--

CREATE TABLE IF NOT EXISTS `gg_user_integral` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `acid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `infor` varchar(64) NOT NULL,
  `integral_num` int(11) NOT NULL,
  `time` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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