// ===== 获取dm_tables表所有数据

function main() {
	// 验证用户权限
	'use api/user/acl/excerpt.js'

	const result = SQL.query('system_sql', 'SELECT table_id,table_name,class_name,package_name FROM dm_tables WHERE delete_time IS NULL');
	if (result.length) {
		const newResult = result.map((itemR) => {
			const obj = {};
			Object.keys(itemR).forEach((item) => {
				obj[underscoreToCamel(item)] = itemR[item];
			});
			return obj;
		});

		return okMsg(newResult);
	}
	return errMsg('获取失败');
}
