exam add index SEED_POINTS + UPLOAD_TORRENT_COUNT

This commit is contained in:
xiaomlove
2023-11-08 03:17:23 +08:00
parent a85c2d3658
commit d9c449d00a
8 changed files with 52 additions and 17 deletions

View File

@@ -488,6 +488,11 @@ class Torrent extends NexusModel
$query->where('visible', $visible);
}
public function scopeNormal($query)
{
$query->where('visible', self::VISIBLE_YES)->where('banned', self::BANNED_NO);
}
public function torrent_tags(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany(TorrentTag::class, 'torrent_id');