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

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

/// Shared V1 document field names.
abstract final class DocumentFields {
  /// Primary id field.
  static const id = '_id';

  /// Version of the document shape.
  static const schemaVersion = 'schemaVersion';

  /// Authorization-neutral owner scope.
  static const ownerId = 'ownerId';

  /// Optimistic-concurrency revision.
  static const revision = 'revision';

  /// Creation instant.
  static const createdAt = 'createdAt';

  /// Last update instant.
  static const updatedAt = 'updatedAt';

  /// Stable storage field for `common`.
  /// Keeping the key in one documented constant protects repository adapters, migrations, and tests from drifting string literals.
  static const common = <String>{
    schemaVersion,
    id,
    ownerId,
    revision,
    createdAt,
    updatedAt,
  };
}
