fastapi-demo/sql/seeds/sample_data.sql

16 lines
858 B
SQL
Raw 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.

-- 插入示例用户数据
INSERT INTO `users` (`username`, `email`, `full_name`, `is_active`) VALUES
('admin', 'admin@example.com', '管理员', 1),
('john_doe', 'john@example.com', 'John Doe', 1),
('jane_smith', 'jane@example.com', 'Jane Smith', 1),
('bob_wilson', 'bob@example.com', 'Bob Wilson', 0);
-- 插入示例产品数据
INSERT INTO `products` (`name`, `description`, `price`, `stock`, `is_available`) VALUES
('iPhone 15 Pro', '苹果最新旗舰手机配备A17 Pro芯片', 9999.00, 50, 1),
('MacBook Pro 16"', '专业级笔记本电脑M3 Max芯片', 19999.00, 20, 1),
('AirPods Pro', '主动降噪无线耳机', 1999.00, 100, 1),
('iPad Air', '轻薄便携的平板电脑', 4399.00, 30, 1),
('Apple Watch Series 9', '智能手表,健康监测', 2999.00, 80, 1),
('Magic Keyboard', '无线键盘,支持多设备连接', 999.00, 0, 0);