<?php
/**
 * Model CatalogoPdf
 * Localização: /app/models/CatalogoPdf.php
 */
require_once APP_PATH . '/core/Model.php';

class CatalogoPdf extends Model
{
    protected string $table = 'catalogos_pdf';

    public function listar(): array
    {
        return $this->db->query("SELECT c.*, u.nome AS gerado_por_nome
                                 FROM catalogos_pdf c
                                 LEFT JOIN usuarios u ON u.id = c.gerado_por
                                 ORDER BY c.created_at DESC LIMIT 50")->fetchAll();
    }
}
