<?php
declare(strict_types=1);

namespace App\Modules\SportsActivity\Models;

use App\Core\Model;

class GroupSchedule extends Model
{
    protected static string $table = 'sa_group_schedule';
    protected static string $primaryKey = 'id';
    protected static bool $timestamps = true;
    protected static bool $softDelete = false;
    protected static bool $dispatchEvents = true;

    protected static array $fillable = [
        'group_id', 'facility_unit_id', 'day_of_week',
        'start_time', 'end_time', 'is_active',
    ];

    public static function getDayName(int $dayNum): string
    {
        $days = [
            0 => 'الأحد',
            1 => 'الاثنين',
            2 => 'الثلاثاء',
            3 => 'الأربعاء',
            4 => 'الخميس',
            5 => 'الجمعة',
            6 => 'السبت',
        ];

        return $days[$dayNum] ?? '';
    }
}
