Add all files

This commit is contained in:
root
2025-11-30 11:57:22 +01:00
parent 2ee51cac4f
commit 044271db3d
1476 changed files with 142544 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
<?php
namespace Paymenter\Extensions\Others\SocialBase\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use App\Models\User;
class UserReport extends Model
{
protected $table = 'ext_social_user_reports';
protected $fillable = [
'reported_user_id',
'reported_by',
'reason',
'description',
'status',
'admin_notes',
'reviewed_by',
'reviewed_at',
];
protected $casts = [
'reviewed_at' => 'datetime',
];
/**
* Get the user being reported
*/
public function reportedUser(): BelongsTo
{
return $this->belongsTo(User::class, 'reported_user_id');
}
/**
* Get the user who made the report
*/
public function reporter(): BelongsTo
{
return $this->belongsTo(User::class, 'reported_by');
}
/**
* Get the user who reviewed the report
*/
public function reviewer(): BelongsTo
{
return $this->belongsTo(User::class, 'reviewed_by');
}
/**
* Scope for pending reports
*/
public function scopePending($query)
{
return $query->where('status', 'pending');
}
/**
* Scope for reviewed reports
*/
public function scopeReviewed($query)
{
return $query->where('status', 'reviewed');
}
}