feat: 支持 Active Record 代码生成。

This commit is contained in:
Suomm 2023-07-28 21:26:04 +08:00
parent 9f0bb84c43
commit a38bb0bcfe

View File

@ -66,19 +66,10 @@ public class EntityConfig {
*/
private SwaggerVersion swaggerVersion;
public enum SwaggerVersion {
FOX("FOX"),
DOC("DOC");
private final String name;
SwaggerVersion(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
/**
* Entity 是否启用 Active Record 功能
*/
private boolean withActiveRecord;
/**
* 实体类数据源
@ -207,6 +198,21 @@ public class EntityConfig {
return this;
}
/**
* 是否启用 Active Record
*/
public boolean isWithActiveRecord() {
return withActiveRecord;
}
/**
* 设置是否启用 Active Record
*/
public EntityConfig setWithActiveRecord(boolean withActiveRecord) {
this.withActiveRecord = withActiveRecord;
return this;
}
/**
* 获取实体类数据源
*/
@ -222,4 +228,20 @@ public class EntityConfig {
return this;
}
public enum SwaggerVersion {
FOX("FOX"),
DOC("DOC");
private final String name;
SwaggerVersion(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
}