MireaBackend/Endpoint/Configuration/General/Settings/DbSettings.cs

22 lines
553 B
C#
Raw Normal View History

using Mirea.Api.Endpoint.Configuration.General.Attributes;
using Mirea.Api.Endpoint.Configuration.General.Interfaces;
namespace Mirea.Api.Endpoint.Configuration.General.Settings;
[RequiredSettings]
public class DbSettings : IIsConfigured
{
public enum DatabaseEnum
{
Mysql,
Sqlite,
PostgresSql
}
public DatabaseEnum TypeDatabase { get; set; }
public required string ConnectionStringSql { get; set; }
public bool IsConfigured()
{
return !string.IsNullOrEmpty(ConnectionStringSql);
}
}