-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('使用记录', '2001', '1', '/device/record_use', 'C', '0', 'device:record_use:view', '#', 'admin', sysdate(), '', null, '使用记录菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('使用记录查询', @parentId, '1',  '#',  'F', '0', 'device:record_use:list',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('使用记录新增', @parentId, '2',  '#',  'F', '0', 'device:record_use:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('使用记录修改', @parentId, '3',  '#',  'F', '0', 'device:record_use:edit',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('使用记录删除', @parentId, '4',  '#',  'F', '0', 'device:record_use:remove',       '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('使用记录导出', @parentId, '5',  '#',  'F', '0', 'device:record_use:export',       '#', 'admin', sysdate(), '', null, '');
