From 4a045b7fc6c6ad687c9df71074f6945ea32f9a53 Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Mon, 25 Dec 2023 15:01:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=20mysql.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysql.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 mysql.sql diff --git a/mysql.sql b/mysql.sql new file mode 100644 index 0000000..39749de --- /dev/null +++ b/mysql.sql @@ -0,0 +1,20 @@ +CREATE TABLE user ( + id INT AUTO_INCREMENT PRIMARY KEY, + nickname VARCHAR(50) NOT NULL, + phone_number VARCHAR(15) NOT NULL UNIQUE, + password VARCHAR(255) NOT NULL, + identity ENUM('teacher', 'student') NOT NULL, + is_active BOOLEAN NOT NULL +); + +INSERT INTO user (nickname, phone_number, password, identity, is_active) VALUES +('Alice', '10000000001', 'password1', 'student', TRUE), +('Bob', '10000000002', 'password2', 'teacher', TRUE), +('Carol', '10000000003', 'password3', 'student', FALSE), +('David', '10000000004', 'password4', 'teacher', TRUE), +('Eve', '10000000005', 'password5', 'student', TRUE), +('Frank', '10000000006', 'password6', 'teacher', FALSE), +('Grace', '10000000007', 'password7', 'student', TRUE), +('Hank', '10000000008', 'password8', 'teacher', TRUE), +('Ivy', '10000000009', 'password9', 'student', FALSE), +('Jack', '10000000010', 'password10', 'teacher', TRUE);