<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * @mixin IdeHelperReport
 */
class Report extends Model
{
    protected $fillable = [
        'listing_id',
        'user_id',
        'report_reason'
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function listing()
    {
        // Soft-delete edilen ilanın şikayeti listede kör kalmasın.
        return $this->belongsTo(Listing::class)->withTrashed();
    }

    
}
