-- 供应商管理菜单和权限初始化脚本

-- 1. 菜单 SQL
INSERT INTO system_menu(
    name, permission, type, sort, parent_id,
    path, icon, component, status, component_name
)
VALUES (
    '供应商管理', '', 2, 3, 5055,
    'supplier', 'user', 'asset/supplier/index', 0, 'Supplier'
);

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

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