namespace Prefab.Handler;
///
/// Represents contextual information about the current request and user for use in request handling and logging.
///
/// This record is typically used to pass request-scoped metadata through application layers, enabling
/// consistent logging, tracing, and idempotency handling. All properties are optional and may be null if the
/// corresponding information is unavailable.
/// The unique identifier of the user associated with the request, or null if the user is unauthenticated.
/// The unique identifier for the current request, used for tracing and diagnostics. Can be null if not set.
/// The identifier used to correlate this request with related operations across services or components. Can be null if
/// not set.
/// A key that uniquely identifies the request for idempotency purposes, allowing safe retries. Can be null if
/// idempotency is not required.
public sealed record HandlerContext(
string? UserId,
string? RequestId,
string? CorrelationId,
string? IdempotencyKey);