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');
|
2020-04-29 23:45:50 +00:00
|
|
|
const Book = use('App/Models/Book');
|
2020-04-12 14:25:42 +00:00
|
|
|
|
|
|
|
class Call extends Model {
|
2020-04-28 03:04:09 +00:00
|
|
|
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
|