-- 车辆上牌管理菜单和权限初始化脚本

-- 1. 菜单 SQL
INSERT INTO system_menu(
    name, permission, type, sort, parent_id,
    path, icon, component, status, component_name
)
VALUES (
    '车辆上牌', '', 2, 5, 5055,
    'vehicle-registration', 'file-text', 'asset/vehicle-registration/index', 0, 'VehicleRegistration'
);

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

-- 车辆上牌管理按钮权限
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
VALUES
    ('车辆上牌查询', 'asset:vehicle-registration:query', 3, 1, @menuId, '', '', '', 0),
    ('车辆上牌创建', 'asset:vehicle-registration:create', 3, 2, @menuId, '', '', '', 0),
    ('车辆上牌更新', 'asset:vehicle-registration:update', 3, 3, @menuId, '', '', '', 0),
    ('车辆上牌删除', 'asset:vehicle-registration:delete', 3, 4, @menuId, '', '', '', 0),
    ('车辆上牌导出', 'asset:vehicle-registration:export', 3, 5, @menuId, '', '', '', 0),
    ('车辆上牌确认', 'asset:vehicle-registration:confirm', 3, 6, @menuId, '', '', '', 0),
    ('车辆上牌作废', 'asset:vehicle-registration:void', 3, 7, @menuId, '', '', '', 0);
