This repository has been archived on 2026-06-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
auracle-api/models/ingredient-model.js
2021-07-18 15:48:01 +02:00

12 lines
310 B
JavaScript

const bookshelf = require('../database/bookshelf').bookshelf;
require('./spell-model');
let Ingredient = bookshelf.Model.extend({
tableName: 'ingredient',
spells() {
return this.belongsToMany('Spell', 'spell_ingredient');
}
});
module.exports = bookshelf.model('Ingredient', Ingredient);