-- 执行完成后 需要在系统菜单页面刷新缓存

-- 父菜单
INSERT INTO system_menu
  (parent_id, name, type, sort, visible, status, cache, component, creator, updater, deleted)
VALUES
  (0, '${table.comment}管理', 1, 10, 1, 1, 1, '${vue.moduleEntityFirstLower}Module', '1', '1', 0);

-- 设置临时父菜单id
SELECT @TMP_PARENT_ID:=LAST_INSERT_ID();

-- 子菜单
INSERT INTO system_menu
  (parent_id, name, type, sort, visible, status, cache, component, creator, updater, deleted)
VALUES
  (@TMP_PARENT_ID, '$table.comment', 2, 10, 1, 1, 1, '$vue.featureEntityFirstLower', '1', '1', 0);

-- 设置临时子菜单id
SELECT @TMP_SUB_ID:=LAST_INSERT_ID();

-- 功能
INSERT INTO system_menu
  (parent_id, name, permission, type, sort, creator, updater, deleted)
VALUES
  (@TMP_SUB_ID, '查询$table.comment', '${package.ModuleName}:${typeHyphen}:query', 3, 10, '1', '1', 0),
  (@TMP_SUB_ID, '创建$table.comment', '${package.ModuleName}:${typeHyphen}:create', 3, 20, '1', '1', 0),
  (@TMP_SUB_ID, '修改$table.comment', '${package.ModuleName}:${typeHyphen}:update', 3, 30, '1', '1', 0),
  (@TMP_SUB_ID, '删除$table.comment', '${package.ModuleName}:${typeHyphen}:delete', 3, 40, '1', '1', 0);
