From f095fd46d13388721bed18c2909fe71c0f42d40e Mon Sep 17 00:00:00 2001 From: makeyangcom Date: Thu, 7 Mar 2024 10:37:07 +0800 Subject: [PATCH] 2.0.0 --- wiki/course/2.0.0.md | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 wiki/course/2.0.0.md diff --git a/wiki/course/2.0.0.md b/wiki/course/2.0.0.md new file mode 100644 index 0000000..0f87c82 --- /dev/null +++ b/wiki/course/2.0.0.md @@ -0,0 +1,48 @@ +## 第二课 + +> 第二课时操作引导文档。 + +### 更新课程源码 + +```shell +git pull origin main +``` + +### GoLand编辑器配置 + +```shell +# 配置代理,加速依赖库的下载 +GOPROXY=https://goproxy.io,direct +``` + +### 数据库管理工具 + +> 创建名为`database`的数据库 + +```shell +database +``` + +> 执行下面的MySQL脚本创建游戏玩家数据表 + +```mysql +CREATE TABLE `game_play_data` ( + `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号', + `user_server_id` int(11) NOT NULL DEFAULT '0' COMMENT '服务器编号', + `user_account` varchar(140) NOT NULL DEFAULT '' COMMENT '账号', + `user_password` varchar(50) NOT NULL DEFAULT '' COMMENT '密码', + `user_name` varchar(50) NOT NULL DEFAULT '' COMMENT '真实姓名', + `user_number` varchar(140) NOT NULL DEFAULT '' COMMENT '身份证号码', + `user_question_a` varchar(140) NOT NULL DEFAULT '' COMMENT '问题一', + `user_question_b` varchar(140) NOT NULL DEFAULT '' COMMENT '问题二', + `user_answer_a` varchar(140) NOT NULL DEFAULT '' COMMENT '答案一', + `user_answer_b` varchar(140) NOT NULL DEFAULT '' COMMENT '答案二', + `user_status` tinyint(2) NOT NULL DEFAULT '2' COMMENT '状态 1:停用 2:启用', + `create_at` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `update_at` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间', + `delete_at` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`), + KEY `status` (`user_status`), + KEY `server_id` (`user_server_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='游戏用户数据表'; +``` \ No newline at end of file