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:
Roardom
2025-10-03 05:11:31 +00:00
parent 9c4256b4b5
commit ca4ea3dd92
3 changed files with 2 additions and 22 deletions
+2 -2
View File
@@ -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);
}
-10
View File
@@ -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);
}
}
-10
View File
@@ -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);
}
}