using LogCentral.Server.Models; namespace LogCentral.Server.Services; public interface ILogService { Task AddLogsAsync(List entries); Task GetLogByIdAsync(string id); Task> GetLogsAsync(LogQueryParams queryParams); Task> GetStatsAsync(string? app, string? env); Task ValidateApiKeyAsync(string apiKey); } public class LogQueryParams { public string? Search { get; set; } public string? Application { get; set; } public string? Environment { get; set; } public int? Level { get; set; } public DateTime? StartDate { get; set; } public DateTime? EndDate { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 50; } public class PagedResult { public List Items { get; set; } = new(); public int TotalCount { get; set; } public int Page { get; set; } public int PageSize { get; set; } public int TotalPages => (int)Math.Ceiling((double)TotalCount / PageSize); }