seepur/app/Models/Call.js

21 lines
445 B
JavaScript
Raw Normal View History

2020-04-12 14:25:42 +00:00
'use strict'
/** @type {typeof import('@adonisjs/lucid/src/Lucid/Model')} */
const Model = use('Model')
2020-04-14 15:06:09 +00:00
const User = use('App/Models/User');
const Book = use('App/Models/Book');
2020-04-12 14:25:42 +00:00
class Call extends Model {
parent() {
return this.belongsTo('App/Models/User', 'parent_id');
}
guest() {
return this.belongsTo('App/Models/User', 'guest_id');
}
child() {
return this.belongsTo('App/Models/Child');
2020-04-14 15:06:09 +00:00
}
2020-04-12 14:25:42 +00:00
}
module.exports = Call