From 732db28bb7524532f540d7e868c21d36bb8abbbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=B8=85?= <1474983351@qq.com> Date: Fri, 4 Aug 2023 01:02:33 +0000 Subject: [PATCH] update docs/zh/others/codegen.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王帅 <1474983351@qq.com> --- docs/zh/others/codegen.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/zh/others/codegen.md b/docs/zh/others/codegen.md index 7123330c..9b116395 100644 --- a/docs/zh/others/codegen.md +++ b/docs/zh/others/codegen.md @@ -62,9 +62,8 @@ public class Codegen { globalConfig.setBasePackage("com.test"); //设置表前缀和只生成哪些表 - globalConfig.setGenerateSchema("schema"); globalConfig.setTablePrefix("tb_"); - globalConfig.setGenerateTable("account", "account_session"); + globalConfig.setGenerateTable("tb_account", "tb_account_session"); //设置生成 entity 并启用 Lombok globalConfig.setEntityGenerateEnable(true); @@ -78,7 +77,7 @@ public class Codegen { columnConfig.setColumnName("tenant_id"); columnConfig.setLarge(true); columnConfig.setVersion(true); - globalConfig.setColumnConfig("account", columnConfig); + globalConfig.setColumnConfig("tb_account", columnConfig); return globalConfig; } @@ -93,9 +92,8 @@ public class Codegen { //设置表前缀和只生成哪些表,setGenerateTable 未配置时,生成所有表 globalConfig.getStrategyConfig() - .setGenerateSchema("schema") .setTablePrefix("tb_") - .setGenerateTable("account", "account_session"); + .setGenerateTable("tb_account", "tb_account_session"); //设置生成 entity 并启用 Lombok globalConfig.enableEntity() @@ -110,7 +108,7 @@ public class Codegen { columnConfig.setLarge(true); columnConfig.setVersion(true); globalConfig.getStrategyConfig() - .setColumnConfig("account", columnConfig); + .setColumnConfig("tb_account", columnConfig); return globalConfig; }