Auth: convert auth views and verification email to Nova layout
This commit is contained in:
40
app/Models/ForumPostReport.php
Normal file
40
app/Models/ForumPostReport.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ForumPostReport extends Model
|
||||
{
|
||||
protected $table = 'forum_post_reports';
|
||||
|
||||
protected $fillable = [
|
||||
'post_id',
|
||||
'thread_id',
|
||||
'reporter_user_id',
|
||||
'reason',
|
||||
'status',
|
||||
'source_url',
|
||||
'reported_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'reported_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function post(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ForumPost::class, 'post_id');
|
||||
}
|
||||
|
||||
public function thread(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ForumThread::class, 'thread_id');
|
||||
}
|
||||
|
||||
public function reporter(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'reporter_user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user