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

part of '../../document_migration.dart';

/// Private implementation type for `_SchemaVersionRead` in this library.
/// It keeps supporting state and behavior scoped to the owning file so the public API stays focused on the scheduler concepts that callers use directly.
class _SchemaVersionRead {
  /// Creates a `_SchemaVersionRead.version` 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.
  const _SchemaVersionRead.version(this.version) : failure = null;

  /// Creates a `_SchemaVersionRead.failure` 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.
  const _SchemaVersionRead.failure(this.failure) : version = 0;

  /// Stores the `version` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final int version;

  /// Stores the `failure` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final String? failure;
}
