|
|
@@ -19,6 +19,9 @@ export class AutoConfiguration implements ILifeCycle {
|
|
|
@Config('baseDir')
|
|
|
baseDir: string;
|
|
|
|
|
|
+ @Config('modelPath')
|
|
|
+ modelPath: string;
|
|
|
+
|
|
|
@Logger()
|
|
|
logger;
|
|
|
|
|
|
@@ -29,7 +32,8 @@ export class AutoConfiguration implements ILifeCycle {
|
|
|
}
|
|
|
|
|
|
loadModelFile() {
|
|
|
- const dir = path.join(this.baseDir, 'app/model');
|
|
|
+ const modelPath = this.modelPath ? this.modelPath : 'app/model';
|
|
|
+ const dir = path.join(this.baseDir, modelPath);
|
|
|
const files: string[] = globby.sync(['**/*.(js|ts)', '!**/*.d.ts'], {
|
|
|
cwd: dir,
|
|
|
});
|