2024-05-11 15:26:47 +02:00
|
|
|
using Serilog.Events;
|
|
|
|
|
|
|
|
namespace Foxchat.Core;
|
|
|
|
|
|
|
|
public class CoreConfig
|
|
|
|
{
|
|
|
|
public string Host { get; set; } = "localhost";
|
|
|
|
public int Port { get; set; } = 3000;
|
|
|
|
public bool Secure { get; set; } = false;
|
|
|
|
public string Domain { get; set; } = null!;
|
|
|
|
|
|
|
|
public string Address => $"{(Secure ? "https" : "http")}://{Host}:{Port}";
|
|
|
|
|
2024-05-22 02:31:05 +02:00
|
|
|
public LoggingConfig Logging { get; set; } = new();
|
2024-05-11 15:26:47 +02:00
|
|
|
public DatabaseConfig Database { get; set; } = new();
|
|
|
|
|
|
|
|
public class DatabaseConfig
|
|
|
|
{
|
|
|
|
public string Url { get; set; } = string.Empty;
|
|
|
|
public int? Timeout { get; set; }
|
|
|
|
public int? MaxPoolSize { get; set; }
|
|
|
|
}
|
2024-05-22 02:31:05 +02:00
|
|
|
|
|
|
|
public class LoggingConfig
|
|
|
|
{
|
|
|
|
public LogEventLevel LogEventLevel { get; set; } = LogEventLevel.Debug;
|
|
|
|
public string? SeqLogUrl { get; set; }
|
|
|
|
public bool LogQueries { get; set; } = false;
|
|
|
|
}
|
|
|
|
}
|