-- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2016 年 01 月 25 日 23:00
-- 服务器版本: 5.5.40
-- PHP 版本: 5.2.17
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 */;
--
-- 数据库: `dede168`
--
-- --------------------------------------------------------
--
-- 表的结构 `ims_account`
--
DROP TABLE IF EXISTS `ims_account`;
CREATE TABLE `ims_account` (
`acid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`hash` varchar(8) NOT NULL,
`type` tinyint(3) unsigned NOT NULL,
`isconnect` tinyint(4) NOT NULL,
PRIMARY KEY (`acid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_account_wechats`
--
DROP TABLE IF EXISTS `ims_account_wechats`;
CREATE TABLE `ims_account_wechats` (
`acid` int(10) unsigned NOT NULL,
`uniacid` int(10) unsigned NOT NULL,
`token` varchar(32) NOT NULL,
`encodingaeskey` varchar(255) NOT NULL,
`level` tinyint(4) unsigned NOT NULL,
`name` varchar(30) NOT NULL,
`account` varchar(30) NOT NULL,
`original` varchar(50) NOT NULL,
`signature` varchar(100) NOT NULL,
`country` varchar(10) NOT NULL,
`province` varchar(3) NOT NULL,
`city` varchar(15) NOT NULL,
`username` varchar(30) NOT NULL,
`password` varchar(32) NOT NULL,
`lastupdate` int(10) unsigned NOT NULL,
`key` varchar(50) NOT NULL,
`secret` varchar(50) NOT NULL,
`styleid` int(10) unsigned NOT NULL,
`subscribeurl` varchar(120) NOT NULL,
`access_token` varchar(1000) NOT NULL,
`auth_refresh_token` varchar(255) NOT NULL,
PRIMARY KEY (`acid`),
KEY `idx_key` (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_coupon`
--
DROP TABLE IF EXISTS `ims_activity_coupon`;
CREATE TABLE `ims_activity_coupon` (
`couponid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`type` tinyint(4) NOT NULL,
`title` varchar(30) NOT NULL,
`couponsn` varchar(50) NOT NULL,
`description` text,
`discount` decimal(10,2) NOT NULL,
`condition` decimal(10,2) NOT NULL,
`starttime` int(10) unsigned NOT NULL,
`endtime` int(10) unsigned NOT NULL,
`limit` int(11) NOT NULL,
`dosage` int(11) unsigned NOT NULL,
`amount` int(11) unsigned NOT NULL,
`thumb` varchar(500) NOT NULL,
`credit` int(10) unsigned NOT NULL,
`use_module` tinyint(3) unsigned NOT NULL,
`credittype` varchar(20) NOT NULL,
PRIMARY KEY (`couponid`),
KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_coupon_allocation`
--
DROP TABLE IF EXISTS `ims_activity_coupon_allocation`;
CREATE TABLE `ims_activity_coupon_allocation` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`couponid` int(10) unsigned NOT NULL,
`groupid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`,`couponid`,`groupid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_coupon_modules`
--
DROP TABLE IF EXISTS `ims_activity_coupon_modules`;
CREATE TABLE `ims_activity_coupon_modules` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`couponid` int(10) unsigned NOT NULL,
`module` varchar(30) NOT NULL,
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `couponid` (`couponid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_coupon_password`
--
DROP TABLE IF EXISTS `ims_activity_coupon_password`;
CREATE TABLE `ims_activity_coupon_password` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`name` varchar(50) NOT NULL,
`password` varchar(200) NOT NULL,
`mobile` varchar(20) NOT NULL,
`openid` varchar(50) NOT NULL,
`nickname` varchar(30) NOT NULL,
`storeid` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_coupon_record`
--
DROP TABLE IF EXISTS `ims_activity_coupon_record`;
CREATE TABLE `ims_activity_coupon_record` (
`recid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`uid` int(10) unsigned NOT NULL,
`grantmodule` varchar(50) NOT NULL,
`granttime` int(10) unsigned NOT NULL,
`usemodule` varchar(50) NOT NULL,
`usetime` int(10) unsigned NOT NULL,
`status` tinyint(4) NOT NULL,
`operator` varchar(30) NOT NULL,
`clerk_id` int(10) unsigned NOT NULL,
`remark` varchar(300) NOT NULL,
`couponid` int(10) unsigned NOT NULL,
PRIMARY KEY (`recid`),
KEY `couponid` (`uid`,`grantmodule`,`usemodule`,`status`),
KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_exchange`
--
DROP TABLE IF EXISTS `ims_activity_exchange`;
CREATE TABLE `ims_activity_exchange` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`title` varchar(100) NOT NULL,
`description` text NOT NULL,
`thumb` varchar(500) NOT NULL,
`type` tinyint(1) unsigned NOT NULL,
`extra` varchar(3000) NOT NULL,
`credit` int(10) unsigned NOT NULL,
`credittype` varchar(10) NOT NULL,
`pretotal` int(11) NOT NULL,
`num` int(11) NOT NULL,
`total` int(10) unsigned NOT NULL,
`status` tinyint(3) unsigned NOT NULL,
`starttime` int(10) unsigned NOT NULL,
`endtime` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_exchange_trades`
--
DROP TABLE IF EXISTS `ims_activity_exchange_trades`;
CREATE TABLE `ims_activity_exchange_trades` (
`tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`uid` int(10) unsigned NOT NULL,
`exid` int(10) unsigned NOT NULL,
`type` int(10) unsigned NOT NULL,
`createtime` int(10) unsigned NOT NULL,
PRIMARY KEY (`tid`),
KEY `uniacid` (`uniacid`,`uid`,`exid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_exchange_trades_shipping`
--
DROP TABLE IF EXISTS `ims_activity_exchange_trades_shipping`;
CREATE TABLE `ims_activity_exchange_trades_shipping` (
`tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`exid` int(10) unsigned NOT NULL,
`uid` int(10) unsigned NOT NULL,
`status` tinyint(4) NOT NULL,
`createtime` int(10) unsigned NOT NULL,
`province` varchar(30) NOT NULL,
`city` varchar(30) NOT NULL,
`district` varchar(30) NOT NULL,
`address` varchar(255) NOT NULL,
`zipcode` varchar(6) NOT NULL,
`mobile` varchar(30) NOT NULL,
`name` varchar(30) NOT NULL,
PRIMARY KEY (`tid`),
KEY `uniacid` (`uniacid`),
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `ims_activity_modules`
--
DROP TABLE IF EXISTS `ims_activity_modules`;
CREATE TABLE `ims_activity_modules` (
`mid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`exid` int(10) unsigned NOT NULL,
`module` varchar(50) NOT NULL,
`uid` int(10) unsigned NOT NU