-- MySQL dump 10.13  Distrib 5.5.43, for debian-linux-gnu (x86_64)
--
-- Host: 192.168.12.4    Database: onepage_v1_sg
-- ------------------------------------------------------
-- Server version 5.5.38-0+wheezy1-log


-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(100) NOT NULL COMMENT '分类名',
  `status` tinyint(2) NOT NULL DEFAULT '1' COMMENT '状态：1：存在 2：删除',
  `extend` text NOT NULL COMMENT '扩展字段',
  `create_time` int(10) unsigned NOT NULL COMMENT '创建时间',
  `update_time` int(10) unsigned NOT NULL COMMENT '更新时间',
  `cas_token` int(10) unsigned NOT NULL COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='平台分类';
/*!40101 SET character_set_client = @saved_cs_client */;

-- ----------------------------
-- Table structure for focus
-- ----------------------------
DROP TABLE IF EXISTS `focus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `focus` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `platform_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '平台ID',
  `index` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `name` varchar(100) NOT NULL COMMENT '名称',
  `status` tinyint(2) NOT NULL DEFAULT '1' COMMENT '状态：1：存在 2：删除',
  `extend` text NOT NULL COMMENT '扩展字段',
  `create_time` int(10) unsigned NOT NULL COMMENT '创建时间',
  `update_time` int(10) unsigned NOT NULL COMMENT '更新时间',
  `cas_token` int(10) unsigned NOT NULL COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='精彩推荐';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `lottery_user_feedback`
--

DROP TABLE IF EXISTS `lottery_user_feedback`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lottery_user_feedback` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'LOGID',
  `events_id` int(10) unsigned NOT NULL COMMENT '所属活动ID',
  `lottery_data_id` int(10) unsigned NOT NULL COMMENT '参与活动的数据ID',
  `uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  `extend` text NOT NULL COMMENT '扩展字段',
  `create_time` int(10) unsigned NOT NULL DEFAULT 0,
  `update_time` int(10) unsigned NOT NULL DEFAULT 0,
  `cas_token` int(10) unsigned NOT NULL DEFAULT 0,
  `status` int(10) unsigned NOT NULL DEFAULT 1 COMMENT '显示状态 1显示 2隐藏',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='用户反馈信息';
/*!40101 SET character_set_client = @saved_cs_client */;


--
-- Table structure for table `lottery_events_help_user`
--

DROP TABLE IF EXISTS `lottery_events_help_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lottery_events_help_user` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `events_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属活动ID',
  `uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  `extend` text NOT NULL COMMENT '扩展字段',
  `create_time` int(10) unsigned NOT NULL DEFAULT 0,
  `update_time` int(10) unsigned NOT NULL DEFAULT 0,
  `cas_token` int(10) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='助力用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `lottery_events_help_user_log`
--

DROP TABLE IF EXISTS `lottery_events_help_user_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lottery_events_help_user_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `events_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属活动ID',
  `help_id` int(11) NOT NULL DEFAULT '0' COMMENT '助力id',
  `uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  `extend` text NOT NULL COMMENT '扩展字段',
  `create_time` int(10) unsigned NOT NULL DEFAULT 0,
  `update_time` int(10) unsigned NOT NULL DEFAULT 0,
  `cas_token` int(10) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='助力用户日志表';
/*!40101 SET character_set_client = @saved_cs_client */;


ALTER TABLE lottery_events ADD `focus_display` int(10) DEFAULT 1;
ALTER TABLE lottery_events ADD `top_display` int(10) DEFAULT 1;
ALTER TABLE lottery_events ADD `category_id` int(10) DEFAULT 1;

ALTER TABLE lottery_user_participate_log ADD `audit` int(10) DEFAULT 1;
ALTER TABLE lottery_events_forms ADD `audit` int(10) DEFAULT 1;
ALTER TABLE lottery_data ADD `audit` int(10) DEFAULT 2;
ALTER TABLE lottery_data ADD `platform_id` int(10) DEFAULT 2;
ALTER TABLE lottery_events_help_user ADD `num` int(10) DEFAULT 0;

ALTER TABLE lottery_user_feedback ADD `lottery_data_id` int(10) DEFAULT 0;