/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50515
Source Host           : localhost:3306
Source Database       : sbg

Target Server Type    : MYSQL
Target Server Version : 50515
File Encoding         : 65001

Date: 2014-12-08 15:16:47
*/


-- ----------------------------
-- Table structure for `tbladminrole`
-- ----------------------------
CREATE TABLE `tbladminrole` (
  `role_id` int(11) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(45) NOT NULL,
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tbladminrole
-- ----------------------------

-- ----------------------------
-- Table structure for `tblcardlog`
-- ----------------------------
CREATE TABLE `tblcardlog` (
  `id` int(11) NOT NULL,
  `sender` varchar(255) DEFAULT NULL,
  `us_id` int(11) DEFAULT NULL,
  `pin_code` varchar(45) DEFAULT NULL,
  `serial_num` varchar(45) DEFAULT NULL,
  `card_value` int(11) DEFAULT NULL,
  `created_time` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for `tblpaidlog`
-- ----------------------------
CREATE TABLE `tblpaidlog` (
  `paid_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `us_id` int(11) NOT NULL,
  `paid_type` tinyint(11) NOT NULL DEFAULT '0' COMMENT '1:SMS; 2:CARD;',
  `amount` int(11) NOT NULL DEFAULT '0',
  `source` varchar(65) NOT NULL,
  `paid_time` datetime DEFAULT NULL,
  PRIMARY KEY (`paid_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tblpaidlog
-- ----------------------------
INSERT INTO `tblpaidlog` VALUES ('1', '100', '2', '10000', 'Thẻ cào', '2014-11-25 15:16:59');
INSERT INTO `tblpaidlog` VALUES ('2', '101', '1', '1000', '01692006723', '2014-11-25 16:05:40');
INSERT INTO `tblpaidlog` VALUES ('3', '101', '1', '1000', '01692006723', '2014-11-25 16:08:43');
INSERT INTO `tblpaidlog` VALUES ('4', '101', '1', '2000', '01692006723', '2014-11-25 16:12:42');
INSERT INTO `tblpaidlog` VALUES ('5', '101', '1', '2500', '01692006723', '2014-11-25 16:33:26');
INSERT INTO `tblpaidlog` VALUES ('6', '101', '1', '100', '01692006723', '2014-11-25 16:36:38');
INSERT INTO `tblpaidlog` VALUES ('7', '101', '1', '2000', '01692006723', '2014-11-25 16:37:49');
INSERT INTO `tblpaidlog` VALUES ('8', '102', '1', '6000', '01632002905', '2014-11-25 16:55:44');
INSERT INTO `tblpaidlog` VALUES ('9', '102', '1', '6000', '01632002905', '2014-11-25 16:57:56');
INSERT INTO `tblpaidlog` VALUES ('10', '80', '2', '10000', 'Thẻ cào', '2014-11-26 17:58:30');
INSERT INTO `tblpaidlog` VALUES ('11', '100', '2', '10000', 'Thẻ cào', '2014-11-26 18:00:23');
INSERT INTO `tblpaidlog` VALUES ('12', '100', '1', '1', '0979359749', '2014-11-26 18:04:10');
INSERT INTO `tblpaidlog` VALUES ('13', '105', '1', '15000', '01692006723', '2014-12-02 11:08:44');

-- ----------------------------
-- Table structure for `tblproduct`
-- ----------------------------
CREATE TABLE `tblproduct` (
  `product_id` int(11) NOT NULL DEFAULT '0',
  `product_name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tblproduct
-- ----------------------------

-- ----------------------------
-- Table structure for `tblregisterpackagelog`
-- ----------------------------
CREATE TABLE `tblregisterpackagelog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(15) NOT NULL,
  `source` varchar(65) NOT NULL,
  `p_code` varchar(65) NOT NULL,
  `created_time` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tblregisterpackagelog
-- ----------------------------
INSERT INTO `tblregisterpackagelog` VALUES ('1', '0988568786', 'web', '3', '2014-12-04 12:25:20');
INSERT INTO `tblregisterpackagelog` VALUES ('2', '0988568786', 'web', '1', '2014-12-04 15:14:23');
INSERT INTO `tblregisterpackagelog` VALUES ('3', '0988568786', 'web', '1', '2014-12-04 15:15:47');
INSERT INTO `tblregisterpackagelog` VALUES ('4', '0988568786', 'web', '1', '2014-12-04 15:17:29');
INSERT INTO `tblregisterpackagelog` VALUES ('5', '0988568786', 'web', '1', '2014-12-04 15:17:51');
INSERT INTO `tblregisterpackagelog` VALUES ('6', '0988568786', 'web', '1', '2014-12-04 15:24:05');
INSERT INTO `tblregisterpackagelog` VALUES ('7', '0988568786', 'web', '1', '2014-12-04 15:25:45');
INSERT INTO `tblregisterpackagelog` VALUES ('8', '0988568786', 'web', '1', '2014-12-04 16:29:41');
INSERT INTO `tblregisterpackagelog` VALUES ('9', '0988568786', 'SMS', '1', '2014-12-05 12:13:15');
INSERT INTO `tblregisterpackagelog` VALUES ('10', '0988568786', 'SMS', '12', '2014-12-05 14:55:42');

-- ----------------------------
-- Table structure for `tblservicepackage`
-- ----------------------------
CREATE TABLE `tblservicepackage` (
  `p_id` int(11) NOT NULL AUTO_INCREMENT,
  `p_name` varchar(50) NOT NULL,
  `p_period` int(11) NOT NULL,
  `p_price` int(11) NOT NULL,
  `p_code` varchar(15) DEFAULT NULL,
  `p_unit` varchar(15) DEFAULT NULL,
  `p_dfspace` varchar(15) DEFAULT '1GB',
  `p_isextra` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`p_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tblservicepackage
-- ----------------------------
INSERT INTO `tblservicepackage` VALUES ('1', 'VIP 1', '1', '15000', '1', 'months', '1GB', '0');
INSERT INTO `tblservicepackage` VALUES ('2', 'VIP 3', '3', '40000', '3', 'months', '1GB', '0');
INSERT INTO `tblservicepackage` VALUES ('3', 'VIP 6', '6', '70000', '6', 'months', '1GB', '0');
INSERT INTO `tblservicepackage` VALUES ('4', 'VIP 12', '12', '130000', '12', 'months', '1GB', '0');
INSERT INTO `tblservicepackage` VALUES ('5', 'Trial', '-1', '0', '-1', 'days', '1GB', '0');

-- ----------------------------
-- Table structure for `tblsmslog`
-- ----------------------------
CREATE TABLE `tblsmslog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `request_id` varchar(255) DEFAULT '',
  `sender` varchar(255) DEFAULT NULL,
  `us_id` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `commandcode` varchar(255) DEFAULT NULL,
  `info` varchar(255) DEFAULT NULL,
  `mobody` varchar(255) DEFAULT NULL,
  `mtbody` varchar(255) DEFAULT NULL,
  `created_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tblsmslog
-- ----------------------------
INSERT INTO `tblsmslog` VALUES ('1', '', '0979359749', null, '8062', 'SBG', 'Sbg vip 1', null, null, '2014-11-25 10:59:14');
INSERT INTO `tblsmslog` VALUES ('2', '', '0979359749', '100', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-25 11:08:41');
INSERT INTO `tblsmslog` VALUES ('3', '', '0988568786', '68', '8062', 'SBG', 'Sbg nap aaa', null, null, '2014-11-25 12:30:29');
INSERT INTO `tblsmslog` VALUES ('4', '', '0979359749', '100', '8062', 'SBG', 'Sbg vip 1', null, null, '2014-11-25 13:27:56');
INSERT INTO `tblsmslog` VALUES ('5', '', '01692006723', '101', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-25 14:59:35');
INSERT INTO `tblsmslog` VALUES ('6', '', '01692006723', '101', '8062', 'SBG', 'Sbg vip 1', null, null, '2014-11-25 15:50:49');
INSERT INTO `tblsmslog` VALUES ('7', '', '01692006723', '101', '8062', 'SBG', 'Sbg nap 1000', null, null, '2014-11-25 15:53:35');
INSERT INTO `tblsmslog` VALUES ('8', '', '01692006723', '101', '8062', 'SBG', 'Sbg nap 1000', null, null, '2014-11-25 15:56:43');
INSERT INTO `tblsmslog` VALUES ('9', '', '01692006723', '101', '8062', 'SBG', 'Sbg nap 2000', null, null, '2014-11-25 16:00:41');
INSERT INTO `tblsmslog` VALUES ('10', '', '01692006723', '101', '8062', 'SBG', 'Sbg nap 2500', null, null, '2014-11-25 16:21:25');
INSERT INTO `tblsmslog` VALUES ('11', '', '01692006723', '101', '8062', 'SBG', 'Sbg nap 100', null, null, '2014-11-25 16:24:32');
INSERT INTO `tblsmslog` VALUES ('12', '', '01692006723', '101', '8062', 'SBG', 'Sbg nap 2000', null, null, '2014-11-25 16:25:48');
INSERT INTO `tblsmslog` VALUES ('13', '', '01632002905', '102', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-25 16:32:44');
INSERT INTO `tblsmslog` VALUES ('14', '', '01632002905', '102', '8062', 'SBG', 'Sbg nap 6000', null, null, '2014-11-25 16:43:42');
INSERT INTO `tblsmslog` VALUES ('15', '', '01632002905', '102', '8062', 'SBG', 'Sbg nap 6000', null, null, '2014-11-25 16:40:36');
INSERT INTO `tblsmslog` VALUES ('16', '', '0988568786', '68', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-26 10:02:48');
INSERT INTO `tblsmslog` VALUES ('17', '', '0988568786', '68', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-26 11:07:56');
INSERT INTO `tblsmslog` VALUES ('18', '', '0988568786', '68', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-26 11:07:56');
INSERT INTO `tblsmslog` VALUES ('19', '', '0988568786', '68', '8062', 'SBG', 'Sbg mk 123456', null, null, '2014-11-26 11:12:00');
INSERT INTO `tblsmslog` VALUES ('20', '', '0988568786', '68', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-26 11:13:00');
INSERT INTO `tblsmslog` VALUES ('21', '', '0988568786', '68', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-26 11:13:00');
INSERT INTO `tblsmslog` VALUES ('22', '', '0983460604', '103', '8062', 'SBG', 'SBG DK', null, null, '2014-11-26 11:42:14');
INSERT INTO `tblsmslog` VALUES ('23', '', '0983460604', '103', '8062', 'SBG', 'SBG DK', null, null, '2014-11-26 11:42:14');
INSERT INTO `tblsmslog` VALUES ('24', '', '0982124899', '61', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-26 11:43:48');
INSERT INTO `tblsmslog` VALUES ('25', '', '01682821813', '99', '8062', 'SBG', 'SBG dk', null, null, '2014-11-18 09:52:35');
INSERT INTO `tblsmslog` VALUES ('26', '', '01682821813', '99', '8062', 'SBG', 'SBG nhj', null, null, '2014-11-18 09:52:35');
INSERT INTO `tblsmslog` VALUES ('27', '', '0979359749', '100', '8062', 'SBG', 'Sbg vip 1', null, null, '2014-11-26 17:51:29');
INSERT INTO `tblsmslog` VALUES ('28', '', '0979359749', '100', '8062', 'SBG', 'Sbg mk', null, null, '2014-11-26 17:51:56');
INSERT INTO `tblsmslog` VALUES ('29', '', '0979359749', '100', '8062', 'SBG', 'Sbg nap 001', null, null, '2014-11-26 17:52:03');
INSERT INTO `tblsmslog` VALUES ('30', '', '0979947802', '67', '8062', 'SBG', 'SBG MK', null, null, '2014-11-27 01:13:24');
INSERT INTO `tblsmslog` VALUES ('31', '', '0979947802', '67', '8062', 'SBG', 'SBG MK', null, null, '2014-11-27 01:13:24');
INSERT INTO `tblsmslog` VALUES ('32', '', '01682821813', '99', '8062', 'SBG', 'SBG nhj', null, null, '2014-11-18 09:52:35');
INSERT INTO `tblsmslog` VALUES ('33', '', '01682821813', '99', '8062', 'SBG', 'SBG nhj', null, null, '2014-11-18 09:52:35');
INSERT INTO `tblsmslog` VALUES ('34', '', '0988568786', '68', '8062', 'SBG', 'Sbg dk', null, null, '2014-11-29 17:59:52');
INSERT INTO `tblsmslog` VALUES ('35', '', '01654040214', null, '8062', 'SBG', 'Sbg dk 01692006723', null, null, '2014-12-02 10:04:13');
INSERT INTO `tblsmslog` VALUES ('36', '', '01654040214', '105', '8062', 'SBG', 'Sbg dk', null, null, '2014-12-02 10:35:49');
INSERT INTO `tblsmslog` VALUES ('37', '', '01682821813', '99', '8062', 'SBG', 'SBG nhj', null, null, '2014-11-18 09:52:35');
INSERT INTO `tblsmslog` VALUES ('38', '', '01682821813', '99', '8062', 'SBG', 'SBG dk', null, null, '2014-11-18 09:52:35');
INSERT INTO `tblsmslog` VALUES ('39', '', '0988568786', '68', '8062', 'SBG', 'Sbg dk', null, null, '2014-12-02 10:48:26');
INSERT INTO `tblsmslog` VALUES ('40', '', '01692006723', '101', '8062', 'SBG', 'Sbg nap 15000 01654040214', null, null, '2014-12-02 10:56:16');
INSERT INTO `tblsmslog` VALUES ('41', '', '0988568786', '68', '8062', 'SBG', 'DK SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('42', '', '0988568786', '68', '8062', 'SBG', 'VIP SBG 1', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('43', '', '0988568786', '68', '8062', 'SBG', 'VIP SBG 12', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('44', '', '0988568786', '68', '8062', 'SBG', 'SBG 12', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('45', '', '0988568786', '68', '8062', 'SBG', 'SBG DK', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('46', '', '0988568786', '68', '8062', 'SBG', 'DK SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('47', '', '0988568786', '68', '8062', 'SBG', 'HD SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('48', '', '0988568786', '68', '8062', 'SBG', 'HD SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('49', '', '0988568786', '68', '8062', 'SBG', 'HD SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('50', '', '0988568786', '68', '8062', 'SBG', 'HD SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('51', '', '0988568786', '68', '8062', 'SBG', 'HD SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('52', '', '0988568786', '68', '8062', 'SBG', 'HD SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('53', '', '0988568786', '68', '8062', 'SBG', 'HD SBG', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('54', '', '0988568786', '68', '8062', 'SBG', 'SBG HD', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('55', '', '0988568786', '68', '8062', 'SBG', 'SBG HD', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('56', '', '0988568786', '68', '8062', 'SBG', 'SBG DK', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('57', '', '0988568786', '68', '8062', 'SBG', 'SBG MK', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('58', '', '0988568786', '68', '8062', 'SBG', 'SBG MKd', null, null, '2014-12-01 12:00:00');
INSERT INTO `tblsmslog` VALUES ('59', '', '0988568786', '68', '8062', 'SBG', 'SBG M', null, null, '2014-12-01 12:00:00');

-- ----------------------------
-- Table structure for `tblsmstemplate`
-- ----------------------------
CREATE TABLE `tblsmstemplate` (
  `sms_id` int(11) NOT NULL AUTO_INCREMENT,
  `sms_content` varchar(255) NOT NULL,
  `sms_reply` varchar(255) DEFAULT NULL,
  `reponse_url` varchar(255) DEFAULT NULL,
  `service_id` varchar(45) DEFAULT NULL,
  `commandcode` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`sms_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tblsmstemplate
-- ----------------------------

-- ----------------------------
-- Table structure for `tbluser`
-- ----------------------------
CREATE TABLE `tbluser` (
  `us_id` int(11) NOT NULL,
  `cellphone` varchar(15) NOT NULL,
  `collaborator` int(11) DEFAULT NULL,
  `acc_balanced` bigint(20) NOT NULL DEFAULT '0',
  `expire_date` date DEFAULT NULL,
  `p_id` int(11) DEFAULT NULL,
  `created_time` datetime NOT NULL,
  `updated_time` datetime DEFAULT NULL,
  PRIMARY KEY (`us_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tbluser
-- ----------------------------
INSERT INTO `tbluser` VALUES ('61', '0982124899', null, '16000', '2016-02-18', '1', '2014-11-14 21:15:17', null);
INSERT INTO `tbluser` VALUES ('66', '01887521818', '982124899', '0', null, null, '2014-11-15 01:09:42', null);
INSERT INTO `tbluser` VALUES ('67', '0979947802', '982124899', '0', null, null, '2014-11-15 01:10:56', '2014-11-27 01:25:38');
INSERT INTO `tbluser` VALUES ('68', '0988568786', null, '10000', null, null, '2014-11-17 16:34:41', '2014-12-05 16:45:54');
INSERT INTO `tbluser` VALUES ('69', '0943479095', null, '78500', '2015-02-15', '1', '2014-11-18 09:53:00', '2014-11-18 17:39:35');
INSERT INTO `tbluser` VALUES ('70', '0985826266', null, '5000', '2016-11-16', '4', '2014-11-18 15:39:59', null);
INSERT INTO `tbluser` VALUES ('71', '0912268437', null, '4500', '2014-12-17', '1', '2014-11-18 16:02:23', null);
INSERT INTO `tbluser` VALUES ('80', '01234788777', null, '10400', null, null, '2014-11-20 10:36:34', '2014-11-26 17:58:30');
INSERT INTO `tbluser` VALUES ('81', '0989562365', '988568786', '0', null, null, '2014-11-20 11:41:24', null);
INSERT INTO `tbluser` VALUES ('85', '01662860000', null, '1500000', null, null, '2014-11-20 17:26:07', '2014-11-20 17:52:03');
INSERT INTO `tbluser` VALUES ('86', '01689925260', null, '0', null, null, '2014-11-21 09:55:36', '2014-11-21 10:17:31');
INSERT INTO `tbluser` VALUES ('87', '01649529632', null, '7503', '2015-11-21', '3', '2014-11-21 13:59:10', '2014-11-24 17:15:06');
INSERT INTO `tbluser` VALUES ('89', '01688243590', null, '0', null, null, '2014-11-21 16:45:26', null);
INSERT INTO `tbluser` VALUES ('91', '01685910879', null, '0', null, null, '2014-11-21 17:01:53', null);
INSERT INTO `tbluser` VALUES ('98', '0983621978', null, '0', null, null, '2014-11-21 18:48:15', null);
INSERT INTO `tbluser` VALUES ('99', '01682821813', null, '0', null, null, '2014-11-25 10:04:03', null);
INSERT INTO `tbluser` VALUES ('100', '0979359749', null, '17001', '2015-12-25', '1', '2014-11-25 11:20:43', '2014-11-26 18:04:10');
INSERT INTO `tbluser` VALUES ('101', '01692006723', null, '2100', '2016-10-25', '4', '2014-11-25 15:11:37', '2014-11-25 16:37:49');
INSERT INTO `tbluser` VALUES ('102', '01632002905', null, '0', '2018-12-25', '2', '2014-11-25 16:44:46', '2014-11-25 16:57:56');
INSERT INTO `tbluser` VALUES ('103', '0983460604', null, '0', null, null, '2014-11-26 11:54:15', null);
INSERT INTO `tbluser` VALUES ('105', '01654040214', null, '15000', null, null, '2014-12-02 10:48:06', '2014-12-02 11:08:44');

-- ----------------------------
-- Table structure for `tblwebservice`
-- ----------------------------
CREATE TABLE `tblwebservice` (
  `service_id` int(11) NOT NULL AUTO_INCREMENT,
  `service_name` varchar(45) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `uri` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`service_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tblwebservice
-- ----------------------------
