Files
xSaherElmAiApi/Models/XAiDocumentSession.cs
T
2026-10-25 17:58:05 +03:30

19 lines
616 B
C#

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; }
}
}