-
Notifications
You must be signed in to change notification settings - Fork 1
/
db.js
36 lines (27 loc) · 1.28 KB
/
db.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const Sequelize = require("sequelize");
const sequelize = new Sequelize(process.env.DB_NAME, process.env.DB_USER, process.env.DB_PASSWORD, {
host: process.env.DB_HOST,
dialect: "mysql",
logging: false,
port: 3306,
define: {
timestamps: false
}
});
const db = {}
db.Sequelize = Sequelize;
db.sequelize = sequelize;
db.predmet_student = sequelize.import(__dirname + '/models/predmet_student.js');
db.AkademskaGodina = sequelize.import(__dirname + '/models/AkademskaGodina.js');
db.Korisnik = sequelize.import(__dirname + '/models/Korisnik.js');
db.Odsjek = sequelize.import(__dirname + '/models/Odsjek.js');
db.odsjek_predmet = sequelize.import(__dirname + '/models/odsjek_predmet');
db.ZahtjeviZavrsni = sequelize.import(__dirname + '/models/ZahtjeviZavrsni.js');
db.TemeZavrsnih = sequelize.import(__dirname + '/models/TemeZavrsnih.js');
db.Ispit = sequelize.import(__dirname + '/models/Ispit.js');
db.IspitBodovi = sequelize.import(__dirname + '/models/IspitBodovi.js');
db.Ugovori = sequelize.import(__dirname + '/models/Ugovori.js');
db.student_zadatak = sequelize.import(__dirname + '/models/student_zadatak.js');
db.Zadatak = sequelize.import(__dirname + '/models/Zadatak.js');
db.Zadaca = sequelize.import(__dirname + '/models/Zadaca.js');
module.exports = db;