Commit a0adad45 by Phạm Văn Đoan

hiển thị tên ca sĩ và tên nhạc sĩ

parent 0f7b956d
......@@ -15,6 +15,7 @@ class CmsTrack extends CI_Controller
date_default_timezone_set("Asia/Ho_Chi_Minh");
//
$this->load->model('mtrack');
$this->load->model('muser');
$this->load->model('mcontest_details');
$this->load->model('mactionlog');
}
......@@ -42,6 +43,8 @@ class CmsTrack extends CI_Controller
$offset = ($pageId - 1) * $limit;
$data['offset'] = ($pageId - 1) * $limit;
$totalRecord = $this->mtrack->cmsCountAll($fByName);
$data['listUser'] = $this->muser->getIdFullname();
//MyHelper::echoPreDie($data['listUser']);
$data['pagination'] = MyHelper::genPaginationLink($totalRecord, $limit, $pageId);
$data['listData'] = $this->mtrack->cmsGetPagination($limit, $offset, $fByName);
//
......
......@@ -2,7 +2,7 @@
class Muser extends CI_Model
{
protected $_table = 'user';
protected $_table = 'users';
public function __construct()
{
......@@ -188,6 +188,21 @@ class Muser extends CI_Model
return $query->result_array();
}
public function getIdFullname()
{
$this->db->select('id, full_name');
$this->db->from($this->_table);
$query = $this->db->get();
$data = $query->result_array();
$result = [];
if ($data) {
foreach ($data as $val) {
$result[$val['id']] = $val['full_name'];
}
}
return $result;
}
}
......
......@@ -68,13 +68,17 @@ class Mtrack extends CI_Model
public function cmsGetPagination($record, $start, $name = null)
{
$this->db->select($this->_table . '.*');
$this->db->select($this->_table . '.*, u1.full_name AS singer_name, u2.full_name AS composer_name');
$this->db->from($this->_table);
$this->db->join('track_user', 'track_user.track_id = tracks.id', 'left');
$this->db->join('track_artists', 'track_artists.track_id = tracks.id', 'left');
$this->db->join('users u1', 'u1.id = track_user.user_id', 'left');
$this->db->join('users u2', 'u2.id = track_artists.user_id', 'left');
if ($name != null) {
$this->db->like('title', $name, 'both');
$this->db->or_like('description', $name, 'both');
$this->db->or_like('slug', $name, 'both');
$this->db->or_like('tag', $name, 'both');
$this->db->like('tracks.title', $name, 'both');
$this->db->or_like('tracks.description', $name, 'both');
$this->db->or_like('tracks.slug', $name, 'both');
$this->db->or_like('tracks.tag', $name, 'both');
}
$this->db->order_by($this->_table . '.title', 'asc');
$this->db->limit($record, $start);
......
......@@ -63,7 +63,7 @@ $action = $CI->router->fetch_method();
<small>CMS for Administrator</small>
</a>
</div>
<?php //die('a:'.$CI->session->userdata('username')) ?>
<div class="navbar-buttons navbar-header pull-right" role="navigation">
<ul class="nav ace-nav">
<li class="light-blue">
......@@ -222,7 +222,7 @@ $action = $CI->router->fetch_method();
<?php endif; ?>
<!-- Quan ly he thong -->
<?php if($this->session->userdata('is_super') == 1): ?>
<?php if($CI->session->userdata('group_id') == 2 && $CI->session->userdata('is_super') == 1): ?>
<li class="<?php if($controller && $controller == 'cmsSetting') echo 'active open'?>">
<a href="#" class="dropdown-toggle">
<i class="menu-icon fa fa-cogs"></i>
......@@ -364,12 +364,6 @@ $action = $CI->router->fetch_method();
<!-- ace scripts -->
<script src="<?php echo base_url().'public/assets/js/ace-elements.min.js' ?>"></script>
<script src="<?php echo base_url().'public/assets/js/ace.min.js' ?>"></script>
<?php
//$CI->load->model('Msubrequest');
//$minDate = $CI->Msubrequest->getMinDateYMD();
//$minDate = $minDate[0]['createdateYMD'];
//$minDate = date('d/m/Y', strtotime($minDate));
?>
<script type="text/javascript">
$(document).ready(function(){
$('input[name=input-date-range-revenue-daily]').daterangepicker({
......
......@@ -16,10 +16,10 @@
<td style="text-align: center"><?php echo ($key+1+$offset); ?></td>
<td style="text-align: center">#<?php echo $data['id']; ?></td>
<td style="text-align: left"><?php echo $data['title']; ?></td>
<td style="text-align: center"></td>
<td style="text-align: center"></td>
<td style="text-align: left"><?php echo $data['singer_name']; ?></td>
<td style="text-align: left"><?php echo $data['composer_name']; ?></td>
<td style="text-align: center">
<a href="<?php echo base_url().'backend/cmsContest/editContest/'.$data['id']; ?>" title="Xem chi tiết">
<a href="<?php echo base_url().'backend/cmsTrack/editTrack/'.$data['id']; ?>" title="Xem chi tiết">
<i class="ace-icon fa fa-pencil bigger-130"></i>
</a>
</td>
......
<div class="row" style="text-align: center">
<!--<img src="<?php /*echo Myfunction::genSrcImageByBase64($path); */?>" class="img-responsive" width="80%" style="display:inline-table ">-->
<!--<img src="<?php /*echo base_url()*/?>images/airport_homepage.jpg" class="img-responsive" width="80%" style="display:inline-table ">-->
</div>
<!-- /.row -->
\ No newline at end of file
......@@ -56,7 +56,7 @@ $buttonLogin = array(
<div class="widget-body">
<div class="widget-main">
<h4 class="header blue lighter bigger" style="text-align: center">
<i class="ace-icon fa fa-music"></i>CMS
<i class="ace-icon fa fa-music"></i> CMS
</h4>
<div class="text-center">
<img src="<?php echo base_url('images/logo.png') ?>" style="height: 45px">
......
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.6.14 : Database - mini_game
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`mini_game` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `mini_game`;
/*Table structure for table `access_action` */
DROP TABLE IF EXISTS `access_action`;
CREATE TABLE `access_action` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`controller_id` int(11) NOT NULL,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten action',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=off, 1=on',
`is_default` int(1) DEFAULT '0' COMMENT '0:Không đặt mặc định, 1:Mặc định tạo ra khi thêm user',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_access_action_access_controller1_idx` (`controller_id`),
CONSTRAINT `fk_access_action_access_controller1` FOREIGN KEY (`controller_id`) REFERENCES `access_controller` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `access_action` */
/*Table structure for table `access_controller` */
DROP TABLE IF EXISTS `access_controller`;
CREATE TABLE `access_controller` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten controller',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=off, 1=on',
`is_default` int(1) DEFAULT '0' COMMENT '0:Không tạo mặc định, 1:Tạo mặc định khi thêm mới user',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `access_controller` */
/*Table structure for table `action_log` */
DROP TABLE IF EXISTS `action_log`;
CREATE TABLE `action_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`actor_id` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`actor_name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`action` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ADDED, UPDATED, DELETED, WARNING_DEV, SUPPEND_DEV, SUPPEND_APP, RESET_PASSWORD',
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`record_id` bigint(20) DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `action_log` */
/*Table structure for table `admin` */
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL COMMENT 'Nhóm quyền',
`fullname` varchar(255) DEFAULT NULL COMMENT 'Họ và tên',
`username` varchar(255) DEFAULT NULL COMMENT 'Tên đăng nhập',
`salt` varchar(255) DEFAULT NULL COMMENT 'Chuỗi bảo mật',
`password` varchar(255) DEFAULT NULL COMMENT 'Mật khẩu mã hóa',
`email` varchar(255) DEFAULT NULL COMMENT 'Email',
`is_active` tinyint(1) DEFAULT '0' COMMENT '0: Ngừng hoạt động, 1: Hoạt động',
`is_super` tinyint(1) DEFAULT '0' COMMENT '0: User thường, 1: Super User',
`created_at` datetime DEFAULT NULL COMMENT 'Ngày tạo',
`updated_at` datetime DEFAULT NULL COMMENT 'Ngày cập nhật',
PRIMARY KEY (`id`),
KEY `fk_admin_group1_idx` (`group_id`),
CONSTRAINT `fk_admin_group1` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
/*Data for the table `admin` */
insert into `admin`(`id`,`group_id`,`fullname`,`username`,`salt`,`password`,`email`,`is_active`,`is_super`,`created_at`,`updated_at`) values (38,2,'Hùng TN','hungtn',NULL,'c0b1d84fd16d13bf53eb5e8b2c197565b569855240b59ad4b7b812df946534c4',NULL,1,0,'2017-02-13 17:43:09','2017-02-13 17:43:09');
/*Table structure for table `admin_access_action` */
DROP TABLE IF EXISTS `admin_access_action`;
CREATE TABLE `admin_access_action` (
`admin_id` int(11) NOT NULL,
`access_action_id` int(11) NOT NULL,
PRIMARY KEY (`admin_id`,`access_action_id`),
KEY `fk_admin_has_access_action_admin1_idx` (`admin_id`),
KEY `fk_admin_has_access_action_access_action1_idx` (`access_action_id`),
CONSTRAINT `fk_admin_has_access_action_access_action1` FOREIGN KEY (`access_action_id`) REFERENCES `access_action` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_admin_has_access_action_admin1` FOREIGN KEY (`admin_id`) REFERENCES `admin` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `admin_access_action` */
/*Table structure for table `game` */
DROP TABLE IF EXISTS `game`;
CREATE TABLE `game` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`total_time` bigint(20) DEFAULT '0' COMMENT 'Tổng thời gian hoàn thành',
`total_point` bigint(20) DEFAULT '0' COMMENT 'Tổng số điểm chơi',
`total_game` bigint(20) DEFAULT '0' COMMENT 'Tổng số lần chơi',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_game_user_idx` (`user_id`),
CONSTRAINT `fk_game_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `game` */
insert into `game`(`id`,`user_id`,`total_time`,`total_point`,`total_game`,`created_at`,`updated_at`) values (1,1,460,40,4,'2017-02-14 11:23:24','2017-02-14 11:56:57'),(2,2,300,40,3,'2017-02-14 11:24:50','2017-02-14 11:28:16'),(3,3,200,20,5,'2017-02-14 11:28:57','2017-02-14 11:47:05');
/*Table structure for table `game_details` */
DROP TABLE IF EXISTS `game_details`;
CREATE TABLE `game_details` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL COMMENT 'Mã User',
`time` bigint(20) DEFAULT '0' COMMENT 'Thời gian hoàn thành',
`point` bigint(20) DEFAULT '0' COMMENT 'Số điểm',
`time_play` bigint(20) DEFAULT '0' COMMENT 'Thời gian chơi',
`time_play_2` datetime DEFAULT NULL COMMENT 'Thời gian bắt đầu chơi',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_game_user_idx` (`user_id`),
CONSTRAINT `fk_game_user0` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `game_details` */
insert into `game_details`(`id`,`user_id`,`time`,`point`,`time_play`,`time_play_2`,`created_at`,`updated_at`) values (1,1,120,10,0,'2017-02-14 10:10:10','2017-02-14 11:02:17','2017-02-14 11:02:17'),(2,1,120,10,0,'2017-02-14 10:10:10','2017-02-14 11:23:24','2017-02-14 11:23:24'),(3,1,120,10,0,'2017-02-14 10:10:10','2017-02-14 11:23:48','2017-02-14 11:23:48'),(4,2,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:24:50','2017-02-14 11:24:50'),(5,2,100,10,0,'1970-01-01 07:00:00','2017-02-14 11:27:57','2017-02-14 11:27:57'),(6,2,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:28:16','2017-02-14 11:28:16'),(7,3,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:28:57','2017-02-14 11:28:57'),(8,3,0,0,0,'2017-02-14 10:10:10','2017-02-14 11:30:31','2017-02-14 11:30:31'),(9,3,0,0,0,'2017-02-14 10:10:10','2017-02-14 11:36:11','2017-02-14 11:36:11'),(10,3,0,0,0,'2017-02-14 10:10:10','2017-02-14 11:37:00','2017-02-14 11:37:00'),(11,3,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:47:05','2017-02-14 11:47:05'),(12,1,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:56:55','2017-02-14 11:56:55');
/*Table structure for table `group` */
DROP TABLE IF EXISTS `group`;
CREATE TABLE `group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten nhom',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Mo ta',
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Kich hoat',
`is_super_group` tinyint(1) DEFAULT '0' COMMENT 'super group',
`group_type` int(1) DEFAULT '0' COMMENT 'Loại nhóm: 0:Nhóm thông thường, 1:Nhóm đối tác truyền thông, 2:Nhóm Super Admin',
`created_at` datetime DEFAULT NULL COMMENT 'Ngay tao',
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `group` */
insert into `group`(`id`,`name`,`description`,`is_active`,`is_super_group`,`group_type`,`created_at`,`updated_at`) values (1,'Admin','Admin',1,0,0,'2017-02-13 17:40:36','2017-02-13 17:40:39'),(2,'SuperAdmin','SuperAdmin',1,1,0,'2017-02-13 17:41:41','2017-02-13 17:41:43');
/*Table structure for table `group_access_controller` */
DROP TABLE IF EXISTS `group_access_controller`;
CREATE TABLE `group_access_controller` (
`group_id` int(11) NOT NULL,
`access_controller_id` int(11) NOT NULL,
PRIMARY KEY (`group_id`,`access_controller_id`),
KEY `fk_group_has_access_controller_access_controller1_idx` (`access_controller_id`),
KEY `fk_group_has_access_controller_group1_idx` (`group_id`),
CONSTRAINT `fk_group_has_access_controller_access_controller1` FOREIGN KEY (`access_controller_id`) REFERENCES `access_controller` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_group_has_access_controller_group1` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `group_access_controller` */
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`fullname` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Họ và tên',
`avatar` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Đường dẫn ảnh đại diện',
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Tài khoản',
`salt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Salt',
`password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Mật khẩu',
`gender` tinyint(1) DEFAULT NULL COMMENT 'Giới tính',
`birthday` date DEFAULT NULL COMMENT 'Ngày sinh 2017-01-10',
`address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Địa chỉ',
`email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Email',
`mobile` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Số điện thoại',
`reward_code` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Mã dự thưởng',
`is_active` tinyint(1) DEFAULT '1' COMMENT 'Trạng thái kích hoạt:\n1-Hoạt động\n0-Tạm dừng\n2-Khóa tài khoản',
`created_at` datetime DEFAULT NULL COMMENT 'Ngày tạo',
`updated_at` datetime DEFAULT NULL COMMENT 'Ngày cập nhật',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `user` */
insert into `user`(`id`,`fullname`,`avatar`,`username`,`salt`,`password`,`gender`,`birthday`,`address`,`email`,`mobile`,`reward_code`,`is_active`,`created_at`,`updated_at`) values (1,'Đoan PV',NULL,'doanpv',NULL,NULL,1,'2017-02-13',NULL,'doan281@gmail.com','0912113114','123245',1,'2017-02-13 21:31:48','2017-02-13 21:31:51'),(2,'Hùng TN',NULL,'hungtn',NULL,NULL,1,'2017-02-13',NULL,'hungtn@gmail.com','0912113115','563498',1,'2017-02-13 21:31:48','2017-02-13 21:31:51'),(3,'Hiệu ĐĐ',NULL,'hieudd',NULL,NULL,1,'2017-02-13',NULL,'hieudd@gmail.com','0912113116','335990',1,'2017-02-13 21:31:48','2017-02-13 21:31:51');
/*Table structure for table `user_log` */
DROP TABLE IF EXISTS `user_log`;
CREATE TABLE `user_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`action` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'LOGIN, LOGOUT',
`time_login` datetime DEFAULT NULL,
`account_input` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`user_agent` text COLLATE utf8_unicode_ci,
`type` varchar(45) COLLATE utf8_unicode_ci DEFAULT 'BE' COMMENT 'BE, FE',
`result` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'SUCCESS, FAILED',
`time_logout` datetime DEFAULT NULL,
`duration` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `user_log` */
insert into `user_log`(`id`,`action`,`time_login`,`account_input`,`ip_address`,`user_agent`,`type`,`result`,`time_logout`,`duration`) values (8,'LOGIN/LOGOUT','2017-02-13 23:10:56','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-13 23:11:03',7),(9,'LOGIN/LOGOUT','2017-02-14 08:28:55','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS',NULL,NULL),(10,'LOGIN/LOGOUT','2017-02-14 14:41:27','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 18:03:13',12106),(11,'LOGIN/LOGOUT','2017-02-14 18:03:21','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 18:34:11',1850),(12,'LOGIN/LOGOUT','2017-02-14 22:34:28','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 23:32:34',3486);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.6.14 : Database - mini_game
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`mini_game` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
--USE `mini_game`;
/*Table structure for table `access_action` */
DROP TABLE IF EXISTS `access_action`;
CREATE TABLE `access_action` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`controller_id` int(11) NOT NULL,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten action',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=off, 1=on',
`is_default` int(1) DEFAULT '0' COMMENT '0:Không đặt mặc định, 1:Mặc định tạo ra khi thêm user',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_access_action_access_controller1_idx` (`controller_id`),
CONSTRAINT `fk_access_action_access_controller1` FOREIGN KEY (`controller_id`) REFERENCES `access_controller` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `access_action` */
/*Table structure for table `access_controller` */
DROP TABLE IF EXISTS `access_controller`;
CREATE TABLE `access_controller` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten controller',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=off, 1=on',
`is_default` int(1) DEFAULT '0' COMMENT '0:Không tạo mặc định, 1:Tạo mặc định khi thêm mới user',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `access_controller` */
/*Table structure for table `action_log` */
DROP TABLE IF EXISTS `action_log`;
CREATE TABLE `action_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`actor_id` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`actor_name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`action` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ADDED, UPDATED, DELETED, WARNING_DEV, SUPPEND_DEV, SUPPEND_APP, RESET_PASSWORD',
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`record_id` bigint(20) DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `action_log` */
/*Table structure for table `admin` */
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL COMMENT 'Nhóm quyền',
`fullname` varchar(255) DEFAULT NULL COMMENT 'Họ và tên',
`username` varchar(255) DEFAULT NULL COMMENT 'Tên đăng nhập',
`salt` varchar(255) DEFAULT NULL COMMENT 'Chuỗi bảo mật',
`password` varchar(255) DEFAULT NULL COMMENT 'Mật khẩu mã hóa',
`email` varchar(255) DEFAULT NULL COMMENT 'Email',
`is_active` tinyint(1) DEFAULT '0' COMMENT '0: Ngừng hoạt động, 1: Hoạt động',
`is_super` tinyint(1) DEFAULT '0' COMMENT '0: User thường, 1: Super User',
`created_at` datetime DEFAULT NULL COMMENT 'Ngày tạo',
`updated_at` datetime DEFAULT NULL COMMENT 'Ngày cập nhật',
PRIMARY KEY (`id`),
KEY `fk_admin_group1_idx` (`group_id`),
CONSTRAINT `fk_admin_group1` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
/*Data for the table `admin` */
insert into `admin`(`id`,`group_id`,`fullname`,`username`,`salt`,`password`,`email`,`is_active`,`is_super`,`created_at`,`updated_at`) values (38,2,'Hùng TN','hungtn',NULL,'c0b1d84fd16d13bf53eb5e8b2c197565b569855240b59ad4b7b812df946534c4',NULL,1,0,'2017-02-13 17:43:09','2017-02-13 17:43:09');
/*Table structure for table `admin_access_action` */
DROP TABLE IF EXISTS `admin_access_action`;
CREATE TABLE `admin_access_action` (
`admin_id` int(11) NOT NULL,
`access_action_id` int(11) NOT NULL,
PRIMARY KEY (`admin_id`,`access_action_id`),
KEY `fk_admin_has_access_action_admin1_idx` (`admin_id`),
KEY `fk_admin_has_access_action_access_action1_idx` (`access_action_id`),
CONSTRAINT `fk_admin_has_access_action_access_action1` FOREIGN KEY (`access_action_id`) REFERENCES `access_action` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_admin_has_access_action_admin1` FOREIGN KEY (`admin_id`) REFERENCES `admin` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `admin_access_action` */
/*Table structure for table `game` */
DROP TABLE IF EXISTS `game`;
CREATE TABLE `game` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`total_time` bigint(20) DEFAULT '0' COMMENT 'Tổng thời gian hoàn thành',
`total_point` bigint(20) DEFAULT '0' COMMENT 'Tổng số điểm chơi',
`total_game` bigint(20) DEFAULT '0' COMMENT 'Tổng số lần chơi',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_game_user_idx` (`user_id`),
CONSTRAINT `fk_game_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `game` */
insert into `game`(`id`,`user_id`,`total_time`,`total_point`,`total_game`,`created_at`,`updated_at`) values (1,1,460,40,4,'2017-02-14 11:23:24','2017-02-14 11:56:57'),(2,2,300,40,3,'2017-02-14 11:24:50','2017-02-14 11:28:16'),(3,3,200,20,5,'2017-02-14 11:28:57','2017-02-14 11:47:05'),(4,13,100,10,1,'2017-02-15 11:53:51','2017-02-15 11:53:51');
/*Table structure for table `game_details` */
DROP TABLE IF EXISTS `game_details`;
CREATE TABLE `game_details` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL COMMENT 'Mã User',
`time` bigint(20) DEFAULT '0' COMMENT 'Thời gian hoàn thành',
`point` bigint(20) DEFAULT '0' COMMENT 'Số điểm',
`time_play` bigint(20) DEFAULT '0' COMMENT 'Thời gian chơi',
`time_play_2` datetime DEFAULT NULL COMMENT 'Thời gian bắt đầu chơi',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_game_user_idx` (`user_id`),
CONSTRAINT `fk_game_user0` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `game_details` */
insert into `game_details`(`id`,`user_id`,`time`,`point`,`time_play`,`time_play_2`,`created_at`,`updated_at`) values (1,1,120,10,0,'2017-02-14 10:10:10','2017-02-14 11:02:17','2017-02-14 11:02:17'),(2,1,120,10,0,'2017-02-14 10:10:10','2017-02-14 11:23:24','2017-02-14 11:23:24'),(3,1,120,10,0,'2017-02-14 10:10:10','2017-02-14 11:23:48','2017-02-14 11:23:48'),(4,2,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:24:50','2017-02-14 11:24:50'),(5,2,100,10,0,'1970-01-01 07:00:00','2017-02-14 11:27:57','2017-02-14 11:27:57'),(6,2,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:28:16','2017-02-14 11:28:16'),(7,3,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:28:57','2017-02-14 11:28:57'),(8,3,0,0,0,'2017-02-14 10:10:10','2017-02-14 11:30:31','2017-02-14 11:30:31'),(9,3,0,0,0,'2017-02-14 10:10:10','2017-02-14 11:36:11','2017-02-14 11:36:11'),(10,3,0,0,0,'2017-02-14 10:10:10','2017-02-14 11:37:00','2017-02-14 11:37:00'),(11,3,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:47:05','2017-02-14 11:47:05'),(12,1,100,10,0,'2017-02-14 10:10:10','2017-02-14 11:56:55','2017-02-14 11:56:55'),(13,13,100,10,0,'2017-02-15 11:10:30','2017-02-15 11:53:51','2017-02-15 11:53:51');
/*Table structure for table `group` */
DROP TABLE IF EXISTS `group`;
CREATE TABLE `group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten nhom',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Mo ta',
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Kich hoat',
`is_super_group` tinyint(1) DEFAULT '0' COMMENT 'super group',
`group_type` int(1) DEFAULT '0' COMMENT 'Loại nhóm: 0:Nhóm thông thường, 1:Nhóm đối tác truyền thông, 2:Nhóm Super Admin',
`created_at` datetime DEFAULT NULL COMMENT 'Ngay tao',
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `group` */
insert into `group`(`id`,`name`,`description`,`is_active`,`is_super_group`,`group_type`,`created_at`,`updated_at`) values (1,'Admin','Admin',1,0,0,'2017-02-13 17:40:36','2017-02-13 17:40:39'),(2,'SuperAdmin','SuperAdmin',1,1,0,'2017-02-13 17:41:41','2017-02-13 17:41:43');
/*Table structure for table `group_access_controller` */
DROP TABLE IF EXISTS `group_access_controller`;
CREATE TABLE `group_access_controller` (
`group_id` int(11) NOT NULL,
`access_controller_id` int(11) NOT NULL,
PRIMARY KEY (`group_id`,`access_controller_id`),
KEY `fk_group_has_access_controller_access_controller1_idx` (`access_controller_id`),
KEY `fk_group_has_access_controller_group1_idx` (`group_id`),
CONSTRAINT `fk_group_has_access_controller_access_controller1` FOREIGN KEY (`access_controller_id`) REFERENCES `access_controller` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_group_has_access_controller_group1` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `group_access_controller` */
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`fullname` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Họ và tên',
`avatar` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Đường dẫn ảnh đại diện',
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Tài khoản',
`salt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Salt',
`password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Mật khẩu',
`gender` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Giới tính: Male-Nam, Female-Nữ',
`birthday` date DEFAULT NULL COMMENT 'Ngày sinh 2017-01-10',
`address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Địa chỉ',
`email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Email',
`mobile` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Số điện thoại',
`reward_code` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Mã dự thưởng',
`is_active` tinyint(1) DEFAULT '1' COMMENT 'Trạng thái kích hoạt:\n1-Hoạt động\n0-Tạm dừng\n2-Khóa tài khoản',
`account_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Loại tài khoản: fb-Facebook, gg-Google',
`last_logged` datetime DEFAULT NULL COMMENT 'Lần login gần đây nhất',
`created_at` datetime DEFAULT NULL COMMENT 'Ngày tạo',
`updated_at` datetime DEFAULT NULL COMMENT 'Ngày cập nhật',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `user` */
insert into `user`(`id`,`fullname`,`avatar`,`username`,`salt`,`password`,`gender`,`birthday`,`address`,`email`,`mobile`,`reward_code`,`is_active`,`account_type`,`last_logged`,`created_at`,`updated_at`) values (1,'Đoan PV',NULL,'doanpv',NULL,NULL,'male','2017-02-13',NULL,'doan281@gmail.com','0912113114','123245',1,NULL,NULL,'2017-02-13 21:31:48','2017-02-13 21:31:51'),(2,'Hùng TN',NULL,'hungtn',NULL,NULL,'male','2017-02-13',NULL,'hungtn@gmail.com','0912113115','563498',1,NULL,NULL,'2017-02-13 21:31:48','2017-02-13 21:31:51'),(3,'Hiệu ĐĐ',NULL,'hieudd',NULL,NULL,'male','2017-02-13',NULL,'hieudd@gmail.com','0912113116','335990',1,NULL,NULL,'2017-02-13 21:31:48','2017-02-13 21:31:51'),(9,'Đàm Hiệu','upload/avatar/1270461036368677_avatar_thumb.jpg','1270461036368677','','','male','2017-02-15','','vboys_dhbk@yahoo.com.vn','','1487132697',1,'fb','2017-02-15 11:24:59','2017-02-15 11:24:59','2017-02-15 11:24:59'),(10,'Đàm Hiệu','upload/avatar/102209033446893080158_avatar_thumb.jpg','102209033446893080158','','','male','2017-02-15','','hieudd.bk@gmail.com','','1487132756',1,'gg','2017-02-15 11:25:57','2017-02-15 11:25:57','2017-02-15 11:25:57'),(13,'Phạm Văn Đoan','upload/avatar/1383356375043295_avatar_thumb.jpg','1383356375043295','','','male','2017-02-15','','chuottui281@gmail.com','','1487134050',1,'fb','2017-02-15 11:47:32','2017-02-15 11:47:32','2017-02-15 11:47:32'),(14,'Đoan Phạm Văn','upload/avatar/112233284234278425861_avatar_thumb.jpg','112233284234278425861','','','male','2017-02-15','','doan281@gmail.com','','1487134069',1,'gg','2017-02-15 11:47:51','2017-02-15 11:47:51','2017-02-15 11:47:51');
/*Table structure for table `user_log` */
DROP TABLE IF EXISTS `user_log`;
CREATE TABLE `user_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`action` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'LOGIN, LOGOUT',
`time_login` datetime DEFAULT NULL,
`account_input` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`user_agent` text COLLATE utf8_unicode_ci,
`type` varchar(45) COLLATE utf8_unicode_ci DEFAULT 'BE' COMMENT 'BE, FE',
`result` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'SUCCESS, FAILED',
`time_logout` datetime DEFAULT NULL,
`duration` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `user_log` */
insert into `user_log`(`id`,`action`,`time_login`,`account_input`,`ip_address`,`user_agent`,`type`,`result`,`time_logout`,`duration`) values (8,'LOGIN/LOGOUT','2017-02-13 23:10:56','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-13 23:11:03',7),(9,'LOGIN/LOGOUT','2017-02-14 08:28:55','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS',NULL,NULL),(10,'LOGIN/LOGOUT','2017-02-14 14:41:27','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 18:03:13',12106),(11,'LOGIN/LOGOUT','2017-02-14 18:03:21','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 18:34:11',1850),(12,'LOGIN/LOGOUT','2017-02-14 22:34:28','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 23:32:34',3486),(13,'LOGIN/LOGOUT','2017-02-15 10:53:06','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-15 11:38:29',2723),(14,'LOGIN/LOGOUT','2017-02-15 11:40:02','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-15 11:54:23',861);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.1.73 : Database - gamedb
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`gamedb` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `gamedb`;
/*Table structure for table `access_action` */
DROP TABLE IF EXISTS `access_action`;
CREATE TABLE `access_action` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`controller_id` int(11) NOT NULL,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten action',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=off, 1=on',
`is_default` int(1) DEFAULT '0' COMMENT '0:Không đặt mặc định, 1:Mặc định tạo ra khi thêm user',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_access_action_access_controller1_idx` (`controller_id`),
CONSTRAINT `fk_access_action_access_controller1` FOREIGN KEY (`controller_id`) REFERENCES `access_controller` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `access_action` */
/*Table structure for table `access_controller` */
DROP TABLE IF EXISTS `access_controller`;
CREATE TABLE `access_controller` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten controller',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=off, 1=on',
`is_default` int(1) DEFAULT '0' COMMENT '0:Không tạo mặc định, 1:Tạo mặc định khi thêm mới user',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `access_controller` */
/*Table structure for table `action_log` */
DROP TABLE IF EXISTS `action_log`;
CREATE TABLE `action_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`actor_id` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`actor_name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`action` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ADDED, UPDATED, DELETED, WARNING_DEV, SUPPEND_DEV, SUPPEND_APP, RESET_PASSWORD',
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`record_id` bigint(20) DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `action_log` */
insert into `action_log`(`id`,`actor_id`,`actor_name`,`action`,`description`,`model`,`table`,`record_id`,`ip_address`,`created_at`,`updated_at`) values (1,'38','hungtn','UPDATED','Cập nhật nhóm người dùng','MGroup','group',2,'117.5.207.170','2017-02-17 14:08:03','2017-02-17 14:08:03'),(2,'38','hungtn','UPDATED','Cập nhật nhóm người dùng','MGroup','group',1,'117.5.207.170','2017-02-17 14:08:11','2017-02-17 14:08:11'),(3,'38','hungtn','ADDED','Thêm mới người dùng hệ thống','madmin','admin',39,'117.5.207.170','2017-02-17 14:11:55','2017-02-17 14:11:55'),(4,'38','hungtn','ADDED','Thêm mới nhóm người dùng','mgroup','group',3,'117.5.207.170','2017-02-17 14:12:24','2017-02-17 14:12:24'),(5,'38','hungtn','UPDATED','Cập nhật nhóm người dùng','MGroup','group',3,'117.5.207.170','2017-02-17 14:12:43','2017-02-17 14:12:43'),(6,'38','hungtn','UPDATED','Cập nhật người dùng hệ thống','madmin','admin',39,'117.5.207.170','2017-02-17 14:12:52','2017-02-17 14:12:52'),(7,'39','doan281pv','UPDATED','Cập nhật nhóm người dùng','MGroup','group',1,'117.5.207.170','2017-02-18 18:08:48','2017-02-18 18:08:48'),(8,'39','doan281pv','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'117.5.207.170','2017-02-18 18:16:58','2017-02-18 18:16:58'),(9,'39','doan281pv','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'117.5.207.170','2017-02-18 18:17:50','2017-02-18 18:17:50'),(10,'39','doan281pv','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'117.5.207.170','2017-02-18 18:19:34','2017-02-18 18:19:34'),(11,'39','doan281pv','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'117.5.207.170','2017-02-18 18:20:26','2017-02-18 18:20:26'),(12,'39','doan281pv','ADDED','Thêm mới người dùng hệ thống','madmin','admin',40,'118.70.8.13','2017-02-20 14:41:35','2017-02-20 14:41:35'),(13,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 17:59:42','2017-02-20 17:59:42'),(14,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:00:40','2017-02-20 18:00:40'),(15,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:00:47','2017-02-20 18:00:47'),(16,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:01:24','2017-02-20 18:01:24'),(17,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:05:26','2017-02-20 18:05:26'),(18,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:05:55','2017-02-20 18:05:55'),(19,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:11:57','2017-02-20 18:11:57'),(20,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:13:02','2017-02-20 18:13:02'),(21,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:13:50','2017-02-20 18:13:50'),(22,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:13:56','2017-02-20 18:13:56'),(23,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:17:47','2017-02-20 18:17:47'),(24,'40','loan_k50a2@yahoo.com','UPDATED','Cập nhật Cuộc đua thành công!','Mactionlog','action_log',1,'118.70.8.13','2017-02-20 18:18:34','2017-02-20 18:18:34');
/*Table structure for table `admin` */
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL COMMENT 'Nhóm quyền',
`fullname` varchar(255) DEFAULT NULL COMMENT 'Họ và tên',
`username` varchar(255) DEFAULT NULL COMMENT 'Tên đăng nhập',
`salt` varchar(255) DEFAULT NULL COMMENT 'Chuỗi bảo mật',
`password` varchar(255) DEFAULT NULL COMMENT 'Mật khẩu mã hóa',
`email` varchar(255) DEFAULT NULL COMMENT 'Email',
`is_active` tinyint(1) DEFAULT '0' COMMENT '0: Ngừng hoạt động, 1: Hoạt động',
`is_super` tinyint(1) DEFAULT '0' COMMENT '0: User thường, 1: Super User',
`created_at` datetime DEFAULT NULL COMMENT 'Ngày tạo',
`updated_at` datetime DEFAULT NULL COMMENT 'Ngày cập nhật',
PRIMARY KEY (`id`),
KEY `fk_admin_group1_idx` (`group_id`),
CONSTRAINT `fk_admin_group1` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8;
/*Data for the table `admin` */
insert into `admin`(`id`,`group_id`,`fullname`,`username`,`salt`,`password`,`email`,`is_active`,`is_super`,`created_at`,`updated_at`) values (38,2,'Hùng TN','hungtn',NULL,'c0b1d84fd16d13bf53eb5e8b2c197565b569855240b59ad4b7b812df946534c4',NULL,1,0,'2017-02-13 17:43:09','2017-02-13 17:43:09'),(39,1,'ĐoanPV','doan281pv',NULL,'c0b1d84fd16d13bf53eb5e8b2c197565b569855240b59ad4b7b812df946534c4','doan281@gmail.com',1,1,'2017-02-17 14:11:55','2017-02-17 14:12:52'),(40,1,'Loan BT','loan_k50a2@yahoo.com',NULL,'25e180e434110c0dbf2a0d7bfbd7b7940f6bbcea0883e7b24e0c3564238bcd0b','loan_k50a2@yahoo.com',1,0,'2017-02-20 14:41:35','2017-02-20 14:41:35');
/*Table structure for table `admin_access_action` */
DROP TABLE IF EXISTS `admin_access_action`;
CREATE TABLE `admin_access_action` (
`admin_id` int(11) NOT NULL,
`access_action_id` int(11) NOT NULL,
PRIMARY KEY (`admin_id`,`access_action_id`),
KEY `fk_admin_has_access_action_admin1_idx` (`admin_id`),
KEY `fk_admin_has_access_action_access_action1_idx` (`access_action_id`),
CONSTRAINT `fk_admin_has_access_action_access_action1` FOREIGN KEY (`access_action_id`) REFERENCES `access_action` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_admin_has_access_action_admin1` FOREIGN KEY (`admin_id`) REFERENCES `admin` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `admin_access_action` */
/*Table structure for table `contest` */
DROP TABLE IF EXISTS `contest`;
CREATE TABLE `contest` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date_limit` int(11) NOT NULL COMMENT 'Số ngày diễn ra cuộc thi',
`date_from` date NOT NULL COMMENT 'Ngày bắt đầu diễn ra cuộc thi',
`priority` int(11) DEFAULT '1' COMMENT 'Độ ưu tiên: 1 cao nhất',
`is_active` tinyint(1) DEFAULT '1',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*Data for the table `contest` */
insert into `contest`(`id`,`date_limit`,`date_from`,`priority`,`is_active`,`created_at`,`updated_at`) values (1,28,'2017-02-20',1,1,'2017-02-18 11:20:13','2017-02-20 18:18:34');
/*Table structure for table `contest_details` */
DROP TABLE IF EXISTS `contest_details`;
CREATE TABLE `contest_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`contest_id` int(11) NOT NULL COMMENT 'Mã cuộc thi',
`date_order` int(11) NOT NULL COMMENT 'Số thứ tự ngày',
`name` varchar(45) NOT NULL COMMENT 'Tên: Ngày 1, Ngày 2',
`date_play` date NOT NULL COMMENT 'Ngày thi: 2017-02-18...',
`priority` int(11) DEFAULT '1',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_contest_details_contest1_idx` (`contest_id`),
CONSTRAINT `fk_contest_details_contest1` FOREIGN KEY (`contest_id`) REFERENCES `contest` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=latin1;
/*Data for the table `contest_details` */
insert into `contest_details`(`id`,`contest_id`,`date_order`,`name`,`date_play`,`priority`,`created_at`,`updated_at`) values (1,1,1,'Ngày 1','2017-02-20',1,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(2,1,2,'Ngày 2','2017-02-21',2,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(3,1,3,'Ngày 3','2017-02-22',3,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(4,1,4,'Ngày 4','2017-02-23',4,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(5,1,5,'Ngày 5','2017-02-24',5,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(6,1,6,'Ngày 6','2017-02-25',6,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(7,1,7,'Ngày 7','2017-02-26',7,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(8,1,8,'Ngày 8','2017-02-27',8,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(9,1,9,'Ngày 9','2017-02-28',9,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(10,1,10,'Ngày 10','2017-03-01',10,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(11,1,11,'Ngày 11','2017-03-02',11,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(12,1,12,'Ngày 12','2017-03-03',12,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(13,1,13,'Ngày 13','2017-03-04',13,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(14,1,14,'Ngày 14','2017-03-05',14,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(15,1,15,'Ngày 15','2017-03-06',15,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(16,1,16,'Ngày 16','2017-03-07',16,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(17,1,17,'Ngày 17','2017-03-08',17,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(18,1,18,'Ngày 18','2017-03-09',18,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(19,1,19,'Ngày 19','2017-03-10',19,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(20,1,20,'Ngày 20','2017-03-11',20,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(21,1,21,'Ngày 21','2017-03-12',21,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(22,1,22,'Ngày 22','2017-03-13',22,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(23,1,23,'Ngày 23','2017-03-14',23,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(24,1,24,'Ngày 24','2017-03-15',24,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(25,1,25,'Ngày 25','2017-03-16',25,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(26,1,26,'Ngày 26','2017-03-17',26,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(27,1,27,'Ngày 27','2017-03-18',27,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(28,1,28,'Ngày 28','2017-03-19',28,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(29,1,29,'Ngày 29','2017-03-20',29,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(30,1,30,'Ngày 30','2017-03-21',30,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(31,1,31,'Ngày 31','2017-03-22',31,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(32,1,32,'Ngày 32','2017-02-23',32,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(33,1,33,'Ngày 33','2017-02-23',33,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(34,1,34,'Ngày 34','2017-02-23',34,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(35,1,35,'Ngày 35','2017-02-23',35,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(36,1,36,'Ngày 36','2017-02-23',36,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(37,1,37,'Ngày 37','2017-02-23',37,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(38,1,38,'Ngày 38','2017-02-23',38,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(39,1,39,'Ngày 39','2017-02-23',39,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(40,1,40,'Ngày 40','2017-02-23',40,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(41,1,41,'Ngày 41','2017-02-23',41,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(42,1,42,'Ngày 42','2017-02-23',42,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(43,1,43,'Ngày 43','2017-02-23',43,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(44,1,44,'Ngày 44','2017-02-23',44,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(45,1,45,'Ngày 45','2017-02-23',45,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(46,1,46,'Ngày 46','2017-02-23',46,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(47,1,47,'Ngày 47','2017-02-23',47,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(48,1,48,'Ngày 48','2017-02-23',48,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(49,1,49,'Ngày 49','2017-02-23',49,'2017-02-18 11:20:59','2017-02-18 11:21:03'),(50,1,50,'Ngày 50','2017-02-23',50,'2017-02-18 11:20:59','2017-02-18 11:21:03');
/*Table structure for table `game` */
DROP TABLE IF EXISTS `game`;
CREATE TABLE `game` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`total_time` bigint(20) DEFAULT '0' COMMENT 'Tổng thời gian hoàn thành',
`total_point` bigint(20) DEFAULT '0' COMMENT 'Tổng số điểm chơi',
`total_game` bigint(20) DEFAULT '0' COMMENT 'Tổng số lần chơi',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_game_user_idx` (`user_id`),
CONSTRAINT `fk_game_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `game` */
insert into `game`(`id`,`user_id`,`total_time`,`total_point`,`total_game`,`created_at`,`updated_at`) values (1,1,460,40,4,'2017-02-14 11:23:24','2017-02-14 11:56:57'),(2,2,300,40,3,'2017-02-14 11:24:50','2017-02-14 11:28:16'),(3,3,200,20,5,'2017-02-14 11:28:57','2017-02-14 11:47:05'),(4,13,697,449513,14,'2017-02-15 11:53:51','2017-02-21 22:42:04'),(5,23,24,14640,5,'2017-02-20 14:33:42','2017-02-21 16:13:10'),(6,25,10,3830,2,'2017-02-20 14:53:59','2017-02-20 15:09:55'),(7,26,36,25546,2,'2017-02-20 14:55:24','2017-02-20 14:56:34'),(8,28,44,30073,1,'2017-02-20 14:59:15','2017-02-20 14:59:15'),(9,29,319,208035,14,'2017-02-20 15:02:11','2017-02-20 16:34:06'),(10,30,35,25526,4,'2017-02-20 15:06:54','2017-02-20 15:08:43'),(11,24,225,155135,5,'2017-02-20 15:27:34','2017-02-21 16:16:50'),(12,19,305,220209,7,'2017-02-20 15:33:41','2017-02-22 09:08:32'),(13,31,360,284309,6,'2017-02-20 15:40:59','2017-02-21 15:47:40'),(14,35,120,86164,2,'2017-02-21 09:06:33','2017-02-21 15:40:58'),(15,37,180,142030,3,'2017-02-21 09:11:00','2017-02-21 16:10:22'),(16,40,60,41589,1,'2017-02-21 11:29:26','2017-02-21 11:29:26'),(17,18,240,181864,4,'2017-02-21 14:36:46','2017-02-22 10:11:21'),(18,9,240,187899,4,'2017-02-21 17:44:39','2017-02-21 17:50:48'),(19,42,120,92903,2,'2017-02-21 17:57:13','2017-02-21 19:27:40'),(20,44,60,53006,1,'2017-02-22 08:50:22','2017-02-22 08:50:22'),(21,45,180,161577,3,'2017-02-22 08:54:31','2017-02-22 09:26:37'),(22,46,720,620598,12,'2017-02-22 08:57:17','2017-02-22 09:38:02'),(23,21,60,30923,1,'2017-02-22 09:11:24','2017-02-22 09:11:24'),(24,49,60,45666,1,'2017-02-22 09:11:50','2017-02-22 09:11:50');
/*Table structure for table `game_details` */
DROP TABLE IF EXISTS `game_details`;
CREATE TABLE `game_details` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL COMMENT 'Mã User',
`time` bigint(20) DEFAULT '0' COMMENT 'Thời gian hoàn thành',
`point` bigint(20) DEFAULT '0' COMMENT 'Số điểm',
`time_play` bigint(20) DEFAULT '0' COMMENT 'Thời gian chơi',
`time_play_2` datetime DEFAULT NULL COMMENT 'Thời gian bắt đầu chơi',
`image_result` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Đường dẫn ảnh lưu kết quả',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_game_user_idx` (`user_id`),
CONSTRAINT `fk_game_user0` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `game_details` */
insert into `game_details`(`id`,`user_id`,`time`,`point`,`time_play`,`time_play_2`,`image_result`,`created_at`,`updated_at`) values (1,1,120,10,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:02:17','2017-02-14 11:02:17'),(2,1,120,10,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:23:24','2017-02-14 11:23:24'),(3,1,120,10,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:23:48','2017-02-14 11:23:48'),(4,2,100,10,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:24:50','2017-02-14 11:24:50'),(5,2,100,10,0,'1970-01-01 07:00:00',NULL,'2017-02-14 11:27:57','2017-02-14 11:27:57'),(6,2,100,10,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:28:16','2017-02-14 11:28:16'),(7,3,100,10,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:28:57','2017-02-14 11:28:57'),(8,3,0,0,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:30:31','2017-02-14 11:30:31'),(9,3,0,0,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:36:11','2017-02-14 11:36:11'),(10,3,0,0,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:37:00','2017-02-14 11:37:00'),(11,3,100,10,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:47:05','2017-02-14 11:47:05'),(12,1,100,10,0,'2017-02-14 10:10:10',NULL,'2017-02-14 11:56:55','2017-02-14 11:56:55'),(13,13,100,10,0,'2017-02-15 11:10:30',NULL,'2017-02-15 11:53:51','2017-02-15 11:53:51'),(14,13,100,10,0,'2017-02-20 11:10:30',NULL,'2017-02-20 11:53:51','2017-02-15 11:53:51'),(15,23,3,1830,0,'2010-12-30 04:27:58',NULL,'2017-02-20 14:33:42','2017-02-20 14:33:42'),(16,23,3,1830,0,'2010-12-30 04:27:58','upload/result/result_23_1487586800.jpg','2017-02-20 14:35:44','2017-02-20 17:33:20'),(17,13,42,30520,0,'2010-12-30 04:27:58',NULL,'2017-02-20 14:47:21','2017-02-20 14:47:21'),(18,13,60,43233,0,'2010-12-30 04:27:58',NULL,'2017-02-20 14:50:05','2017-02-20 14:50:05'),(19,25,9,3300,0,'2010-12-30 04:27:58',NULL,'2017-02-20 14:53:59','2017-02-20 14:53:59'),(20,26,17,12305,0,'2010-12-30 04:27:58',NULL,'2017-02-20 14:55:24','2017-02-20 14:55:24'),(21,26,19,13241,0,'2010-12-30 04:27:58',NULL,'2017-02-20 14:56:34','2017-02-20 14:56:34'),(22,28,44,30073,0,'2010-12-30 04:27:58',NULL,'2017-02-20 14:59:15','2017-02-20 14:59:15'),(23,29,3,1830,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:02:11','2017-02-20 15:02:11'),(24,29,8,5590,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:02:44','2017-02-20 15:02:44'),(25,29,15,9571,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:03:18','2017-02-20 15:03:18'),(26,29,7,4830,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:05:12','2017-02-20 15:05:12'),(27,29,5,3749,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:05:41','2017-02-20 15:05:41'),(28,29,7,4915,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:06:08','2017-02-20 15:06:08'),(29,29,14,9708,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:06:41','2017-02-20 15:06:41'),(30,30,3,1821,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:06:54','2017-02-20 15:06:54'),(31,30,3,1821,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:07:26','2017-02-20 15:07:26'),(32,30,4,2866,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:07:59','2017-02-20 15:07:59'),(33,29,60,41566,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:08:00','2017-02-20 15:08:00'),(34,30,25,19018,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:08:43','2017-02-20 15:08:43'),(35,29,60,39732,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:09:21','2017-02-20 15:09:21'),(36,25,1,530,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:09:55','2017-02-20 15:09:55'),(37,13,9,7026,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:13:16','2017-02-20 15:13:16'),(38,24,7,4943,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:27:34','2017-02-20 15:27:34'),(39,24,38,25153,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:30:37','2017-02-20 15:30:37'),(40,19,3,1740,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:33:41','2017-02-20 15:33:41'),(41,19,2,1770,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:34:06','2017-02-20 15:34:06'),(42,13,3,1850,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:35:20','2017-02-20 15:35:20'),(43,19,60,42611,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:35:53','2017-02-20 15:35:53'),(44,31,60,45505,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:40:59','2017-02-20 15:40:59'),(45,19,60,43394,0,'2010-12-30 04:27:58',NULL,'2017-02-20 15:44:15','2017-02-20 15:44:15'),(46,13,3,1840,0,'2017-02-20 15:52:33','upload/result/result_13_1487584705.jpg','2017-02-20 15:54:07','2017-02-20 16:58:25'),(47,29,4,2550,0,'2017-02-20 16:28:19',NULL,'2017-02-20 16:29:59','2017-02-20 16:29:59'),(48,29,26,16479,0,'2017-02-20 16:28:47',NULL,'2017-02-20 16:30:49','2017-02-20 16:30:49'),(49,29,26,15991,0,'2017-02-20 16:29:34',NULL,'2017-02-20 16:31:36','2017-02-20 16:31:36'),(50,29,36,22294,0,'2017-02-20 16:30:20',NULL,'2017-02-20 16:32:32','2017-02-20 16:32:32'),(51,29,48,29230,0,'2017-02-20 16:31:41',NULL,'2017-02-20 16:34:06','2017-02-20 16:34:06'),(52,24,60,43337,0,'2017-02-20 16:52:02',NULL,'2017-02-20 16:54:41','2017-02-20 16:54:41'),(53,13,60,44178,0,'2017-02-20 21:47:33',NULL,'2017-02-20 21:50:05','2017-02-20 21:50:05'),(54,31,60,45107,0,'2017-02-21 08:36:14',NULL,'2017-02-21 08:38:46','2017-02-21 08:38:46'),(55,31,60,49811,0,'2017-02-21 08:37:33',NULL,'2017-02-21 08:40:02','2017-02-21 08:40:02'),(56,35,60,43398,0,'2017-02-21 09:07:33',NULL,'2017-02-21 09:06:33','2017-02-21 09:06:33'),(57,37,60,44211,0,'2017-02-21 09:11:59',NULL,'2017-02-21 09:11:00','2017-02-21 09:11:00'),(58,31,60,47048,0,'2017-02-21 11:00:48',NULL,'2017-02-21 11:03:21','2017-02-21 11:03:21'),(59,40,60,41589,0,'2017-02-21 11:26:52',NULL,'2017-02-21 11:29:26','2017-02-21 11:29:26'),(60,19,60,42968,0,'2017-02-21 13:42:11',NULL,'2017-02-21 13:44:40','2017-02-21 13:44:40'),(61,18,60,48495,0,'2017-02-21 14:34:16',NULL,'2017-02-21 14:36:46','2017-02-21 14:36:46'),(62,37,60,46639,0,'2017-02-21 15:38:20',NULL,'2017-02-21 15:37:21','2017-02-21 15:37:21'),(63,35,60,42766,0,'2017-02-21 15:41:57',NULL,'2017-02-21 15:40:58','2017-02-21 15:40:58'),(64,31,60,50764,0,'2017-02-21 15:42:57',NULL,'2017-02-21 15:45:31','2017-02-21 15:45:31'),(65,31,60,46074,0,'2017-02-21 15:45:06',NULL,'2017-02-21 15:47:40','2017-02-21 15:47:40'),(66,24,60,40608,0,'2017-02-21 16:04:22',NULL,'2017-02-21 16:07:08','2017-02-21 16:07:08'),(67,18,60,42652,0,'2017-02-21 16:05:00',NULL,'2017-02-21 16:07:30','2017-02-21 16:07:30'),(68,37,60,51180,0,'2017-02-21 16:11:21',NULL,'2017-02-21 16:10:22','2017-02-21 16:10:22'),(69,23,6,3660,0,'2017-02-21 16:09:32',NULL,'2017-02-21 16:11:40','2017-02-21 16:11:40'),(70,23,6,3660,0,'2017-02-21 16:09:32',NULL,'2017-02-21 16:12:45','2017-02-21 16:12:45'),(71,23,6,3660,0,'2017-02-21 16:09:32','upload/result/result_23_1487668393.jpg','2017-02-21 16:13:10','2017-02-21 16:13:13'),(72,24,60,41094,0,'2017-02-21 16:14:09',NULL,'2017-02-21 16:16:50','2017-02-21 16:16:50'),(73,18,60,45873,0,'2017-02-21 16:36:59','upload/result/result_18_1487669971.jpg','2017-02-21 16:39:28','2017-02-21 16:39:31'),(74,19,60,42410,0,'2017-02-21 16:56:27','upload/result/result_19_1487671138.jpg','2017-02-21 16:58:56','2017-02-21 16:58:58'),(75,9,60,43231,0,'2017-02-21 17:42:04','upload/result/result_9_1487673881.jpg','2017-02-21 17:44:39','2017-02-21 17:44:41'),(76,9,60,45431,0,'2017-02-21 17:44:01','upload/result/result_9_1487673997.jpg','2017-02-21 17:46:35','2017-02-21 17:46:37'),(77,9,60,52506,0,'2017-02-21 17:46:35','upload/result/result_9_1487674152.jpg','2017-02-21 17:49:09','2017-02-21 17:49:12'),(78,9,60,46731,0,'2017-02-21 17:48:13','upload/result/result_9_1487674250.jpg','2017-02-21 17:50:48','2017-02-21 17:50:50'),(79,42,60,47304,0,'2017-02-21 17:54:30','upload/result/result_42_1487674635.jpg','2017-02-21 17:57:13','2017-02-21 17:57:15'),(80,42,60,45599,0,'2017-02-21 19:25:06','upload/result/result_42_1487680066.jpg','2017-02-21 19:27:40','2017-02-21 19:27:46'),(81,13,60,46942,0,'2017-02-21 22:24:00','upload/result/result_13_1487690795.jpg','2017-02-21 22:26:31','2017-02-21 22:26:36'),(82,13,60,47061,0,'2017-02-21 22:29:13','upload/result/result_13_1487691108.jpg','2017-02-21 22:31:44','2017-02-21 22:31:48'),(83,13,60,46186,0,'2017-02-21 22:31:35','upload/result/result_13_1487691251.jpg','2017-02-21 22:34:07','2017-02-21 22:34:11'),(84,13,60,44152,0,'2017-02-21 22:33:54','upload/result/result_13_1487691389.jpg','2017-02-21 22:36:26','2017-02-21 22:36:29'),(85,13,60,45447,0,'2017-02-21 22:35:31','upload/result/result_13_1487691487.jpg','2017-02-21 22:38:03','2017-02-21 22:38:07'),(86,13,60,45281,0,'2017-02-21 22:37:57','upload/result/result_13_1487691633.jpg','2017-02-21 22:40:29','2017-02-21 22:40:33'),(87,13,60,45787,0,'2017-02-21 22:39:33','upload/result/result_13_1487691728.jpg','2017-02-21 22:42:04','2017-02-21 22:42:08'),(88,44,60,53006,0,'2017-02-22 08:51:21','upload/result/result_44_1487728224.jpg','2017-02-22 08:50:22','2017-02-22 08:50:24'),(89,45,60,48721,0,'2017-02-22 08:51:56','upload/result/result_45_1487728475.jpg','2017-02-22 08:54:31','2017-02-22 08:54:35'),(90,46,60,52491,0,'2017-02-22 08:54:39','upload/result/result_46_1487728640.jpg','2017-02-22 08:57:17','2017-02-22 08:57:20'),(91,46,60,45738,0,'2017-02-22 08:58:11','upload/result/result_46_1487728852.jpg','2017-02-22 09:00:49','2017-02-22 09:00:52'),(92,46,60,47111,0,'2017-02-22 08:59:45','upload/result/result_46_1487728946.jpg','2017-02-22 09:02:23','2017-02-22 09:02:26'),(93,46,60,56389,0,'2017-02-22 09:04:22','upload/result/result_46_1487729223.jpg','2017-02-22 09:07:00','2017-02-22 09:07:03'),(94,19,60,45316,0,'2017-02-22 09:06:03','upload/result/result_19_1487729315.jpg','2017-02-22 09:08:32','2017-02-22 09:08:35'),(95,21,60,30923,0,'2017-02-22 09:12:15','upload/result/result_21_1487729487.jpg','2017-02-22 09:11:24','2017-02-22 09:11:27'),(96,49,60,45666,0,'2017-02-22 09:09:15','upload/result/result_49_1487729512.jpg','2017-02-22 09:11:50','2017-02-22 09:11:52'),(97,46,60,52961,0,'2017-02-22 09:10:17','upload/result/result_46_1487729578.jpg','2017-02-22 09:12:56','2017-02-22 09:12:58'),(98,46,60,52301,0,'2017-02-22 09:13:44','upload/result/result_46_1487729785.jpg','2017-02-22 09:16:22','2017-02-22 09:16:25'),(99,45,60,53351,0,'2017-02-22 09:14:17',NULL,'2017-02-22 09:16:52','2017-02-22 09:16:52'),(100,46,60,50308,0,'2017-02-22 09:16:42','upload/result/result_46_1487729963.jpg','2017-02-22 09:19:20','2017-02-22 09:19:23'),(101,46,60,47188,0,'2017-02-22 09:18:52','upload/result/result_46_1487730093.jpg','2017-02-22 09:21:31','2017-02-22 09:21:33'),(102,46,60,50631,0,'2017-02-22 09:22:41','upload/result/result_46_1487730322.jpg','2017-02-22 09:25:19','2017-02-22 09:25:22'),(103,45,60,59505,0,'2017-02-22 09:24:02','upload/result/result_45_1487730400.jpg','2017-02-22 09:26:37','2017-02-22 09:26:40'),(104,46,60,55156,0,'2017-02-22 09:24:03','upload/result/result_46_1487730404.jpg','2017-02-22 09:26:42','2017-02-22 09:26:44'),(105,46,60,61088,0,'2017-02-22 09:33:10','upload/result/result_46_1487730953.jpg','2017-02-22 09:35:49','2017-02-22 09:35:53'),(106,46,60,49236,0,'2017-02-22 09:35:23','upload/result/result_46_1487731084.jpg','2017-02-22 09:38:02','2017-02-22 09:38:04'),(107,18,60,44844,0,'2017-02-22 10:08:47','upload/result/result_18_1487733084.jpg','2017-02-22 10:11:21','2017-02-22 10:11:25');
/*Table structure for table `group` */
DROP TABLE IF EXISTS `group`;
CREATE TABLE `group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Ten nhom',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Mo ta',
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Kich hoat',
`is_super_group` tinyint(1) DEFAULT '0' COMMENT 'super group',
`group_type` int(1) DEFAULT '0' COMMENT 'Loại nhóm: 0:Nhóm thông thường, 1:Nhóm đối tác truyền thông, 2:Nhóm Super Admin',
`created_at` datetime DEFAULT NULL COMMENT 'Ngay tao',
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `group` */
insert into `group`(`id`,`name`,`description`,`is_active`,`is_super_group`,`group_type`,`created_at`,`updated_at`) values (1,'Admin','Admin',1,0,0,'2017-02-13 17:40:36','2017-02-18 18:08:48'),(2,'SuperAdmin','SuperAdmin',1,0,0,'2017-02-13 17:41:41','2017-02-17 14:08:03'),(3,'Client','Client',1,0,0,'2017-02-17 14:12:24','2017-02-17 14:12:43');
/*Table structure for table `group_access_controller` */
DROP TABLE IF EXISTS `group_access_controller`;
CREATE TABLE `group_access_controller` (
`group_id` int(11) NOT NULL,
`access_controller_id` int(11) NOT NULL,
PRIMARY KEY (`group_id`,`access_controller_id`),
KEY `fk_group_has_access_controller_access_controller1_idx` (`access_controller_id`),
KEY `fk_group_has_access_controller_group1_idx` (`group_id`),
CONSTRAINT `fk_group_has_access_controller_access_controller1` FOREIGN KEY (`access_controller_id`) REFERENCES `access_controller` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_group_has_access_controller_group1` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `group_access_controller` */
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`fullname` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Họ và tên',
`avatar` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Đường dẫn ảnh đại diện',
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Tài khoản',
`salt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Salt',
`password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Mật khẩu',
`gender` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Giới tính: Male-Nam, Female-Nữ',
`birthday` date DEFAULT NULL COMMENT 'Ngày sinh 2017-01-10',
`address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Địa chỉ',
`email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Email',
`mobile` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Số điện thoại',
`reward_code` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Mã dự thưởng',
`is_active` tinyint(1) DEFAULT '1' COMMENT 'Trạng thái kích hoạt:\n1-Hoạt động\n0-Tạm dừng\n2-Khóa tài khoản',
`account_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Loại tài khoản: fb-Facebook, gg-Google',
`last_logged` datetime DEFAULT NULL COMMENT 'Lần login gần đây nhất',
`created_at` datetime DEFAULT NULL COMMENT 'Ngày tạo',
`updated_at` datetime DEFAULT NULL COMMENT 'Ngày cập nhật',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `user` */
insert into `user`(`id`,`fullname`,`avatar`,`username`,`salt`,`password`,`gender`,`birthday`,`address`,`email`,`mobile`,`reward_code`,`is_active`,`account_type`,`last_logged`,`created_at`,`updated_at`) values (1,'Đoan PV',NULL,'doanpv',NULL,NULL,'male','2017-02-13',NULL,'doan281@gmail.com','0912113114','123245',1,NULL,NULL,'2017-02-13 21:31:48','2017-02-13 21:31:51'),(2,'Hùng TN',NULL,'hungtn',NULL,NULL,'male','2017-02-13',NULL,'hungtn@gmail.com','0912113115','563498',1,NULL,NULL,'2017-02-13 21:31:48','2017-02-13 21:31:51'),(3,'Hiệu ĐĐ',NULL,'hieudd',NULL,NULL,'male','2017-02-13',NULL,'hieudd@gmail.com','0912113116','335990',1,NULL,NULL,'2017-02-13 21:31:48','2017-02-13 21:31:51'),(9,'Đàm Hiệu','upload/avatar/1270461036368677_avatar_thumb.jpg','1270461036368677','','','male','2017-02-15','','vboys_dhbk@yahoo.com.vn','','1487132697',1,'fb','2017-02-22 09:28:00','2017-02-15 11:24:59','2017-02-15 11:24:59'),(10,'Đàm Hiệu','upload/avatar/102209033446893080158_avatar_thumb.jpg','102209033446893080158','','','male','2017-02-15','','hieudd.bk@gmail.com','','1487132756',1,'gg','2017-02-15 11:25:57','2017-02-15 11:25:57','2017-02-15 11:25:57'),(13,'Phạm Văn Đoan','upload/avatar/1383356375043295_avatar_thumb.jpg','1383356375043295','','','male','2017-02-15','','chuottui281@gmail.com','0912345678','1487134050',1,'fb','2017-02-22 10:16:34','2017-02-15 11:47:32','2017-02-17 13:02:23'),(14,'Đoan Phạm Văn','upload/avatar/112233284234278425861_avatar_thumb.jpg','112233284234278425861','','','male','2017-02-15','','doan281@gmail.com','','1487134069',1,'gg','2017-02-22 10:18:19','2017-02-15 11:47:51','2017-02-15 11:47:51'),(15,'Nguyễn Lan Anh','upload/avatar/1875339092743092_avatar_thumb.jpg','1875339092743092','','','female','2017-02-17','','','0977209682','1487316654',1,'fb','2017-02-17 14:30:56','2017-02-17 14:30:56','2017-02-17 14:31:12'),(16,'Hàn Minh Dũng','upload/avatar/101844013422849215361_avatar_thumb.jpg','101844013422849215361','','','','2017-02-17','','hanminhdung5590@gmail.com','','1487316703',1,'gg','2017-02-17 14:31:45','2017-02-17 14:31:45','2017-02-17 14:31:45'),(17,'Phap Mr','upload/avatar/104156393972960985115_avatar_thumb.jpg','104156393972960985115','','','male','2017-02-17','','kimaruta@gmail.com','0918888888','1487318568',1,'gg','2017-02-17 15:02:50','2017-02-17 15:02:50','2017-02-17 15:03:32'),(18,'To Nhan Hung','upload/avatar/1443852728960395_avatar_thumb.jpg','1443852728960395','','','male','2017-02-20','','tonhanhung@gmail.com','0977376288','1487566370',1,'fb','2017-02-22 10:04:42','2017-02-20 11:52:52','2017-02-20 11:53:05'),(19,'Nguyen Van Thi','upload/avatar/10155116285227764_avatar_thumb.jpg','10155116285227764','','','male','2017-02-20','','nguyenthivn@gmail.com','0936778585','1487566519',1,'fb','2017-02-22 09:06:51','2017-02-20 11:55:21','2017-02-20 11:55:32'),(20,'Luv Kim','upload/avatar/107335991874810287776_avatar_thumb.jpg','107335991874810287776','','','','2017-02-20','','lylynim9392@gmail.com','0943226836','1487566751',1,'gg','2017-02-20 12:01:40','2017-02-20 11:59:14','2017-02-20 11:59:28'),(21,'Quỳnh Nguyễn','upload/avatar/1372082822814178_avatar_thumb.jpg','1372082822814178','','','female','2017-02-20','','marukodangyeu_vp@yahoo.com','0964601057','1487567319',1,'fb','2017-02-22 09:02:45','2017-02-20 12:08:40','2017-02-20 12:08:50'),(22,'Hữu Tú','upload/avatar/1426866474004287_avatar_thumb.jpg','1426866474004287','','','male','2017-02-20','','tullap88@gmail.com','0941941698','1487567542',1,'fb','2017-02-22 09:59:45','2017-02-20 12:12:24','2017-02-20 12:12:32'),(23,'Mèo Đi Hoang','upload/avatar/1449143358491248_avatar_thumb.jpg','1449143358491248','','','','2017-02-20','','silver.programmer@yahoo.com.vn','0934547060','1487572835',1,'fb','2017-02-21 16:10:37','2017-02-20 13:40:37','2017-02-20 13:40:46'),(24,'Bui Loan','upload/avatar/1514073725272047_avatar_thumb.jpg','1514073725272047','','','female','2017-02-20','','loan_k50a2@yahoo.com','0923131233','1487573698',1,'fb','2017-02-21 16:12:35','2017-02-20 13:55:00','2017-02-20 13:55:14'),(25,'Phạm Tiến','upload/avatar/110471386709229288170_avatar_thumb.jpg','110471386709229288170','','','male','2017-02-20','','hotabit@gmail.com','0985325152','1487577183',1,'gg','2017-02-20 14:53:05','2017-02-20 14:53:05','2017-02-20 14:53:17'),(26,'Thùy Linh','upload/avatar/988370551264279_avatar_thumb.jpg','988370551264279','','','female','2017-02-20','','thuylinh_711@yahoo.com','01669764611','1487577251',1,'fb','2017-02-20 14:54:13','2017-02-20 14:54:13','2017-02-20 14:54:20'),(27,'Nguyễn Lệ Hằng','upload/avatar/10208247299961974_avatar_thumb.jpg','10208247299961974','','','female','2017-02-20','','nguyenhang_cncn@yahoo.com','0942666583','1487577328',1,'fb','2017-02-22 10:17:51','2017-02-20 14:55:30','2017-02-20 14:56:02'),(28,'Tiến Vũ Đình','upload/avatar/105229634324103080137_avatar_thumb.jpg','105229634324103080137','','','male','2017-02-20','','omaidie@gmail.com','','1487577488',1,'gg','2017-02-20 14:58:09','2017-02-20 14:58:09','2017-02-20 14:58:09'),(29,'Hiếu Vũ','upload/avatar/768060550014282_avatar_thumb.jpg','768060550014282','','','male','2017-02-20','','hieuvuvitv@gmail.com','0977803297','1487577686',1,'fb','2017-02-20 15:01:28','2017-02-20 15:01:28','2017-02-20 15:01:41'),(30,'vân anh nguyễn','upload/avatar/110427879278004383335_avatar_thumb.jpg','110427879278004383335','','','female','2017-02-20','','nguyen.vanh.88@gmail.com','0975852090','1487577968',1,'gg','2017-02-20 15:06:10','2017-02-20 15:06:10','2017-02-20 15:06:18'),(31,'Trần Thanh Tùng','upload/avatar/1266811680052691_avatar_thumb.jpg','1266811680052691','','','male','2017-02-20','','rysergt@gmail.com','','1487579983',1,'fb','2017-02-22 10:17:59','2017-02-20 15:39:45','2017-02-20 15:39:45'),(32,'Cường Đl','upload/avatar/1775961269393169_avatar_thumb.jpg','1775961269393169','','','male','2017-02-20','','mongmanh.ptit@gmail.com','','1487605751',1,'fb','2017-02-20 22:49:14','2017-02-20 22:49:14','2017-02-20 22:49:14'),(33,'Thu Thủy','upload/avatar/1609860955705635_avatar_thumb.jpg','1609860955705635','','','female','2017-02-21','','nguyenthuy2d@yahoo.com.vn','','1487642056',1,'fb','2017-02-21 08:54:18','2017-02-21 08:54:18','2017-02-21 08:54:18'),(34,'Hà Nguyễn','upload/avatar/1118857874891140_avatar_thumb.jpg','1118857874891140','','','female','2017-02-21','','thanhha38.nguyen@gmail.com','','1487642264',1,'fb','2017-02-22 08:46:03','2017-02-21 08:57:46','2017-02-21 08:57:46'),(35,'Hien Dao','upload/avatar/111086725991806440217_avatar_thumb.jpg','111086725991806440217','','','','2017-02-21','','daohien92@gmail.com','','1487642691',1,'gg','2017-02-21 15:36:53','2017-02-21 09:04:54','2017-02-21 09:04:54'),(36,'Thế Anh Ngô','upload/avatar/658838817635126_avatar_thumb.jpg','658838817635126','','','male','2017-02-21','','theanh0409@gmail.com','','1487642783',1,'fb','2017-02-21 09:06:25','2017-02-21 09:06:25','2017-02-21 09:06:25'),(37,'The Anh Ngo','upload/avatar/101091361875430789901_avatar_thumb.jpg','101091361875430789901','','','male','2017-02-21','','theanh0409@gmail.com','','1487642977',1,'gg','2017-02-21 16:07:58','2017-02-21 09:09:41','2017-02-21 09:09:41'),(38,'Minh Hào Vũ','upload/avatar/105738654416211755212_avatar_thumb.jpg','105738654416211755212','','','','2017-02-21','','vuminhhao.2107@gmail.com','','1487643082',1,'gg','2017-02-21 09:11:24','2017-02-21 09:11:24','2017-02-21 09:11:24'),(39,'Ha Mien','upload/avatar/1397180170346953_avatar_thumb.jpg','1397180170346953','','','female','2017-02-21','','miendns@gmail.com','','1487649643',1,'fb','2017-02-22 09:24:16','2017-02-21 11:00:46','2017-02-21 11:00:46'),(40,'Dương Công Đồng','upload/avatar/10154561428124480_avatar_thumb.jpg','10154561428124480','','','male','2017-02-21','','dongdc_123@yahoo.com','','1487651115',1,'fb','2017-02-22 10:04:40','2017-02-21 11:25:17','2017-02-21 11:25:17'),(41,'Trang Thu','upload/avatar/108912924102518003912_avatar_thumb.jpg','108912924102518003912','','','female','2017-02-21','','seichan.trang@gmail.com','','1487663825',1,'gg','2017-02-21 14:57:07','2017-02-21 14:57:07','2017-02-21 14:57:07'),(42,'Thành','upload/avatar/10211213135791755_avatar_thumb.jpg','10211213135791755','','','male','2017-02-21','','thanh_bk9530@yahoo.com','','1487666968',1,'fb','2017-02-21 15:49:29','2017-02-21 15:49:29','2017-02-21 15:49:29'),(43,'Dũng Lê','upload/avatar/10206409872524728_avatar_thumb.jpg','10206409872524728','','','male','2017-02-21','','','','1487671938',1,'fb','2017-02-21 17:12:20','2017-02-21 17:12:20','2017-02-21 17:12:20'),(44,'Mari Ô','upload/avatar/114736168914347646408_avatar_thumb.jpg','114736168914347646408','','','other','2017-02-22','','mylop000@gmail.com','','1487727731',1,'gg','2017-02-22 08:42:13','2017-02-22 08:42:13','2017-02-22 08:42:13'),(45,'Phương Nam FLC GARDEN CITY','upload/avatar/116372749480999369441_avatar_thumb.jpg','116372749480999369441','','','male','2017-02-22','','phamphuongnam1410@gmail.com','','1487728090',1,'gg','2017-02-22 08:48:21','2017-02-22 08:48:21','2017-02-22 08:48:21'),(46,'binh anh','upload/avatar/108852409126662205270_avatar_thumb.jpg','108852409126662205270','','','male','2017-02-22','','anhbinh287@gmail.com','','1487728216',1,'gg','2017-02-22 08:50:18','2017-02-22 08:50:18','2017-02-22 08:50:18'),(47,'Lâm Ánh','upload/avatar/109102723404885566224_avatar_thumb.jpg','109102723404885566224','','','female','2017-02-22','','anhlam.ussh@gmail.com','','1487728231',1,'gg','2017-02-22 08:50:33','2017-02-22 08:50:33','2017-02-22 08:50:33'),(48,'Bách Vũ Xuân','upload/avatar/1867482720142029_avatar_thumb.jpg','1867482720142029','','','male','2017-02-22','','bachvx@outlook.com','','1487728290',1,'fb','2017-02-22 08:51:32','2017-02-22 08:51:32','2017-02-22 08:51:32'),(49,'Trưởng','upload/avatar/391582961204124_avatar_thumb.jpg','391582961204124','','','male','2017-02-22','','caotruong.homecenter@gmail.com','','1487729036',1,'fb','2017-02-22 09:03:58','2017-02-22 09:03:58','2017-02-22 09:03:58'),(50,'Mai Mai','upload/avatar/1200240540093923_avatar_thumb.jpg','1200240540093923','','','female','2017-02-22','','','','1487730435',1,'fb','2017-02-22 09:27:17','2017-02-22 09:27:17','2017-02-22 09:27:17'),(51,'Huyền Đô Rê Mon','upload/avatar/10212043100649647_avatar_thumb.jpg','10212043100649647','','','female','2017-02-22','','gioxuan_915@yahoo.com.vn','','1487732370',1,'fb','2017-02-22 09:59:32','2017-02-22 09:59:32','2017-02-22 09:59:32');
/*Table structure for table `user_log` */
DROP TABLE IF EXISTS `user_log`;
CREATE TABLE `user_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`action` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'LOGIN, LOGOUT',
`time_login` datetime DEFAULT NULL,
`account_input` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`user_agent` text COLLATE utf8_unicode_ci,
`type` varchar(45) COLLATE utf8_unicode_ci DEFAULT 'BE' COMMENT 'BE, FE',
`result` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'SUCCESS, FAILED',
`time_logout` datetime DEFAULT NULL,
`duration` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Data for the table `user_log` */
insert into `user_log`(`id`,`action`,`time_login`,`account_input`,`ip_address`,`user_agent`,`type`,`result`,`time_logout`,`duration`) values (8,'LOGIN/LOGOUT','2017-02-13 23:10:56','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-13 23:11:03',7),(9,'LOGIN/LOGOUT','2017-02-14 08:28:55','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS',NULL,NULL),(10,'LOGIN/LOGOUT','2017-02-14 14:41:27','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 18:03:13',12106),(11,'LOGIN/LOGOUT','2017-02-14 18:03:21','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 18:34:11',1850),(12,'LOGIN/LOGOUT','2017-02-14 22:34:28','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-14 23:32:34',3486),(13,'LOGIN/LOGOUT','2017-02-15 10:53:06','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-15 11:38:29',2723),(14,'LOGIN/LOGOUT','2017-02-15 11:40:02','hungtn','::1','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-15 11:54:23',861),(15,'LOGIN/LOGOUT','2017-02-17 13:55:31','hungtn','117.5.207.170','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-17 14:17:33',1322),(16,'LOGIN/LOGOUT','2017-02-17 14:17:49','doan281pv','117.5.207.170','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-17 14:18:38',49),(17,'LOGIN/LOGOUT','2017-02-18 16:26:24','doan281pv','117.5.207.170','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-18 18:21:23',6899),(18,'LOGIN','2017-02-20 11:24:00','doan281','117.5.207.170','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','FAILED',NULL,NULL),(19,'LOGIN/LOGOUT','2017-02-20 11:24:08','hungtn','117.5.207.170','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-20 11:24:44',36),(20,'LOGIN/LOGOUT','2017-02-20 14:37:39','doan281pv','118.70.8.13','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-20 14:43:00',321),(21,'LOGIN/LOGOUT','2017-02-20 14:43:03','loan_k50a2@yahoo.com','118.70.8.13','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-20 15:32:05',2942),(22,'LOGIN/LOGOUT','2017-02-20 15:35:50','loan_k50a2@yahoo.com','113.190.232.246','Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS',NULL,NULL),(23,'LOGIN/LOGOUT','2017-02-20 17:19:51','doan281pv','118.70.8.13','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-20 17:28:10',499),(24,'LOGIN/LOGOUT','2017-02-20 17:28:13','loan_k50a2@yahoo.com','118.70.8.13','Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS','2017-02-20 18:20:14',3121),(25,'LOGIN/LOGOUT','2017-02-22 09:38:14','hungtn','27.72.100.105','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36','BE','SUCCESS',NULL,NULL);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment