Element.js

19 lines | 349 B Blame History Raw Download
'use strict'

/** @type {typeof import('@adonisjs/lucid/src/Lucid/Model')} */
const Model = use('Model')

class Element extends Model {

  theme() {
    return this.belongsTo('App/Models/Theme')
  }

  stewards() {
    return this.belongsToMany('App/Models/Steward').pivotTable('elements_stewards').withTimestamps()
  }

}

module.exports = Element