improve torrent approval

This commit is contained in:
xiaomlove
2022-08-16 18:31:04 +08:00
parent bda12cce03
commit b398c8db3c
21 changed files with 418 additions and 75 deletions

View 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',];
}

View File

@@ -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);