20 lines
1.1 KiB
MySQL
20 lines
1.1 KiB
MySQL
|
|
-- 示例用户数据
|
||
|
|
-- 用户名: demo, 密码: demo
|
||
|
|
INSERT IGNORE INTO users (username, email, password_hash, role, points) VALUES ('demo', 'demo@example.com', 'demo', 'ROLE_USER', 100);
|
||
|
|
|
||
|
|
-- 用户名: admin, 密码: admin123
|
||
|
|
INSERT IGNORE INTO users (username, email, password_hash, role, points) VALUES ('admin', 'admin@example.com', 'admin123', 'ROLE_ADMIN', 200);
|
||
|
|
|
||
|
|
-- 测试用户1: 用户名: testuser, 密码: test123
|
||
|
|
INSERT IGNORE INTO users (username, email, password_hash, role, points) VALUES ('testuser', 'testuser@example.com', 'test123', 'ROLE_USER', 75);
|
||
|
|
|
||
|
|
-- 测试用户2: 用户名: mingzi_FBx7foZYDS7inLQb, 密码: 123456 (对应个人主页的用户名)
|
||
|
|
INSERT IGNORE INTO users (username, email, password_hash, role, points) VALUES ('mingzi_FBx7foZYDS7inLQb', 'mingzi@example.com', '123456', 'ROLE_USER', 25);
|
||
|
|
|
||
|
|
-- 手机号测试用户: 用户名: 15538239326, 密码: 0627
|
||
|
|
INSERT IGNORE INTO users (username, email, password_hash, role, points) VALUES ('15538239326', '15538239326@example.com', '0627', 'ROLE_USER', 50);
|
||
|
|
|
||
|
|
-- 更新现有用户的积分(如果还没有设置)
|
||
|
|
UPDATE users SET points = 50 WHERE points IS NULL OR points = 0;
|
||
|
|
|