using System; using xAiModels.Models.Dtos; using System.Collections.Generic; namespace xAiApi.Models { public class XAiDocumentSession { public Guid Id { get; set; } public TimeSpan Ttl { get; set; } public string OwnerId { get; set; } public DateTime CreatedAtUtc { get; set; } public DateTime LastAccessAtUtc { get; set; } internal object SyncRoot { get; } = new object(); public IList Vectors { get; set; } = new List(); public bool IsExpired(DateTime utcNow) { return utcNow - LastAccessAtUtc >= Ttl; } } }