-- 测试用户数据
INSERT INTO sys_user (id, username, password, email, phone, status, created_at, updated_at) 
VALUES 
(1, 'admin', '$2a$10$N.zmdr9k7uOCQb376NoUnuTJ8iAt6Z5EHsM8lE9lBOsl7iAt6Z5EH', 'admin@example.com', '13800138000', 1, NOW(), NOW()),
(2, 'testuser', '$2a$10$N.zmdr9k7uOCQb376NoUnuTJ8iAt6Z5EHsM8lE9lBOsl7iAt6Z5EH', 'test@example.com', '13800138001', 1, NOW(), NOW());

-- 测试角色数据
INSERT INTO sys_role (id, role_name, role_code, description, created_at, updated_at) 
VALUES 
(1, '管理员', 'ADMIN', '系统管理员角色', NOW(), NOW()),
(2, '普通用户', 'USER', '普通用户角色', NOW(), NOW());

-- 测试用户角色关联
INSERT INTO sys_user_role (user_id, role_id) 
VALUES 
(1, 1),
(2, 2);

-- 测试菜单数据
INSERT INTO sys_menu (id, menu_name, menu_code, parent_id, path, icon, sort, status, created_at, updated_at) 
VALUES 
(1, '系统管理', 'SYSTEM', NULL, '/system', 'setting', 1, 1, NOW(), NOW()),
(2, '用户管理', 'USER_MANAGE', 1, '/system/user', 'user', 1, 1, NOW(), NOW()),
(3, '角色管理', 'ROLE_MANAGE', 1, '/system/role', 'team', 2, 1, NOW(), NOW());

-- 测试权限数据
INSERT INTO sys_permission (id, permission_name, permission_code, resource_type, resource_url, method, parent_id, status, created_at, updated_at) 
VALUES 
(1, '用户查看', 'user:view', 'menu', '/api/sys/user/*', 'GET', NULL, 1, NOW(), NOW()),
(2, '用户创建', 'user:create', 'button', '/api/sys/user', 'POST', 1, 1, NOW(), NOW()),
(3, '用户编辑', 'user:edit', 'button', '/api/sys/user/*', 'PUT', 1, 1, NOW(), NOW()),
(4, '用户删除', 'user:delete', 'button', '/api/sys/user/*', 'DELETE', 1, 1, NOW(), NOW());

-- 测试角色权限关联
INSERT INTO sys_role_permission (role_id, permission_id) 
VALUES 
(1, 1), (1, 2), (1, 3), (1, 4),
(2, 1);

-- 测试黄历数据
INSERT INTO almanac (id, date, lunar_date, gan_zhi, star, should_do, avoid_do, created_at, updated_at) 
VALUES 
(1, '2026-03-01', '丙午年正月十三', '丙午年 庚寅月 戊申日', '角木蛟', '祭祀,祈福,求嗣,斋醮,嫁娶,冠笄,出行,开市,交易,会亲友,教牛马', '动土,伐木,安葬,开生坟', NOW(), NOW()),
(2, '2026-03-02', '丙午年正月十四', '丙午年 庚寅月 己酉日', '亢金龙', '祭祀,祈福,求嗣,斋醮,嫁娶,冠笄,出行,开市,交易,会亲友,教牛马', '动土,伐木,安葬,开生坟', NOW(), NOW());
