Removed projects; added tests

This commit is contained in:
2023-12-02 23:41:04 -05:00
parent 286219c5ea
commit 75552eccee
16 changed files with 209 additions and 146 deletions

View File

@ -5,8 +5,16 @@ const sequelize = new Sequelize({
storage: 'data/leviathan.db'
});
const Project = require('./project')(sequelize);
const Hardware = require('./hardware')(sequelize);
const Benchmark = require('./benchmark')(sequelize);
const Test = require('./test')(sequelize);
// Hardware/Test one-to-many
Hardware.hasMany(Test);
Test.belongsTo(Hardware);
// Benchmark/Test many-to-many
Benchmark.belongsToMany(Test, { through: 'tests_benchmarks' });
Test.belongsToMany(Benchmark, { through: 'tests_benchmarks' });
module.exports = sequelize;