Steward.js

19 lines | 365 B Blame History Raw Download
'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