Implement creator studio and upload updates
This commit is contained in:
24
app/Contracts/Moderation/ModerationRuleInterface.php
Normal file
24
app/Contracts/Moderation/ModerationRuleInterface.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Contracts\Moderation;
|
||||
|
||||
interface ModerationRuleInterface
|
||||
{
|
||||
/**
|
||||
* Analyze the given content and return an array of findings.
|
||||
*
|
||||
* Each finding is an associative array with:
|
||||
* - 'rule' => string (rule identifier)
|
||||
* - 'score' => int (score contribution)
|
||||
* - 'reason' => string (human-readable reason)
|
||||
* - 'links' => array (matched URLs, if any)
|
||||
* - 'domains' => array (matched domains, if any)
|
||||
* - 'keywords' => array (matched keywords, if any)
|
||||
*
|
||||
* @param string $content The raw text content to analyze
|
||||
* @param string $normalized Lowercase/trimmed version for matching
|
||||
* @param array $context Optional metadata (user_id, artwork_id, content_type, etc.)
|
||||
* @return array<int, array>
|
||||
*/
|
||||
public function analyze(string $content, string $normalized, array $context = []): array;
|
||||
}
|
||||
Reference in New Issue
Block a user