<?php

namespace App\Modelos;

use Core\Database;

class PlanillaOrdenDeEntrega extends Database
{
    protected $table = 'app_planilla_orden_de_entrega';
    protected $id = 'po_id';

    public function obtenerOrden(int $id_factura)
    {
        return $this->consultar("SELECT * FROM app_planilla_orden_de_entrega WHERE po_nid = $id_factura")->row();
    }

    public function obtenerOrdenPorIdPlanilla(int $id_planilla)
    {
        return $this->consultar("SELECT * FROM app_planilla_orden_de_entrega WHERE po_preid = $id_planilla")->row();
    }
}
