<?php

namespace App\Modelos;

use Core\Database;

class TipoMotorServicio extends Database
{
    protected $table = 'app_planilla_tipomotor_servicios';
    protected $id = 'tipserv_id';

    public function obtenerTipoMotoresServicios()
    {
        return $this->consultar("SELECT tipserv_id, tip_id, tip_descripcion, cat_id, cat_categorias, pro_id, pro_precio, pro_descripcion
        FROM app_planilla_tipomotor_servicios ms
        JOIN app_tipo_motor m ON m.tip_id = ms.tipserv_tipid
        JOIN app_planillas_servicios s ON s.serv_id = ms.tipserv_servid
        JOIN app_planilla_categorias c ON c.cat_id = s.serv_catid
        JOIN app_productos p ON p.pro_id = s.serv_proid
        ORDER BY tip_descripcion")->all();
    }
}
