<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Mattiverse\Userstamps\Traits\Userstamps;
use OwenIt\Auditing\Contracts\Auditable;

class DenunciaSeguimiento extends Model implements Auditable
{
    use \OwenIt\Auditing\Auditable;
    use SoftDeletes, Userstamps;
    
    protected $fillable = [
        'denuncia_id',
        'user_id',
        'estado',
        'observacion',
        'visible_denunciante',
    ];

    protected $casts = [
        'visible_denunciante' => 'boolean',
    ];

    public function denuncia()
    {
        return $this->belongsTo(Denuncia::class);
    }

    public function usuario()
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}