using System; using Svrnty.CQRS.Events.Configuration; namespace Svrnty.CQRS.Events.Configuration; /// /// Configuration options for read receipt tracking and cleanup. /// public class ReadReceiptOptions { /// /// Whether automatic cleanup of old read receipts is enabled. /// /// /// /// Default: true /// /// /// When enabled, a background service will periodically clean up old read receipts. /// Disable this if you want to manage cleanup manually. /// /// public bool EnableAutoCleanup { get; set; } = true; /// /// How often the cleanup service runs. /// /// /// /// Default: 1 hour /// /// /// Only applies when EnableAutoCleanup is true. /// /// public TimeSpan CleanupInterval { get; set; } = TimeSpan.FromHours(1); /// /// Maximum age of read receipts before they are deleted. /// /// /// /// Default: 30 days /// /// /// Read receipts older than this will be deleted during cleanup. /// Keep this long enough for monitoring and troubleshooting but short enough /// to prevent unbounded growth. /// /// public TimeSpan RetentionPeriod { get; set; } = TimeSpan.FromDays(30); }