mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
feat: 支持 Active Record 代码生成。
This commit is contained in:
parent
9f0bb84c43
commit
a38bb0bcfe
@ -66,19 +66,10 @@ public class EntityConfig {
|
|||||||
*/
|
*/
|
||||||
private SwaggerVersion swaggerVersion;
|
private SwaggerVersion swaggerVersion;
|
||||||
|
|
||||||
public enum SwaggerVersion {
|
/**
|
||||||
FOX("FOX"),
|
* Entity 是否启用 Active Record 功能。
|
||||||
DOC("DOC");
|
*/
|
||||||
private final String name;
|
private boolean withActiveRecord;
|
||||||
|
|
||||||
SwaggerVersion(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实体类数据源。
|
* 实体类数据源。
|
||||||
@ -207,6 +198,21 @@ public class EntityConfig {
|
|||||||
return this;
|
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;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user