-- 停车场管理菜单和权限初始化脚本

-- 1. 菜单 SQL
INSERT INTO system_menu(
    name, permission, type, sort, parent_id,
    path, icon, component, status, component_name
)
VALUES (
    '停车场管理', '', 2, 1, 5055,
    'parking', 'car', 'asset/parking/index', 0, 'Parking'
);

-- 获取刚插入的菜单ID
SET @menuId = LAST_INSERT_ID();

-- 停车场管理按钮权限
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
VALUES
    ('停车场查询', 'asset:parking:query', 3, 1, @menuId, '', '', '', 0),
    ('停车场创建', 'asset:parking:create', 3, 2, @menuId, '', '', '', 0),
    ('停车场更新', 'asset:parking:update', 3, 3, @menuId, '', '', '', 0),
    ('停车场删除', 'asset:parking:delete', 3, 4, @menuId, '', '', '', 0),
    ('停车场导出', 'asset:parking:export', 3, 5, @menuId, '', '', '', 0);
