Files
2026-09-11 07:15:51 +08:00

40 lines
1.7 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- =====================================================
-- GameParlor 初始数据脚本(MySQL 5.x)
-- 在执行完 schema.sql 后执行本脚本
-- =====================================================
USE gameparlor;
-- 管理员账号(明文密码)
INSERT INTO `user` (`username`, `password`, `role`, `balance`, `member_expire_date`, `points`, `version`)
VALUES ('admin', 'admin123', 'ADMIN', 9999.00, DATE_ADD(CURDATE(), INTERVAL 10 YEAR), 0, 0);
-- 设备
INSERT INTO `device` (`name`, `description`, `remark`, `created_at`) VALUES
('PS5', 'PlayStation 5 主机', '4K 120Hz,支持次世代游戏', NOW()),
('Switch', '任天堂 Switch', '多人派对游戏首选', NOW());
-- 游戏
INSERT INTO `game` (`name`, `description`, `remark`, `is_universal`, `device_id`, `member_price`, `created_at`) VALUES
('艾尔登法环', '开放世界动作 RPG', '运行设备:PS5', b'0', 1, 30.00, NOW()),
('马里奥赛车', '竞速派对游戏', '运行设备:Switch', b'0', 2, 20.00, NOW()),
('街机合集', '经典街机游戏合集', '通用游戏,全设备可玩', b'1', NULL, 15.00, NOW());
-- 时长
INSERT INTO `time_slot` (`duration_minutes`, `base_price`, `member_price`, `created_at`) VALUES
(30, 15.00, 12.00, NOW()),
(60, 25.00, 20.00, NOW()),
(120, 45.00, 38.00, NOW());
-- 零食饮料
INSERT INTO `snack` (`name`, `price`, `type`, `remark`, `member_price`, `created_at`) VALUES
('可乐', 8.00, 'DRINK', '冰镇 330ml', 6.00, NOW()),
('薯片', 10.00, 'SNACK', '原味', 8.00, NOW()),
('绿茶', 6.00, 'DRINK', '无糖', 5.00, NOW());
-- 系统配置
INSERT INTO `system_config` (`config_key`, `value`) VALUES
('points_exchange_rate', '100'),
('member_discount_rate', '0.85'),
('points_earn_rate', '1');