<?php

declare(strict_types=1);

namespace CliqThemes\StoreLocator\Models;

defined('ABSPATH') || exit;

use CliqThemes\ORM\Model;
use CliqThemes\ORM\Relations\BelongsTo;

final class StoreHour extends Model
{
    protected string $table = 'cliq_sl_store_hours';

    protected string $primaryKey = 'id';

    protected bool $timestamps = false;

    protected array $fillable = [
        'id',
        'location_id',
        'day_of_week',
        'open_time',
        'close_time',
        'is_closed',
    ];

    public function location(): BelongsTo
    {
        return $this->belongsTo(Location::class, 'location_id', 'id');
    }
}
