<?php
/// file: app/Models/Career.php

declare(strict_types=1);

namespace App\Models;

use App\Core\Model;
use PDO;

final class Career extends Model
{
    protected static function table(): string
    {
        return 'careers';
    }

    /** @return list<array<string, mixed>> */
    public static function openRoles(): array
    {
        $st = self::pdo()->prepare('SELECT * FROM careers WHERE status = ? ORDER BY sort_order ASC, id ASC');
        $st->execute(['open']);
        return $st->fetchAll(PDO::FETCH_ASSOC) ?: [];
    }
}
