<?php

namespace App\Modelos;

use Core\Database;

class VentasHistoricoEmail extends Database
{
    protected $table = 'app_ventas_historico_email';
    protected $id    = 'venhisemail_id';

    public function obtenerHistorico(int $id_fac)
    {
        return $this->consultar("SELECT * 
        FROM app_ventas_historico_email his
        JOIN app_empleados_info info ON info.einfo_id = his.venhisemail_empid
        WHERE venhisemail_idfac = $id_fac")->all();
    }
}
