Implement creator studio and upload updates

This commit is contained in:
2026-04-04 10:12:02 +02:00
parent 1da7d3bf88
commit 0b216b7ecd
15107 changed files with 31206 additions and 626514 deletions

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Enums;
enum ModerationSeverity: string
{
case Low = 'low';
case Medium = 'medium';
case High = 'high';
case Critical = 'critical';
public function label(): string
{
return match ($this) {
self::Low => 'Low',
self::Medium => 'Medium',
self::High => 'High',
self::Critical => 'Critical',
};
}
public function badgeClass(): string
{
return match ($this) {
self::Low => 'badge-light',
self::Medium => 'badge-warning',
self::High => 'badge-danger',
self::Critical => 'badge-dark text-white',
};
}
public static function fromScore(int $score): self
{
$thresholds = app('config')->get('content_moderation.severity_thresholds', [
'critical' => 90,
'high' => 60,
'medium' => 30,
]);
if ($score >= $thresholds['critical']) {
return self::Critical;
}
if ($score >= $thresholds['high']) {
return self::High;
}
if ($score >= $thresholds['medium']) {
return self::Medium;
}
return self::Low;
}
}