| Total Complexity | 4 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Relation extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The table associated with the model. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $table = 'relations'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The attributes that should be casted to native types. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $casts = [ |
||
| 22 | 'data' => 'object', |
||
| 23 | ]; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The attributes that are mass assignable. |
||
| 27 | * |
||
| 28 | * @var array |
||
| 29 | */ |
||
| 30 | protected $fillable = [ |
||
| 31 | 'relatedlist_id', 'module_id', 'related_module_id', 'record_id', 'related_record_id', 'data' |
||
| 32 | ]; |
||
| 33 | |||
| 34 | protected function initTablePrefix() |
||
| 37 | } |
||
| 38 | |||
| 39 | public function module() |
||
| 40 | { |
||
| 41 | return $this->belongsTo(Module::class); |
||
| 42 | } |
||
| 43 | |||
| 44 | public function relatedModule() |
||
| 45 | { |
||
| 46 | return $this->belongsTo(Module::class); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function relatedlist() |
||
| 52 | } |
||
| 53 | } |
||
| 54 |