1 | var paths = require('../configs/paths'),
|
2 | config = require('../configs/config')
|
3 |
|
4 | module.exports = () => {
|
5 |
|
6 | var model;
|
7 |
|
8 | if (config('database_type')) {
|
9 | /**
|
10 | * Mongoosejs
|
11 | * */
|
12 | if (config('database_type') == "mongodb") {
|
13 | model = new (require('./mongoose.js'))();
|
14 | }
|
15 | /**
|
16 | * Sequelizejs
|
17 | * */
|
18 | else {
|
19 | model = new (require('./sequelize.js'))();
|
20 | }
|
21 | }
|
22 |
|
23 | return model;
|
24 | }
|