mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 18:20:31 -05:00
fix: remove or rename invalid model relations
Requests don't have distributor or region relations, and Announce relations were renamed incorrectly. The relations don't appear to be used for anything currently.
This commit is contained in:
@@ -57,7 +57,7 @@ class Announce extends Model
|
||||
*
|
||||
* @return BelongsTo<Torrent, $this>
|
||||
*/
|
||||
public function torrents(): BelongsTo
|
||||
public function torrent(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Torrent::class);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class Announce extends Model
|
||||
*
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function requests(): BelongsTo
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
@@ -57,14 +57,4 @@ class Distributor extends Model
|
||||
{
|
||||
return $this->hasMany(Torrent::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the requests for this distributor.
|
||||
*
|
||||
* @return HasMany<TorrentRequest, $this>
|
||||
*/
|
||||
public function requests(): HasMany
|
||||
{
|
||||
return $this->hasMany(TorrentRequest::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,14 +58,4 @@ class Region extends Model
|
||||
{
|
||||
return $this->hasMany(Torrent::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all requests for the region.
|
||||
*
|
||||
* @return HasMany<TorrentRequest, $this>
|
||||
*/
|
||||
public function requests(): HasMany
|
||||
{
|
||||
return $this->hasMany(TorrentRequest::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user