From 56017e5e6b3b01f218f78d8847d8fd438424ad88 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Sat, 3 Dec 2022 19:56:54 +0800 Subject: [PATCH] add taxonomy field to torrent comment fields --- app/Console/Commands/Test.php | 9 ++++----- app/Models/Torrent.php | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index d046f7ba..5650c025 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -55,6 +55,8 @@ use NexusPlugin\Permission\Models\Role; use NexusPlugin\PostLike\PostLikeRepository; use NexusPlugin\StickyPromotion\Models\StickyPromotion; use NexusPlugin\StickyPromotion\Models\StickyPromotionParticipator; +use NexusPlugin\Work\Models\RoleWork; +use NexusPlugin\Work\WorkRepository; use PhpIP\IP; use PhpIP\IPBlock; use Rhilip\Bencode\Bencode; @@ -92,11 +94,8 @@ class Test extends Command */ public function handle() { - $categoryTaxonomies = [ - 'category' => ['table' => 'categories', 'model' => Category::class], - ]; - $categoryTaxonomies = array_merge($categoryTaxonomies, SearchBox::$taxonomies); - dd($categoryTaxonomies); + $rep = new WorkRepository(); + $rep->settleRole(5); } diff --git a/app/Models/Torrent.php b/app/Models/Torrent.php index c0ee10d3..95f7e5ca 100644 --- a/app/Models/Torrent.php +++ b/app/Models/Torrent.php @@ -33,7 +33,7 @@ class Torrent extends NexusModel public static $commentFields = [ 'id', 'name', 'added', 'visible', 'banned', 'owner', 'sp_state', 'pos_state', 'hr', 'picktype', 'picktime', 'last_action', 'leechers', 'seeders', 'times_completed', 'views', 'size', 'cover', 'anonymous', 'approval_status', - 'pos_state_until', 'category' + 'pos_state_until', 'category', 'source', 'medium', 'codec', 'standard', 'processing', 'team', 'audiocodec', ]; public static $basicRelations = [