add game,home pages

This commit is contained in:
wzdwc
2020-04-17 23:38:34 +08:00
parent a947d75f3d
commit 9b4944f23d
72 changed files with 887 additions and 197 deletions
+41
View File
@@ -0,0 +1,41 @@
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50077
Source Host : localhost:3306
Source Database : poker
Target Server Type : MYSQL
Target Server Version : 50077
File Encoding : 65001
Date: 2020-04-17 23:05:30
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for comand_record
-- ----------------------------
DROP TABLE IF EXISTS `comand_record`;
CREATE TABLE `comand_record` (
`id` int(11) NOT NULL auto_increment,
`user_id` int(11) default NULL,
`game_id` int(11) default NULL,
`type` text,
`comand` text,
`room_id` int(11) default NULL,
`create_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
`update_time` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of comand_record
-- ----------------------------
DROP TRIGGER IF EXISTS `update_comand_record_time`;
DELIMITER ;;
CREATE TRIGGER `update_comand_record_time` BEFORE UPDATE ON `comand_record` FOR EACH ROW SET NEW.`UPDATE_TIME` = NOW()
;;
DELIMITER ;
+41
View File
@@ -0,0 +1,41 @@
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50077
Source Host : localhost:3306
Source Database : poker
Target Server Type : MYSQL
Target Server Version : 50077
File Encoding : 65001
Date: 2020-04-17 23:05:17
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for game
-- ----------------------------
DROP TABLE IF EXISTS `game`;
CREATE TABLE `game` (
`id` int(11) NOT NULL auto_increment,
`room_id` int(11) default NULL,
`status` int(11) default NULL,
`common_card` text,
`winners` varchar(255) default NULL,
`pot` decimal(8,0) default NULL,
`create_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
`update_time` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of game
-- ----------------------------
DROP TRIGGER IF EXISTS `update_game_time`;
DELIMITER ;;
CREATE TRIGGER `update_game_time` BEFORE UPDATE ON `game` FOR EACH ROW SET NEW.`UPDATE_TIME` = NOW()
;;
DELIMITER ;
+41
View File
@@ -0,0 +1,41 @@
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50077
Source Host : localhost:3306
Source Database : poker
Target Server Type : MYSQL
Target Server Version : 50077
File Encoding : 65001
Date: 2020-04-17 23:05:40
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for game_record
-- ----------------------------
DROP TABLE IF EXISTS `game_record`;
CREATE TABLE `game_record` (
`id` int(11) NOT NULL auto_increment,
`game_id` int(11) default NULL,
`room_number` int(11) default NULL,
`buy_in` int(11) NOT NULL,
`hand_card` varchar(25) default NULL,
`user_id` int(11) default NULL,
`create_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
`update_time` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of game_record
-- ----------------------------
DROP TRIGGER IF EXISTS `update_game_record_time`;
DELIMITER ;;
CREATE TRIGGER `update_game_record_time` BEFORE UPDATE ON `game_record` FOR EACH ROW SET NEW.`UPDATE_TIME` = NOW()
;;
DELIMITER ;
+52
View File
@@ -0,0 +1,52 @@
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50077
Source Host : localhost:3306
Source Database : poker
Target Server Type : MYSQL
Target Server Version : 50077
File Encoding : 65001
Date: 2020-04-17 23:05:49
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for room
-- ----------------------------
DROP TABLE IF EXISTS `room`;
CREATE TABLE `room` (
`id` int(11) NOT NULL auto_increment,
`room_number` text,
`create_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
`update_time` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of room
-- ----------------------------
INSERT INTO `room` VALUES ('1', '522687', '2020-04-01 15:33:32', null);
INSERT INTO `room` VALUES ('2', '145519', '2020-04-01 16:58:53', null);
INSERT INTO `room` VALUES ('3', '354507', '2020-04-01 17:35:32', null);
INSERT INTO `room` VALUES ('4', '973599', '2020-04-02 17:09:52', null);
INSERT INTO `room` VALUES ('5', '338302', '2020-04-02 17:12:39', null);
INSERT INTO `room` VALUES ('6', '739937', '2020-04-16 16:33:43', null);
INSERT INTO `room` VALUES ('7', '604560', '2020-04-16 16:35:35', null);
INSERT INTO `room` VALUES ('8', '205826', '2020-04-17 09:57:41', null);
INSERT INTO `room` VALUES ('9', '507003', '2020-04-17 13:51:25', null);
INSERT INTO `room` VALUES ('10', '633228', '2020-04-17 13:55:04', null);
INSERT INTO `room` VALUES ('11', '719376', '2020-04-17 15:06:55', null);
INSERT INTO `room` VALUES ('12', '516433', '2020-04-17 16:08:29', null);
INSERT INTO `room` VALUES ('13', '991922', '2020-04-17 16:20:18', null);
INSERT INTO `room` VALUES ('14', '346124', '2020-04-17 16:20:52', null);
INSERT INTO `room` VALUES ('15', '261855', '2020-04-17 17:29:38', null);
DROP TRIGGER IF EXISTS `update_room_time`;
DELIMITER ;;
CREATE TRIGGER `update_room_time` BEFORE UPDATE ON `room` FOR EACH ROW SET NEW.`UPDATE_TIME` = NOW()
;;
DELIMITER ;
+42
View File
@@ -0,0 +1,42 @@
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50077
Source Host : localhost:3306
Source Database : poker
Target Server Type : MYSQL
Target Server Version : 50077
File Encoding : 65001
Date: 2020-04-17 23:05:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL auto_increment,
`nick_name` char(25) character set utf8 default NULL,
`password` char(25) default NULL,
`account` char(25) default NULL,
`create_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
`update_time` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', 'c', '123', 'cai', '2020-04-01 16:26:32', null);
INSERT INTO `user` VALUES ('2', '', '123', 'cai111', '2020-04-01 16:28:17', null);
INSERT INTO `user` VALUES ('3', '蔡1', '123', 'cai11', '2020-04-01 16:29:43', null);
DROP TRIGGER IF EXISTS `update_user_time`;
DELIMITER ;;
CREATE TRIGGER `update_user_time` BEFORE UPDATE ON `user` FOR EACH ROW SET NEW.`UPDATE_TIME` = NOW()
;;
DELIMITER ;