Steward.js
'use strict'
/** @type {typeof import('@adonisjs/lucid/src/Lucid/Model')} */
const Model = use('Model')
class Steward extends Model {
contact() {
return this.belongsTo('App/Models/Contact')
}
elements() {
return this.belongsToMany('App/Models/Element').pivotTable('elements_stewards').withTimestamps()
}
}
module.exports = Steward