MireaBackend/Endpoint/Properties/Settings.cs

36 lines
939 B
C#

using Mirea.Api.DataAccess.Persistence.Properties;
namespace Mirea.Api.Endpoint.Properties;
public class EmailSettings
{
public string? Server { get; set; }
public string? User { get; set; }
public string? Password { get; set; }
public string? From { get; set; }
public int? Port { get; set; }
public bool? Ssl { get; set; }
}
public class LogSettings
{
public bool EnableLogToFile { get; set; }
public string? LogFilePath { get; set; }
public string? LogFileName { get; set; }
}
public class ScheduleSettings
{
// Every 6 hours
public string CronUpdateSchedule { get; set; } = "0 0 0/6 * * *";
}
public class Settings
{
public const string FilePath = "Settings.json";
public EmailSettings? EmailSettings { get; set; }
public LogSettings? LogSettings { get; set; }
public DbSettings? DbSettings { get; set; }
public ScheduleSettings? ScheduleSettings { get; set; }
}