<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserSignDocument extends Model
{
    protected $table = 'user_sign_documents';
    protected $primaryKey = 'id_document';

    protected $fillable = [
        'fk_id_user',
        'file_name',
        'file_path',
        'deleted',
        'uploaded_at',
    ];

    public $timestamps = false;

    // Relación con el usuario
    // public function user()
    // {
    //     return $this->belongsTo(User::class, 'fk_id_user', 'id_user');
    // }

    // Scope para registros no eliminados
    public function scopeActive($query)
    {
        return $query->where('deleted', 0);
    }
}