PropertyTrackFile.php
827 Bytes
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
31
32
33
34
35
36
37
38
39
40
<?php
namespace App\Models\Legal;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class PropertyTrackFile extends BaseModel
{
protected $guarded = [];
public $hidden = [
'deleted_at', 'updated_at', 'from', 'id', 'pt_id', 'file_id',
];
/**
* @return BelongsTo
*/
public function songsTrack(): BelongsTo
{
return $this->belongsTo(PropertyTrack::class, 'id', 'pft_id');
}
/**
* @return HasMany
*/
public function ptfTypes(): HasMany
{
return $this->hasMany(PropertyTrackFileType::class, 'p_file_id', 'id');
}
/**
* @return BelongsTo
*/
public function file()
{
return $this->belongsTo(FileMap::class, 'file_id');
}
}