Save workspace changes
This commit is contained in:
29
.deploy/artwork-evolution-release/app/Models/PostReport.php
Normal file
29
.deploy/artwork-evolution-release/app/Models/PostReport.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class PostReport extends Model
|
||||
{
|
||||
protected $table = 'post_reports';
|
||||
|
||||
protected $fillable = [
|
||||
'post_id',
|
||||
'reporter_user_id',
|
||||
'reason',
|
||||
'message',
|
||||
'status',
|
||||
];
|
||||
|
||||
public function post(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Post::class);
|
||||
}
|
||||
|
||||
public function reporter(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'reporter_user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user