You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Report (something objectionable spotted by a user)
|
|
|
|
*
|
|
|
|
* @property int $id
|
|
|
|
* @property \Carbon\Carbon $created_at
|
|
|
|
* @property \Carbon\Carbon $updated_at
|
|
|
|
* @property string $object_type
|
|
|
|
* @property int $object_id
|
|
|
|
* @property int $author_id
|
|
|
|
* @property string $message
|
|
|
|
* @property User $author
|
|
|
|
* @property mixed $object - morph
|
|
|
|
*/
|
|
|
|
class ContentReport extends Model
|
|
|
|
{
|
|
|
|
/** Authoring user */
|
|
|
|
public function author()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(User::class, 'author_id');
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Authoring user */
|
|
|
|
public function object()
|
|
|
|
{
|
|
|
|
return $this->morphTo();
|
|
|
|
}
|
|
|
|
}
|