using Microsoft.Extensions.DependencyInjection;
// ReSharper disable once CheckNamespace
namespace Elsa.Persistence.EFCore;
///
/// Represents shared persistence settings that can be cascaded to dependent persistence features.
/// When a combined persistence feature (e.g., SqliteWorkflowPersistence) is configured,
/// it can register these shared settings that individual features will use as defaults.
///
public class SharedPersistenceSettings
{
///
/// Gets or sets the connection string to use for the database.
///
public string? ConnectionString { get; set; }
///
/// Gets or sets additional options to configure the database context.
///
public ElsaDbContextOptions? DbContextOptions { get; set; }
///
/// Gets or sets a value indicating whether to use context pooling.
///
public bool? UseContextPooling { get; set; }
///
/// Gets or sets a value indicating whether to run migrations.
///
public bool? RunMigrations { get; set; }
///
/// Gets or sets the lifetime of the DbContextFactory.
///
public ServiceLifetime? DbContextFactoryLifetime { get; set; }
}