<?php

namespace App\Models;

/**
 * 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 mixed $object - morph
 * @property-read User $author
 */
class ContentReport extends BaseModel
{
    protected $guarded = [];

    /** Authoring user */
    public function author()
    {
        return $this->belongsTo(User::class, 'author_id');
    }

    /** Authoring user */
    public function object()
    {
        return $this->morphTo();
    }
}