Element.js
'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()
}
submissions() {
return this.hasMany('App/Models/Submission')
}
}
module.exports = Element