// SPDX-FileCopyrightText: 2026 FocusFlow contributors
// SPDX-License-Identifier: AGPL-3.0-only

part of '../../application_management.dart';

/// Query result for the backlog surface.
class BacklogQueryResult {
  /// Creates a `BacklogQueryResult` instance with the values required by its invariants.
  /// Callers should pass already-normalized scheduler data because validation and defaulting belong at the model or service boundary, not in arbitrary UI code.
  BacklogQueryResult({
    required this.ownerId,
    required this.settings,
    required List<BacklogItemReadModel> items,
  }) : items = List<BacklogItemReadModel>.unmodifiable(items);

  /// Authorization-neutral owner scope.
  final String ownerId;

  /// Effective owner settings used by the query.
  final OwnerSettings settings;

  /// Filtered and sorted backlog rows.
  final List<BacklogItemReadModel> items;
}
