blob: d606d325bfba9acad06fcd0327ece7fb0c65238c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php
namespace Peopleaps\Scorm\Model;
use Illuminate\Database\Eloquent\Model;
class ScormScoModel extends Model
{
public function getTable()
{
return config('scorm.table_names.scorm_sco_table', parent::getTable());
}
public function scorm()
{
return $this->belongsTo(ScormModel::class, 'scorm_id', 'id');
}
public function scoTrackings()
{
return $this->hasMany(ScormScoTrackingModel::class, 'sco_id', 'id');
}
public function children()
{
return $this->hasMany(ScormScoModel::class, 'sco_parent_id', 'id');
}
}
|