// ============================================================================= // GB5 Framework — ReportServerConfigDTO // Namespace : GB5Shared.DTO.ReportOrchestration // Purpose : Lightweight resolved configuration for a single database target. // Populated by IReportConnectionResolver from MSERVERCONFIG rows. // Never contains plaintext passwords in transit — only used // server-side within the connection resolver. // ============================================================================= using GB5Shared.Enums.ReportOrchestration; namespace GB5Shared.DTO.ReportOrchestration { /// /// Resolved database server configuration for one DataSourceType. /// Built from MSERVERCONFIG by . /// One instance per DataSourceType (OLTP / ReportDB / ArchiveDB). /// public sealed class ReportServerConfigDTO { /// /// The MSERVERCONFIG.SERVERCONFIGID for this database target. /// -1 indicates no separate config exists; fall back to OLTP. /// public int ServerConfigId { get; init; } /// /// The RDBMS provider type. Drives which IDbConnection is instantiated. /// Sourced from MSERVERCONFIG.DATABASETYPE. /// public DatabaseProviderType ProviderType { get; init; } /// /// Fully formed connection string for this database target. /// Built by the resolver from MSERVERCONFIG fields. /// Never logged, never serialised to client. /// public string ConnectionString { get; init; } = string.Empty; /// /// The physical database/catalog name. /// Sourced from MSERVERCONFIG.DATABASENAME. /// public string DatabaseName { get; init; } = string.Empty; /// /// Whether this config is a genuine separate DB or a fallback /// to the OLTP connection (when REPORTSERVERCONFIGID / /// ARCHIVESERVERCONFIGID = -1). /// When true, NOLOCK hints and read-optimised settings are applied. /// public bool IsDedicatedAnalyticsDb { get; init; } /// /// The DataSourceType this config was resolved for. /// Used for diagnostic logging. /// public DataSourceType ResolvedDataSource { get; init; } } }