<?php

namespace App\Modelos;

use Core\Database;

class Documentos extends Database
{
    protected $table = 'app_documentos';
    protected $id = 'doc_id';

    public function documentosActivos()
    {
        return $this->consultar("SELECT * FROM app_documentos WHERE doc_estatus=1")->all();
    }

    public function documentosForaneo($id)
    {
        return $this->consultar("SELECT * 
        FROM app_documentos d
        JOIN app_correlaticvos c ON d.doc_id = c.cor_docid
        WHERE doc_id=$id")->all();
    }
}
