Add LogEntry and UserPreferences classes to LoggingService
This commit is contained in:
parent
b6d7183094
commit
3f2567803c
@ -6,10 +6,38 @@ using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using TransmissionRssManager.Core;
|
||||
|
||||
namespace TransmissionRssManager.Services
|
||||
{
|
||||
public class LogEntry
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime Timestamp { get; set; }
|
||||
public string Level { get; set; } = string.Empty;
|
||||
public string Message { get; set; } = string.Empty;
|
||||
public string Context { get; set; } = string.Empty;
|
||||
public string Properties { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class UserPreferences
|
||||
{
|
||||
public bool EnableDarkMode { get; set; } = false;
|
||||
public bool AutoRefreshUIEnabled { get; set; } = true;
|
||||
public int AutoRefreshIntervalSeconds { get; set; } = 30;
|
||||
public bool NotificationsEnabled { get; set; } = true;
|
||||
public List<string> NotificationEvents { get; set; } = new List<string>
|
||||
{
|
||||
"torrent-added",
|
||||
"torrent-completed",
|
||||
"torrent-error"
|
||||
};
|
||||
public string DefaultView { get; set; } = "dashboard";
|
||||
public bool ConfirmBeforeDelete { get; set; } = true;
|
||||
public int MaxItemsPerPage { get; set; } = 25;
|
||||
public string DateTimeFormat { get; set; } = "yyyy-MM-dd HH:mm:ss";
|
||||
public bool ShowCompletedTorrents { get; set; } = true;
|
||||
public int KeepHistoryDays { get; set; } = 30;
|
||||
}
|
||||
public interface ILoggingService
|
||||
{
|
||||
void Configure(UserPreferences preferences);
|
||||
|
Loading…
x
Reference in New Issue
Block a user