This commit is contained in:
2026-10-25 17:58:05 +03:30
parent 429b97cded
commit 47d8a19423
5 changed files with 275 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
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<XAiVectorDto> Vectors { get; set; } = new List<XAiVectorDto>();
public bool IsExpired(DateTime utcNow) { return utcNow - LastAccessAtUtc >= Ttl; }
}
}