<?php

namespace App\Modelos;

use Core\Database;

class Series extends Database
{
    protected $table = 'app_series';
    protected $id = 'ser_id';

    public function obtenerSeries()
    {
        return $this->consultar("SELECT * FROM app_series se JOIN app_sucursales su ON se.ser_sucursal = su.su_id")->all();
    }

    public function chequearForanea($id)
    {
        return $this->consultar("SELECT * 
        FROM app_series s
        JOIN app_correlativos c ON c.cor_serid = s.ser_id
        WHERE s.ser_id=$id")->all();
    }
}
