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

part of '../../persistence_memory.dart';

/// Private implementation type for `_SnapshotRecord` 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.
final class _SnapshotRecord implements _IdentifiedRecord {
  /// Creates a `_SnapshotRecord` 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.
  _SnapshotRecord({
    required this.id,
    required this.ownerId,
    required this.value,
    required this.revision,
    required this.retentionExpiresAt,
  });

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

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

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

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

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