using System.Text.Json;

namespace AuthorBuddy.Web.Models
{
    public class LLM_Model
    {
   

        public LLM_Model(JsonElement model)
        {
            if (model.TryGetProperty("name", out var name))
            {
                 Name = name.GetString() ?? "" ;
            }
            if (model.TryGetProperty("size", out var size))
            {
                Size = size.GetInt64();
            }
            if (model.TryGetProperty("modified_at", out var modified))
            {
                ModifiedAt = modified.GetDateTime();
            }
        }

        public string Name { get; set; } = string.Empty;
        public long Size { get; set; }
        public DateTime? ModifiedAt { get; set; }

    }
}
