*/ final readonly class HasAutoUpdatedPickupExceptionsForYearQuery implements Query { /** * @param \App\Cqs\Queries\PickupExceptions\HasAutoUpdatedPickupExceptionsForYearQueryInput $input */ #[\Override] public function __invoke(QueryInput $input): bool { Assert::isInstanceOf($input, HasAutoUpdatedPickupExceptionsForYearQueryInput::class); return PickupException::query() ->whereYear('date', $input->year) ->where('auto_updated', true) ->exists(); } }