-- 客户管理菜单和权限初始化脚本

-- 1. 菜单 SQL
INSERT INTO system_menu(
    name, permission, type, sort, parent_id,
    path, icon, component, status, component_name
)
VALUES (
    '客户管理', '', 2, 2, 5055,
    'customer', 'user', 'asset/customer/index', 0, 'Customer'
);

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

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