<?php

namespace App\Models;

use App\Core\Model;

class FooterLinkModel extends Model
{
    protected string $table = 'footer_links';

    public function getByColumnId(int $columnId): array
    {
        $stmt = $this->db->prepare(
            "SELECT * FROM {$this->table} WHERE footer_column_id = :id ORDER BY urutan ASC"
        );
        $stmt->execute(['id' => $columnId]);

        return $stmt->fetchAll();
    }
}
