<?php

namespace App\Modelos;

use Core\Database;

class Fabricantes extends Database
{
    protected $table = 'app_fabricantes';
    protected $id = 'fa_id';

    public function obtenerFabricantes()
    {
        return $this->consultar('SELECT * FROM app_fabricantes')->all();
    }

    public function chequearForanea(int $id_fabricante)
    {
        return $this->consultar("SELECT * FROM app_productos WHERE pro_fabid=$id_fabricante")->row();
    }
}
