Implement creator studio and upload updates
This commit is contained in:
25
app/Services/Moderation/ModerationFeedbackService.php
Normal file
25
app/Services/Moderation/ModerationFeedbackService.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Moderation;
|
||||
|
||||
use App\Models\ContentModerationFeedback;
|
||||
use App\Models\ContentModerationFinding;
|
||||
use App\Models\User;
|
||||
|
||||
class ModerationFeedbackService
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed> $meta
|
||||
*/
|
||||
public function record(ContentModerationFinding $finding, string $feedbackType, ?User $actor = null, ?string $notes = null, array $meta = []): ContentModerationFeedback
|
||||
{
|
||||
return ContentModerationFeedback::query()->create([
|
||||
'finding_id' => $finding->id,
|
||||
'feedback_type' => $feedbackType,
|
||||
'actor_id' => $actor?->id,
|
||||
'notes' => $notes,
|
||||
'meta_json' => $meta,
|
||||
'created_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user