<?php

namespace App\Filament\Resources\BookingUserResource\Pages;

use App\Filament\Resources\BookingUserResource;
use App\Models\Booking;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
use Illuminate\Database\Eloquent\Builder;

class ListBookingUsers extends ListRecords
{
    protected static string $resource = BookingUserResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Actions\CreateAction::make(),
        ];
    }

    protected function getTableQuery(): Builder
    {
        return Booking::query()->where('user_id', auth()->id());
    }
}
