Files
UNIT3D-Community-Edition/app/Models/TorrentDownload.php
HDVinnie 2ca429c4ce Revert "PSR12 Linting"
This reverts commit 7e65e1d589.
2022-09-11 19:51:58 -04:00

31 lines
646 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class TorrentDownload extends Model
{
use HasFactory;
/**
* Belongs To A User.
*/
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class)->withDefault([
'username' => 'System',
'id' => '1',
]);
}
/**
* Belongs To A Torrent.
*/
public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Torrent::class);
}
}