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

part of '../../persistence_contract.dart';

/// Wall-time storage convention for future document persistence.
abstract final class PersistenceWallTimeConvention {
  /// Human-readable convention kept close to the helper for tests and docs.
  static const description =
      'Store WallTime values as HH:MM strings without date or timezone data.';

  /// Convert a WallTime into the persisted string convention.
  static String toStoredString(WallTime value) {
    return value.toIsoString();
  }

  /// Parse a persisted WallTime string without applying a date or timezone.
  static WallTime fromStoredString(String value) {
    return WallTime.fromIsoString(value);
  }
}
