更新 mysql.sql

master
wangsiyuan 2023-12-25 20:40:43 +08:00
parent c180dad115
commit 50dc888339
1 changed files with 4 additions and 12 deletions

View File

@ -4,20 +4,12 @@ CREATE TABLE user (
phone_number VARCHAR(15) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
identity ENUM('teacher', 'student') NOT NULL,
is_active BOOLEAN NOT NULL
status 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);
INSERT INTO user (nickname, phone_number, password, identity, status) VALUES
('Alice', '1', '$2b$12$okY88GrzlUHb/Ox1ENwtqeBUnE0bgMOCPy.UKmFaTnu3El7EYX8Em', 'student', TRUE);
CREATE TABLE menu_items (