mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
improve torrent approval
This commit is contained in:
15
app/Models/TorrentDenyReason.php
Normal file
15
app/Models/TorrentDenyReason.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Nexus\Database\NexusDB;
|
||||
|
||||
class TorrentDenyReason extends NexusModel
|
||||
{
|
||||
protected $table = 'torrent_deny_reasons';
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = ['name', 'hits', 'priority',];
|
||||
|
||||
}
|
||||
@@ -22,6 +22,11 @@ class TorrentOperationLog extends NexusModel
|
||||
self::ACTION_TYPE_APPROVAL_DENY => ['text' => 'Approval deny'],
|
||||
];
|
||||
|
||||
public function getActionTypeTextAttribute()
|
||||
{
|
||||
return nexus_trans("torrent.operation_log.{$this->action_type}.type_text");
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'uid')->select(User::$commonFields);
|
||||
|
||||
Reference in New Issue
Block a user