创建 mysql.sql

This commit is contained in:
2023-12-25 15:01:57 +08:00
parent 10bb0b8f77
commit 4a045b7fc6

20
mysql.sql Normal file
View File

@@ -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);