<?php
$conf_basedir = "../../../"; //相对主目录的位置
$conf_where = "admin"; //选择调用相应模块
$directory = basename(dirname(__FILE__)); //定义当前所在的目录，引入模块公用函数
include_once($conf_basedir . "base.inc.php");
include_once WEB_MODULE . '/growth_nj/base.inc.php';



$sql = "
/*
Navicat MySQL Data Transfer

Source Server         : esfadmin140
Source Server Version : 50151
Source Host           : 221.231.141.140:3306
Source Database       : hf_house

Target Server Type    : MYSQL
Target Server Version : 50151
File Encoding         : 936

Date: 2014-06-05 14:27:52
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `block_level_heat`
-- ----------------------------
DROP TABLE IF EXISTS `block_level_heat`;
CREATE TABLE `block_level_heat` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`block_id`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '小区id' ,
`level`  enum('A','B','C','D') CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区热度等级，对应小区热度设置表level字段' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `block_id` USING BTREE (`block_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='小区热度等级表'
AUTO_INCREMENT=2561

;

--
-- 表的结构 `block_level_heat_setting`
--

CREATE TABLE IF NOT EXISTS `block_level_heat_setting` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `level` enum('A','B','C','D') default NULL COMMENT '小区热度等级',
  `min_house_number` int(10) unsigned NOT NULL default '0' COMMENT '最小房源数',
  `max_house_number` int(10) unsigned NOT NULL default '0' COMMENT '最大小区房源量',
  `credit_way_alias` varchar(50) NOT NULL COMMENT '积分获取途径别名',
  `exp_way_alias` varchar(50) NOT NULL COMMENT '成长值获取方式别名',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `l` USING BTREE (`level`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk COMMENT='按房源量分小区等级的设置表' AUTO_INCREMENT=5 ;

;

-- ----------------------------
-- Table structure for `block_level_info_full`
-- ----------------------------
DROP TABLE IF EXISTS `block_level_info_full`;
CREATE TABLE `block_level_info_full` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`block_id`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '小区id' ,
`level`  enum('★','★★','★★★','★★★★') CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区资料完善度等级，对应小区完善度设置表level字段' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='小区完善度等级表'
AUTO_INCREMENT=2563

;

-- ----------------------------
-- Table structure for `block_level_info_full_setting`
-- ----------------------------
DROP TABLE IF EXISTS `block_level_info_full_setting`;
CREATE TABLE `block_level_info_full_setting` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`level`  enum('★','★★','★★★','★★★★') CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '小区资料完善度等级' ,
`not_filled_items_number`  tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '未完善项数量' ,
`image_number`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '小区图片数量' ,
`credit_way_alias`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '积分获取途径别名' ,
`exp_way_alias`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '成长值获取方式别名' ,
`type`  tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '1,完善小区资料，2完善小区图片' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `l_t` USING BTREE (`level`, `type`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='按资料完善度（未完善项和小区图片数量）分小区等级的设置表'
AUTO_INCREMENT=9

;

-- ----------------------------
-- Table structure for `growth_activity_promot`
-- ----------------------------
DROP TABLE IF EXISTS `growth_activity_promot`;
CREATE TABLE `growth_activity_promot` (
`id`  int(3) NOT NULL AUTO_INCREMENT ,
`uid`  int(10) NOT NULL ,
`username`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL ,
`createtime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='预热活动名单'
AUTO_INCREMENT=370

;

-- ----------------------------
-- Table structure for `growth_bid_attention`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_attention`;
CREATE TABLE `growth_bid_attention` (
`id`  int(11) UNSIGNED NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '期次' ,
`type`  tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '1，小区专家竞投；2,房源竞投' ,
`target_id`  int(11) NOT NULL COMMENT '竞投id' ,
`house_id`  int(11) NOT NULL COMMENT '房源编号' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
PRIMARY KEY (`id`),
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`target_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='关注竞投表'
AUTO_INCREMENT=6844

;

-- ----------------------------
-- Table structure for `growth_bid_block_expert`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_block_expert`;
CREATE TABLE `growth_bid_block_expert` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '竞投期数id' ,
`block_id`  int(11) NULL DEFAULT NULL COMMENT '如果是小区专家这里是小区id' ,
`block_level`  varchar(2) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '小区等级A,B,C,D' ,
`broker_level`  varchar(100) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '可以参与的经纪人等级' ,
`valid`  tinyint(4) NULL DEFAULT NULL COMMENT '是否停止（有效，没效）' ,
`number`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '参与的人数' ,
`min_score`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最低参与积分' ,
`max_win_number`  tinyint(4) NULL DEFAULT NULL COMMENT '最多取多少竞投成功人数' ,
`ctime`  timestamp NULL DEFAULT NULL COMMENT '创建时间' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='小区专家竞投表'
AUTO_INCREMENT=40964

;

-- ----------------------------
-- Table structure for `growth_bid_block_expert_bak`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_block_expert_bak`;
CREATE TABLE `growth_bid_block_expert_bak` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '竞投期数id' ,
`block_id`  int(11) NULL DEFAULT NULL COMMENT '如果是小区专家这里是小区id' ,
`block_level`  varchar(2) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '小区等级A,B,C,D' ,
`broker_level`  varchar(100) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '可以参与的经纪人等级' ,
`valid`  tinyint(4) NULL DEFAULT NULL COMMENT '是否停止（有效，没效）' ,
`number`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '参与的人数' ,
`min_score`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最低参与积分' ,
`max_win_number`  tinyint(4) NULL DEFAULT NULL COMMENT '最多取多少竞投成功人数' ,
`ctime`  timestamp NULL DEFAULT NULL COMMENT '创建时间' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='小区专家竞投表'
AUTO_INCREMENT=17928

;

-- ----------------------------
-- Table structure for `growth_bid_block_expert_record_finish`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_block_expert_record_finish`;
CREATE TABLE `growth_bid_block_expert_record_finish` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`block_id`  int(11) NOT NULL COMMENT '小区的id' ,
`block_name`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`score`  int(11) NOT NULL COMMENT '竞投成功的分值' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`tg_start_time`  datetime NOT NULL COMMENT '推广开始时间' ,
`tg_end_time`  datetime NOT NULL COMMENT '推广的结束时间' ,
PRIMARY KEY (`id`),
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`block_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投小区专家成功记录'
AUTO_INCREMENT=3304

;

-- ----------------------------
-- Table structure for `growth_bid_block_expert_record_history`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_block_expert_record_history`;
CREATE TABLE `growth_bid_block_expert_record_history` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '竞投期次id' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`block_id`  int(11) NOT NULL COMMENT '小区id' ,
`block_name`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '0,竞投中时根据名次判断,1,成功，-1,失败，' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `b_b_h` USING BTREE (`broker_id`, `bid_id`) ,
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) ,
INDEX `b_s` USING BTREE (`bid_id`, `score`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投中小区专家记录'
AUTO_INCREMENT=2986

;

-- ----------------------------
-- Table structure for `growth_bid_block_expert_record_history_bak`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_block_expert_record_history_bak`;
CREATE TABLE `growth_bid_block_expert_record_history_bak` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '竞投期次id' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`block_id`  int(11) NOT NULL COMMENT '小区id' ,
`block_name`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '0,竞投中时根据名次判断,1,成功，-1,失败，' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `b_b_h` USING BTREE (`broker_id`, `bid_id`) ,
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) ,
INDEX `b_s` USING BTREE (`bid_id`, `score`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投中小区专家记录'
AUTO_INCREMENT=416

;

-- ----------------------------
-- Table structure for `growth_bid_block_expert_record_on`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_block_expert_record_on`;
CREATE TABLE `growth_bid_block_expert_record_on` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '竞投期次id' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`block_id`  int(11) NOT NULL COMMENT '小区id' ,
`block_name`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '0,竞投中时根据名次判断,1,成功，-1,失败，' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `b_b_h` USING BTREE (`broker_id`, `bid_id`) ,
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) ,
INDEX `b_s` USING BTREE (`bid_id`, `score`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投中小区专家记录'
AUTO_INCREMENT=155

;

-- ----------------------------
-- Table structure for `growth_bid_block_expert_record_on_bak`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_block_expert_record_on_bak`;
CREATE TABLE `growth_bid_block_expert_record_on_bak` (
`id`  int(10) UNSIGNED NOT NULL ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '竞投期次id' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`block_id`  int(11) NOT NULL COMMENT '小区id' ,
`block_name`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '0,竞投中时根据名次判断,1,成功，-1,失败，' ,
UNIQUE INDEX `b_b_h` USING BTREE (`broker_id`, `bid_id`) ,
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) ,
INDEX `b_s` USING BTREE (`bid_id`, `score`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投中小区专家备份记录'

;

-- ----------------------------
-- Table structure for `growth_bid_broker_user`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_broker_user`;
CREATE TABLE `growth_bid_broker_user` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投类型1,小区专家，2房源竞投' ,
`broker_id`  int(11) NOT NULL COMMENT '经纪人编号' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后一次竞投时间' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `type` USING BTREE (`type`, `broker_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='记录有哪些经纪人参加过竞投'
AUTO_INCREMENT=7207

;

-- ----------------------------
-- Table structure for `growth_bid_hotsearch_set`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_hotsearch_set`;
CREATE TABLE `growth_bid_hotsearch_set` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`type`  tinyint(6) NOT NULL DEFAULT 1 COMMENT '1表示sell, 2表示出租' ,
`words`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '热搜词' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改热搜词的时间' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `type` USING BTREE (`type`, `words`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='设置竞投热词表'
AUTO_INCREMENT=21

;

-- ----------------------------
-- Table structure for `growth_bid_house`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house`;
CREATE TABLE `growth_bid_house` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`type`  tinyint(4) NOT NULL COMMENT '1,小区词，2,热搜词，3,板块词' ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '竞投期数id' ,
`block_id`  int(11) NULL DEFAULT NULL COMMENT '如果是小区专家这里是小区id' ,
`block_level`  varchar(2) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '小区等级A,B,C,D' ,
`keyword`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '热搜词' ,
`broker_level`  varchar(100) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '可以参与的经纪人等级' ,
`valid`  tinyint(4) NULL DEFAULT NULL COMMENT '是否停止（有效，没效）' ,
`number`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '参与的人数' ,
`min_score`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最低参与积分' ,
`max_win_number`  tinyint(4) NULL DEFAULT NULL COMMENT '最多取多少竞投成功人数' ,
`ctime`  timestamp NULL DEFAULT NULL COMMENT '创建时间' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='房源竞投表'
AUTO_INCREMENT=41245

;

-- ----------------------------
-- Table structure for `growth_bid_house_bak`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house_bak`;
CREATE TABLE `growth_bid_house_bak` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`type`  tinyint(4) NOT NULL COMMENT '1,小区词，2,热搜词，3,板块词' ,
`bid_periods_id`  int(10) UNSIGNED NOT NULL COMMENT '竞投期数id' ,
`block_id`  int(11) NULL DEFAULT NULL COMMENT '如果是小区专家这里是小区id' ,
`block_level`  varchar(2) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '小区等级A,B,C,D' ,
`keyword`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '热搜词' ,
`broker_level`  varchar(100) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '可以参与的经纪人等级' ,
`valid`  tinyint(4) NULL DEFAULT NULL COMMENT '是否停止（有效，没效）' ,
`number`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '参与的人数' ,
`min_score`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最低参与积分' ,
`max_win_number`  tinyint(4) NULL DEFAULT NULL COMMENT '最多取多少竞投成功人数' ,
`ctime`  timestamp NULL DEFAULT NULL COMMENT '创建时间' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='房源竞投表'
AUTO_INCREMENT=20624

;

-- ----------------------------
-- Table structure for `growth_bid_house_level`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house_level`;
CREATE TABLE `growth_bid_house_level` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`type`  tinyint(4) NOT NULL COMMENT 'type 房源竞投类型1,小区词，2,热搜词' ,
`levels`  varchar(250) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '等级' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `type` USING BTREE (`type`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='房源竞投操作权限表'
AUTO_INCREMENT=33

;

-- ----------------------------
-- Table structure for `growth_bid_house_record_finish`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house_record_finish`;
CREATE TABLE `growth_bid_house_record_finish` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投词类型 1小区词，2热搜词，3板块词' ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`house_id`  int(11) NOT NULL COMMENT '参与竞投的房源编号' ,
`keyword`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '竞投的词语' ,
`score`  int(11) NOT NULL COMMENT '竞投成功的分值' ,
`tg_start_time`  datetime NOT NULL COMMENT '推广开始时间' ,
`tg_end_time`  datetime NOT NULL COMMENT '推广结束时间' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
PRIMARY KEY (`id`),
INDEX `broker_id` USING BTREE (`broker_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投房源成功记录'
AUTO_INCREMENT=3640

;

-- ----------------------------
-- Table structure for `growth_bid_house_record_history`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house_record_history`;
CREATE TABLE `growth_bid_house_record_history` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`bid_periods_id`  int(11) NOT NULL COMMENT '竞投期数id' ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投词类型 1小区词，2热搜词，3板块词' ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`house_id`  int(11) NOT NULL COMMENT '参与竞投的房源编号' ,
`content`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '房源的基本信息' ,
`blockname`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`infotype`  smallint(6) NOT NULL COMMENT '物业类型' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '1,竞投成功，-1,竞投失败' ,
PRIMARY KEY (`id`),
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投房源历史记录'
AUTO_INCREMENT=5461

;

-- ----------------------------
-- Table structure for `growth_bid_house_record_history_bak`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house_record_history_bak`;
CREATE TABLE `growth_bid_house_record_history_bak` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`bid_periods_id`  int(11) NOT NULL COMMENT '竞投期数id' ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投词类型 1小区词，2热搜词，3板块词' ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`house_id`  int(11) NOT NULL COMMENT '参与竞投的房源编号' ,
`content`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '房源的基本信息' ,
`blockname`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`infotype`  smallint(6) NOT NULL COMMENT '物业类型' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '1,竞投成功，-1,竞投失败' ,
PRIMARY KEY (`id`),
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投房源历史记录'
AUTO_INCREMENT=170

;

-- ----------------------------
-- Table structure for `growth_bid_house_record_on`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house_record_on`;
CREATE TABLE `growth_bid_house_record_on` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`bid_periods_id`  int(11) NOT NULL COMMENT '竞投期数id' ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投词类型 1小区词，2热搜词，3板块词' ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`house_id`  int(11) NOT NULL COMMENT '参与竞投的房源编号' ,
`content`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '房源的基本信息' ,
`blockname`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`infotype`  smallint(6) NOT NULL COMMENT '物业类型' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '1,竞投成功，-1,竞投失败' ,
PRIMARY KEY (`id`),
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投房源中的记录'
AUTO_INCREMENT=549

;

-- ----------------------------
-- Table structure for `growth_bid_house_record_on_bak`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house_record_on_bak`;
CREATE TABLE `growth_bid_house_record_on_bak` (
`id`  int(10) UNSIGNED NOT NULL ,
`bid_periods_id`  int(11) NOT NULL COMMENT '竞投期数id' ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投词类型 1小区词，2热搜词，3板块词' ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`house_id`  int(11) NOT NULL COMMENT '参与竞投的房源编号' ,
`content`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '房源的基本信息' ,
`blockname`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`infotype`  smallint(6) NOT NULL COMMENT '物业类型' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '1,竞投成功，-1,竞投失败' ,
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投房源中的备份记录'

;

-- ----------------------------
-- Table structure for `growth_bid_house_record_test`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_house_record_test`;
CREATE TABLE `growth_bid_house_record_test` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`bid_periods_id`  int(11) NOT NULL COMMENT '竞投期数id' ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投词类型 2小区词，3热搜词，4板块词' ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`house_id`  int(11) NOT NULL COMMENT '参与竞投的房源编号' ,
`content`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '房源的基本信息' ,
`blockname`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名称' ,
`infotype`  smallint(6) NOT NULL COMMENT '物业类型' ,
`bid_id`  int(11) NOT NULL COMMENT '竞投的id' ,
`score`  int(11) NOT NULL COMMENT '投入的分数' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '1,竞投成功，-1,竞投失败' ,
PRIMARY KEY (`id`),
INDEX `broker_id` USING BTREE (`broker_id`) ,
INDEX `bid_id` USING BTREE (`bid_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投房源中的记录'
AUTO_INCREMENT=417

;

-- ----------------------------
-- Table structure for `growth_bid_low_level`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_low_level`;
CREATE TABLE `growth_bid_low_level` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投类型1,小区专家，2,房源竞投' ,
`level`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '等级' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `type` USING BTREE (`type`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投最低操作权限表'
AUTO_INCREMENT=32

;

-- ----------------------------
-- Table structure for `growth_bid_message`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_message`;
CREATE TABLE `growth_bid_message` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`type`  tinyint(4) NOT NULL COMMENT '1,成功消息，2失败消息，3被超过消息' ,
`message`  blob NOT NULL COMMENT '消息主体' ,
`readflag`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否读过，1读过，2未读' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '消息时间' ,
PRIMARY KEY (`id`),
INDEX `broker_id` USING BTREE (`broker_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投消息表'
AUTO_INCREMENT=1

;

-- ----------------------------
-- Table structure for `growth_bid_periods`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_periods`;
CREATE TABLE `growth_bid_periods` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投类型1,小区专家，2,房源竞投' ,
`name`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT '0' COMMENT '第几期竞投，或者其他描述' ,
`start_time`  datetime NOT NULL COMMENT '投票开始时间' ,
`end_time`  datetime NOT NULL COMMENT '投票结束时间' ,
`tg_start_time`  datetime NOT NULL COMMENT '推广开始时间' ,
`tg_end_time`  datetime NOT NULL COMMENT '推广结束时间' ,
`valid`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否停止（有效，没效）1,有效，0无效' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投期次信息'
AUTO_INCREMENT=35

;

-- ----------------------------
-- Table structure for `growth_bid_periods_bak`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_periods_bak`;
CREATE TABLE `growth_bid_periods_bak` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`type`  tinyint(4) NOT NULL COMMENT 'type 竞投类型1,小区专家，2,房源竞投' ,
`name`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT '0' COMMENT '第几期竞投，或者其他描述' ,
`start_time`  datetime NOT NULL COMMENT '投票开始时间' ,
`end_time`  datetime NOT NULL COMMENT '投票结束时间' ,
`tg_start_time`  datetime NOT NULL COMMENT '推广开始时间' ,
`tg_end_time`  datetime NOT NULL COMMENT '推广结束时间' ,
`valid`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否停止（有效，没效）1,有效，0无效' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投期次信息'
AUTO_INCREMENT=18

;

-- ----------------------------
-- Table structure for `growth_bid_start`
-- ----------------------------
DROP TABLE IF EXISTS `growth_bid_start`;
CREATE TABLE `growth_bid_start` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`way_alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '竞投方式的别名' ,
`start_credit`  int(11) NOT NULL COMMENT '竞投的起拍积分值' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `way_alias` USING BTREE (`way_alias`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='竞投的起拍分值表'
AUTO_INCREMENT=10

;

-- ----------------------------
-- Table structure for `growth_block_attr`
-- ----------------------------
DROP TABLE IF EXISTS `growth_block_attr`;
CREATE TABLE `growth_block_attr` (
`id`  smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`name`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区属性名称' ,
`name_field`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '属性字段标识' ,
`del_flag`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '删除标识（0未删除，1删除）' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='小区属性表'
AUTO_INCREMENT=22

;

-- ----------------------------
-- Table structure for `growth_block_attr_lock`
-- ----------------------------
DROP TABLE IF EXISTS `growth_block_attr_lock`;
CREATE TABLE `growth_block_attr_lock` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`block_id`  int(10) UNSIGNED NOT NULL COMMENT '小区id' ,
`attr_name`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区属性字段名称' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `block_id` USING BTREE (`block_id`, `attr_name`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='小区属性锁定表'
AUTO_INCREMENT=34614

;

-- ----------------------------
-- Table structure for `growth_block_improve_audit`
-- ----------------------------
DROP TABLE IF EXISTS `growth_block_improve_audit`;
CREATE TABLE `growth_block_improve_audit` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`block_id`  int(11) NOT NULL COMMENT '小区id' ,
`broker_id`  int(11) NOT NULL COMMENT '经纪人id' ,
`attr_field`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区属性字段名称' ,
`attr_info`  text CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区完善内容' ,
`credit_score`  smallint(6) NOT NULL COMMENT '增加的积分值' ,
`exp_score`  smallint(6) NOT NULL COMMENT '增加的成长值' ,
`status`  tinyint(4) NOT NULL COMMENT '状态（0审核中，1审核通过，2审核未通过）' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间' ,
PRIMARY KEY (`id`),
INDEX `block_id` USING BTREE (`block_id`, `broker_id`) ,
INDEX `block_id_2` USING BTREE (`block_id`, `attr_field`) ,
INDEX `status` USING BTREE (`status`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='小区完善审核表'
AUTO_INCREMENT=4382

;

-- ----------------------------
-- Table structure for `growth_broker_pay_account`
-- ----------------------------
DROP TABLE IF EXISTS `growth_broker_pay_account`;
CREATE TABLE `growth_broker_pay_account` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) NOT NULL COMMENT '经纪人编号' ,
`get_credit`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '开通付费帐号是否已获取过积分' ,
`get_exp`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '开通付费帐号是否已获取过成长值' ,
`utime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='开通付费帐号是否获取成长值和积分值'
AUTO_INCREMENT=4099

;

-- ----------------------------
-- Table structure for `growth_certificate_log`
-- ----------------------------
DROP TABLE IF EXISTS `growth_certificate_log`;
CREATE TABLE `growth_certificate_log` (
`id`  int(10) NOT NULL AUTO_INCREMENT ,
`uid`  int(11) NOT NULL COMMENT '经纪人ID' ,
`avatar_credit`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '头像积分(0未认证,1认证)' ,
`avatar_exp`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '头像成长值(0未认证,1认证)' ,
`id_credit`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '身份证积分(0未认证,1认证)' ,
`id_exp`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '身份证成长值(0未认证,1认证)' ,
`bcard_credit`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '名片积分(0未认证,1认证)' ,
`bcard_exp`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '名片成长值(0未认证,1认证)' ,
`broker_credit`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '证书积分(0未认证,1认证)' ,
`broker_exp`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '证书成长值(0未认证,1认证)' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='记录经纪人领取证书增送成长值和积分关系表'
AUTO_INCREMENT=519

;

-- ----------------------------
-- Table structure for `growth_credit`
-- ----------------------------
DROP TABLE IF EXISTS `growth_credit`;
CREATE TABLE `growth_credit` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) NOT NULL COMMENT '经纪人id' ,
`credit`  int(10) UNSIGNED NOT NULL DEFAULT 0 ,
`frozen`  int(11) NOT NULL ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否有效，0或1；0无效，1有效' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `brokerId` USING BTREE (`broker_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='积分表'
AUTO_INCREMENT=11921

;

-- ----------------------------
-- Table structure for `growth_credit_day_count`
-- ----------------------------
DROP TABLE IF EXISTS `growth_credit_day_count`;
CREATE TABLE `growth_credit_day_count` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`ctime`  date NOT NULL COMMENT '时间日期' ,
`way_alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL DEFAULT '1' COMMENT '获取积分方式的别名，growth_credit_way表主键' ,
`broker_id`  int(11) NOT NULL COMMENT '经纪人id' ,
`day_credit`  int(11) NOT NULL DEFAULT 0 COMMENT '当天获取的积分' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `cwb` USING BTREE (`ctime`, `way_alias`, `broker_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='当天通过各种方式获取积分的累计。'
AUTO_INCREMENT=136943

;

-- ----------------------------
-- Table structure for `growth_credit_reward`
-- ----------------------------
DROP TABLE IF EXISTS `growth_credit_reward`;
CREATE TABLE `growth_credit_reward` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`event`  varchar(64) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '活动名称' ,
`score`  int(11) NOT NULL COMMENT '赠送的分数' ,
`number`  int(11) NOT NULL COMMENT '赠送积分的人数' ,
`falsenumber`  int(5) NOT NULL DEFAULT 0 COMMENT '插入错误数量' ,
`file`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件地址' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '赠送积分的时间' ,
`operator`  varchar(32) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '操作人' ,
`status`  tinyint(2) NOT NULL COMMENT '状态（有无赠送）' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='赠送积分记录'
AUTO_INCREMENT=17

;

-- ----------------------------
-- Table structure for `growth_credit_reward_false`
-- ----------------------------
DROP TABLE IF EXISTS `growth_credit_reward_false`;
CREATE TABLE `growth_credit_reward_false` (
`id`  int(6) NOT NULL AUTO_INCREMENT ,
`uid`  varchar(100) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '经纪人帐号' ,
`activityid`  int(6) NOT NULL COMMENT '活动id' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='积分赠送失败经纪人名单'
AUTO_INCREMENT=34

;

-- ----------------------------
-- Table structure for `growth_credit_way`
-- ----------------------------
DROP TABLE IF EXISTS `growth_credit_way`;
CREATE TABLE `growth_credit_way` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`type`  int(11) NOT NULL COMMENT '大类，1套餐，100认证，200活跃度，300房源，400贡献，500系统赠送，1000竞投，1500兑换礼品，2000违规' ,
`name`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '获取途径的名字' ,
`alias`  varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '途径别名' ,
`is_display`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否展示在后台1,展示，2不展示' ,
`description`  varchar(256) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '获取（或扣除）途径的描述' ,
`repeatable`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否可以重复获取（或扣除）积分。默认0,无限；大于0的数字代表具体次数' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `alias` USING BTREE (`alias`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='积分获取，消耗（或扣除）途径'
AUTO_INCREMENT=35

;

-- ----------------------------
-- Table structure for `growth_credit_way_package`
-- ----------------------------
DROP TABLE IF EXISTS `growth_credit_way_package`;
CREATE TABLE `growth_credit_way_package` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`way_alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '获取途径别名' ,
`package_id`  int(11) NOT NULL COMMENT '套餐类型ID' ,
`score`  int(11) NOT NULL COMMENT '分值，大于0表示加分，小于0表示减分' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `w_p` USING BTREE (`way_alias`, `package_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='套餐和获取途径对应的积分值'
AUTO_INCREMENT=112

;

-- ----------------------------
-- Table structure for `growth_exp`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp`;
CREATE TABLE `growth_exp` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`broker_id`  int(11) NOT NULL COMMENT '经纪人id' ,
`exp`  int(10) UNSIGNED NOT NULL DEFAULT 0 ,
`status`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否有效，0或1；0无效，1有效' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `brokerId` USING BTREE (`broker_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='成长值表'
AUTO_INCREMENT=11921

;

-- ----------------------------
-- Table structure for `growth_exp_controll_package`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp_controll_package`;
CREATE TABLE `growth_exp_controll_package` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`way_alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '获取途径别名' ,
`package_id`  int(11) NOT NULL COMMENT ' 套餐类型ID' ,
`score`  int(11) NOT NULL ,
PRIMARY KEY (`id`),
UNIQUE INDEX `w_p` USING BTREE (`way_alias`, `package_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='途径和套餐所对应的峰值'
AUTO_INCREMENT=163

;

-- ----------------------------
-- Table structure for `growth_exp_controll_way`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp_controll_way`;
CREATE TABLE `growth_exp_controll_way` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`type`  int(11) NOT NULL COMMENT '大类，预留字段' ,
`name`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '名称' ,
`alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '别名' ,
`is_display`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '1表示展示， 0表示不展示' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='峰值途径表'
AUTO_INCREMENT=4

;

-- ----------------------------
-- Table structure for `growth_exp_day_count`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp_day_count`;
CREATE TABLE `growth_exp_day_count` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`ctime`  date NOT NULL COMMENT '时间日期' ,
`way_alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL DEFAULT '1' COMMENT '获取成长值方式的别名，growth_level_way表主键' ,
`broker_id`  int(11) NOT NULL COMMENT '经纪人id' ,
`day_exp`  int(11) NOT NULL DEFAULT 0 COMMENT '当天获取的成长值' ,
PRIMARY KEY (`id`),
INDEX `cwb` USING BTREE (`ctime`, `way_alias`, `broker_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='当天通过各种方式获取成长值的累计。'
AUTO_INCREMENT=120070

;

-- ----------------------------
-- Table structure for `growth_exp_level`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp_level`;
CREATE TABLE `growth_exp_level` (
`level_id`  int(11) NOT NULL AUTO_INCREMENT COMMENT '等级编号' ,
`name`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '等级名称' ,
`down_exp`  int(11) NULL DEFAULT NULL COMMENT '成长值介于下限边值' ,
`up_exp`  int(11) NULL DEFAULT NULL COMMENT '成长值介于上限边值' ,
PRIMARY KEY (`level_id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='成长值等级名称'
AUTO_INCREMENT=16

;

-- ----------------------------
-- Table structure for `growth_exp_reward`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp_reward`;
CREATE TABLE `growth_exp_reward` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`event`  varchar(64) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '活动名称' ,
`score`  int(11) NOT NULL COMMENT '赠送的分数' ,
`number`  int(11) NOT NULL COMMENT '赠送成长值的人数' ,
`file`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上传文件地址' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '赠送成长值的时间' ,
`operator`  varchar(32) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '操作人' ,
`status`  tinyint(2) NOT NULL COMMENT '操作状态（有无赠送）' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='赠送成长值记录'
AUTO_INCREMENT=3

;

-- ----------------------------
-- Table structure for `growth_exp_reward_false`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp_reward_false`;
CREATE TABLE `growth_exp_reward_false` (
`id`  int(6) NOT NULL AUTO_INCREMENT ,
`uid`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '经纪人帐号' ,
`activityid`  int(6) NOT NULL COMMENT '活动id' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='赠送成长值失败经济人名单'
AUTO_INCREMENT=2

;

-- ----------------------------
-- Table structure for `growth_exp_way`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp_way`;
CREATE TABLE `growth_exp_way` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`type`  int(11) NOT NULL COMMENT '大类，1套餐，100认证，200活跃度，300房源，400贡献，500系统赠送，1000竞投，1500兑换礼品' ,
`name`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '获取途径的名字' ,
`alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '途迳别名' ,
`is_display`  tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否展示在后台设置，1展示，0，不展示' ,
`description`  varchar(256) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL DEFAULT NULL COMMENT '获取（或扣除）途径的描述' ,
`repeatable`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否可以重复获取（或扣除）成长值。默认0,无限；大于0的数字代表具体次数' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `alias` USING BTREE (`alias`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='成长值获取，消耗（或扣除）途径'
AUTO_INCREMENT=32

;

-- ----------------------------
-- Table structure for `growth_exp_way_package`
-- ----------------------------
DROP TABLE IF EXISTS `growth_exp_way_package`;
CREATE TABLE `growth_exp_way_package` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`way_alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '获取途径别名' ,
`package_id`  int(11) NOT NULL COMMENT '套餐类型ID' ,
`score`  int(11) NOT NULL COMMENT '分值，大于0表示加分，小于0表示减分' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `w_p` USING BTREE (`way_alias`, `package_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='套餐和获取途径对应的成长分值'
AUTO_INCREMENT=309

;

-- ----------------------------
-- Table structure for `growth_gift`
-- ----------------------------
DROP TABLE IF EXISTS `growth_gift`;
CREATE TABLE `growth_gift` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`uname`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '操作用户名' ,
`name`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '礼品名称' ,
`num`  smallint(6) NOT NULL COMMENT '礼品数量' ,
`exchange_num`  smallint(6) NOT NULL DEFAULT 0 COMMENT '已经参与兑换数量' ,
`pic`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '礼品图片地址' ,
`credit_score`  int(10) NOT NULL COMMENT '所需积分' ,
`open_flag`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '开始状态（0：未开启，1:已开启）' ,
`del_flag`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '删除标识（0：未删除，1：已删除）' ,
`broker_level`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '可参与的经纪人等级' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间' ,
`etime`  timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '礼品兑换结束时间' ,
PRIMARY KEY (`id`),
INDEX `open_flag` USING BTREE (`open_flag`) ,
INDEX `del_flag` USING BTREE (`del_flag`) ,
INDEX `etime` USING BTREE (`etime`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='兑换礼品表'
AUTO_INCREMENT=17

;

-- ----------------------------
-- Table structure for `growth_gift_exchange`
-- ----------------------------
DROP TABLE IF EXISTS `growth_gift_exchange`;
CREATE TABLE `growth_gift_exchange` (
`id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`bid`  int(10) UNSIGNED NOT NULL COMMENT '经纪人id' ,
`gid`  int(10) UNSIGNED NOT NULL COMMENT '礼品id' ,
`ctime`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '兑换时间' ,
`status`  tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态（0：未兑换，1：已兑换）' ,
PRIMARY KEY (`id`),
INDEX `bid` USING BTREE (`bid`) ,
INDEX `gid` USING BTREE (`gid`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='礼品兑换记录表'
AUTO_INCREMENT=24

;

-- ----------------------------
-- Table structure for `growth_house_log`
-- ----------------------------
DROP TABLE IF EXISTS `growth_house_log`;
CREATE TABLE `growth_house_log` (
`id`  int(10) NOT NULL AUTO_INCREMENT ,
`tbl`  varchar(4) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '表名(sell、rent)' ,
`broker_id`  int(11) NOT NULL COMMENT '经纪人编号' ,
`house_id`  int(11) NOT NULL COMMENT '房源号' ,
`grade`  tinyint(2) NULL DEFAULT NULL COMMENT '房源等级(1是非多图，2是多图，3是优质)' ,
`ptime`  int(11) NOT NULL COMMENT '房源发布时间' ,
`utime`  int(11) NOT NULL COMMENT '更新房源时间' ,
PRIMARY KEY (`id`),
INDEX `tbl_broker_id` USING BTREE (`broker_id`, `tbl`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='发布积分赠送控制记录'
AUTO_INCREMENT=264548

;

-- ----------------------------
-- Table structure for `growth_level_permission`
-- ----------------------------
DROP TABLE IF EXISTS `growth_level_permission`;
CREATE TABLE `growth_level_permission` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`way_id`  int(20) NOT NULL COMMENT '设置权限途径id' ,
`level_id`  int(11) NOT NULL ,
`status`  smallint(6) NOT NULL DEFAULT 0 COMMENT '状态 1选择， 0未选择' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `w_l` USING BTREE (`way_id`, `level_id`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='权限和等级关系表'
AUTO_INCREMENT=181

;

-- ----------------------------
-- Table structure for `growth_level_way_permission`
-- ----------------------------
DROP TABLE IF EXISTS `growth_level_way_permission`;
CREATE TABLE `growth_level_way_permission` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`type`  int(11) NOT NULL COMMENT '大类 1是房源竞投别名  2其它别名（备选）' ,
`subclass`  int(11) NOT NULL COMMENT '1,小区竞投，2,房源竞投' ,
`name`  varchar(50) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '权限名称和成长值权限名称一致' ,
`way_alias`  varchar(20) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '设置权限途径别名（别名绑定成长值表中way）' ,
`is_display`  tinyint(4) NOT NULL COMMENT '是否在页面上展示 1表示显示 0表示不显示' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `t_a` USING BTREE (`way_alias`, `type`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
AUTO_INCREMENT=8

;

-- ----------------------------
-- Table structure for `growth_pic_check_log`
-- ----------------------------
DROP TABLE IF EXISTS `growth_pic_check_log`;
CREATE TABLE `growth_pic_check_log` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`sid`  int(11) NOT NULL COMMENT '对应entry审核表ID' ,
`uid`  int(11) NOT NULL COMMENT '经纪人ID' ,
`blockid`  int(11) NOT NULL COMMENT '小区ID' ,
`blockname`  varchar(30) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '小区名' ,
`pic_type`  tinyint(2) NOT NULL COMMENT '图片类型' ,
`room`  tinyint(1) NOT NULL COMMENT '室' ,
`hall`  tinyint(1) NOT NULL COMMENT '厅' ,
`pic_url`  varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL COMMENT '图片路径' ,
`add_time`  int(10) NOT NULL COMMENT '时间戳' ,
`pic_status`  tinyint(1) NOT NULL DEFAULT 0 COMMENT '审核状态(0未审核，1通过，2未通过)' ,
`exp_score`  tinyint(4) NOT NULL COMMENT '经验值' ,
`credit_score`  tinyint(4) NOT NULL COMMENT '积分' ,
PRIMARY KEY (`id`),
INDEX `uid` USING BTREE (`uid`) 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='外景图审核记录'
AUTO_INCREMENT=2642

;

-- ----------------------------
-- Table structure for `growth_reserve_increase_job`
-- ----------------------------
DROP TABLE IF EXISTS `growth_reserve_increase_job`;
CREATE TABLE `growth_reserve_increase_job` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`increase_id`  int(11) NOT NULL COMMENT '保存房源预约成功已经增加过成长值的递增id最大值' ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=gbk COLLATE=gbk_chinese_ci
COMMENT='房源预约成功已经增加过成长值的递增id最大值'
AUTO_INCREMENT=2

;

-- ----------------------------
-- Auto increment value for `block_level_heat`
-- ----------------------------
ALTER TABLE `block_level_heat` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `block_level_heat_setting`
-- ----------------------------
ALTER TABLE `block_level_heat_setting` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `block_level_info_full`
-- ----------------------------
ALTER TABLE `block_level_info_full` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `block_level_info_full_setting`
-- ----------------------------
ALTER TABLE `block_level_info_full_setting` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_activity_promot`
-- ----------------------------
ALTER TABLE `growth_activity_promot` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_attention`
-- ----------------------------
ALTER TABLE `growth_bid_attention` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_block_expert`
-- ----------------------------
ALTER TABLE `growth_bid_block_expert` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_block_expert_bak`
-- ----------------------------
ALTER TABLE `growth_bid_block_expert_bak` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_block_expert_record_finish`
-- ----------------------------
ALTER TABLE `growth_bid_block_expert_record_finish` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_block_expert_record_history`
-- ----------------------------
ALTER TABLE `growth_bid_block_expert_record_history` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_block_expert_record_history_bak`
-- ----------------------------
ALTER TABLE `growth_bid_block_expert_record_history_bak` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_block_expert_record_on`
-- ----------------------------
ALTER TABLE `growth_bid_block_expert_record_on` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_broker_user`
-- ----------------------------
ALTER TABLE `growth_bid_broker_user` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_hotsearch_set`
-- ----------------------------
ALTER TABLE `growth_bid_hotsearch_set` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_house`
-- ----------------------------
ALTER TABLE `growth_bid_house` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_house_bak`
-- ----------------------------
ALTER TABLE `growth_bid_house_bak` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_house_level`
-- ----------------------------
ALTER TABLE `growth_bid_house_level` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_house_record_finish`
-- ----------------------------
ALTER TABLE `growth_bid_house_record_finish` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_house_record_history`
-- ----------------------------
ALTER TABLE `growth_bid_house_record_history` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_house_record_history_bak`
-- ----------------------------
ALTER TABLE `growth_bid_house_record_history_bak` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_house_record_on`
-- ----------------------------
ALTER TABLE `growth_bid_house_record_on` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_house_record_test`
-- ----------------------------
ALTER TABLE `growth_bid_house_record_test` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_low_level`
-- ----------------------------
ALTER TABLE `growth_bid_low_level` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_message`
-- ----------------------------
ALTER TABLE `growth_bid_message` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_periods`
-- ----------------------------
ALTER TABLE `growth_bid_periods` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_periods_bak`
-- ----------------------------
ALTER TABLE `growth_bid_periods_bak` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_bid_start`
-- ----------------------------
ALTER TABLE `growth_bid_start` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_block_attr`
-- ----------------------------
ALTER TABLE `growth_block_attr` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_block_attr_lock`
-- ----------------------------
ALTER TABLE `growth_block_attr_lock` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_block_improve_audit`
-- ----------------------------
ALTER TABLE `growth_block_improve_audit` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_broker_pay_account`
-- ----------------------------
ALTER TABLE `growth_broker_pay_account` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_certificate_log`
-- ----------------------------
ALTER TABLE `growth_certificate_log` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_credit`
-- ----------------------------
ALTER TABLE `growth_credit` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_credit_day_count`
-- ----------------------------
ALTER TABLE `growth_credit_day_count` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_credit_reward`
-- ----------------------------
ALTER TABLE `growth_credit_reward` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_credit_reward_false`
-- ----------------------------
ALTER TABLE `growth_credit_reward_false` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_credit_way`
-- ----------------------------
ALTER TABLE `growth_credit_way` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_credit_way_package`
-- ----------------------------
ALTER TABLE `growth_credit_way_package` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp`
-- ----------------------------
ALTER TABLE `growth_exp` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp_controll_package`
-- ----------------------------
ALTER TABLE `growth_exp_controll_package` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp_controll_way`
-- ----------------------------
ALTER TABLE `growth_exp_controll_way` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp_day_count`
-- ----------------------------
ALTER TABLE `growth_exp_day_count` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp_level`
-- ----------------------------
ALTER TABLE `growth_exp_level` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp_reward`
-- ----------------------------
ALTER TABLE `growth_exp_reward` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp_reward_false`
-- ----------------------------
ALTER TABLE `growth_exp_reward_false` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp_way`
-- ----------------------------
ALTER TABLE `growth_exp_way` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_exp_way_package`
-- ----------------------------
ALTER TABLE `growth_exp_way_package` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_gift`
-- ----------------------------
ALTER TABLE `growth_gift` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_gift_exchange`
-- ----------------------------
ALTER TABLE `growth_gift_exchange` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_house_log`
-- ----------------------------
ALTER TABLE `growth_house_log` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_level_permission`
-- ----------------------------
ALTER TABLE `growth_level_permission` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_level_way_permission`
-- ----------------------------
ALTER TABLE `growth_level_way_permission` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_pic_check_log`
-- ----------------------------
ALTER TABLE `growth_pic_check_log` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for `growth_reserve_increase_job`
-- ----------------------------
ALTER TABLE `growth_reserve_increase_job` AUTO_INCREMENT=1;




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

--
-- 小区表block添加相关字段
--

alter table block  add  `lock_flag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '锁定标识（小区完善模块：0未锁定，1锁定）',
add  `lock_opennum` tinyint(4) NOT NULL COMMENT '小区属性未锁定数量', 
add  `lock_layout` tinyint(1) NOT NULL COMMENT '户型图锁定标识(1锁定,0未锁定)',
add  `lock_outside` tinyint(1) NOT NULL COMMENT '外景图锁定标识(1锁定,0未锁定)',
add  index lock_opennum (`lock_opennum`);

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

--
-- XXX
--

ALTER TABLE  `broker_package` ADD  `exp_status` TINYINT( 4 ) NOT NULL DEFAULT  '1' COMMENT  '成长值开关',
ADD  `credit_status` TINYINT( 4 ) NOT NULL DEFAULT  '1' COMMENT  '经验值开关';

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

--
-- XXX
--
ALTER TABLE  `block_lock` ADD  `flag2` TINYINT( 1 ) NOT NULL COMMENT  '外景图锁定标识'; 

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

--
-- 图片入库审核表admin_pic_entry
--
CREATE TABLE IF NOT EXISTS `admin_pic_entry` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `blockid` int(11) NOT NULL COMMENT '小区编号',
  `blockname` varchar(10) NOT NULL COMMENT '小区名称',
  `sort` tinyint(1) NOT NULL COMMENT '图片类型0/1/2',
  `room` tinyint(1) NOT NULL COMMENT '室',
  `hall` tinyint(1) NOT NULL COMMENT '厅',
  `toilet` tinyint(1) NOT NULL COMMENT '卫',
  `pic_url` varchar(255) NOT NULL COMMENT '图片路径',
  `dateline` int(10) NOT NULL COMMENT '时间戳',
  `houseid` int(11) NOT NULL COMMENT '房源id',
  `uid` int(10) NOT NULL COMMENT '经纪人id',
  `flag` tinyint(1) NOT NULL COMMENT '图片来源',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk COMMENT='小区图片待入库表' ;
";


/*
注意：
1 . 新增56张表
2 .
	growth_credit_record_
	growth_exp_record_
	以上面开头的表通过定时脚本创建，详见：\module\init\growthinit_broker_record.php
	如：growth_credit_record_20140605  /  growth_exp_record_20140605

*/

die('关闭');

//开始创建表结构
$container = Container::getInstance();
$db = $container->get('db');
$db->Execute($sql);
if($db->Affected_Rows()){
	echo "经纪人成长体系数据表创建成功";
}else{
	echo "经纪人成长体系数据表创建失败";
}

die;

?>