3c728dd575
- Remove FetcherTypeName assignments from test fixtures in ScheduleCheckerTests and SyncOrchestratorTests - Remove PrepurgeData and ReIndexData assignments from MassConfig in tests - Mark FetcherTypeName, PostProcessorTypeName, PrepurgeData, and ReIndexData as obsolete with deprecation warnings pointing to pipelines.json - Change FetcherTypeName from required to optional to allow tests to compile without providing the deprecated property
87 lines
2.9 KiB
C#
87 lines
2.9 KiB
C#
namespace JdeScoping.DataSync.Options;
|
|
|
|
/// <summary>
|
|
/// Configuration for a single data source table sync.
|
|
/// </summary>
|
|
public class DataSourceConfig
|
|
{
|
|
/// <summary>
|
|
/// Target table name in SQL Server cache.
|
|
/// </summary>
|
|
public required string TableName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Source system: "JDE" or "CMS".
|
|
/// </summary>
|
|
public required string SourceSystem { get; set; }
|
|
|
|
/// <summary>
|
|
/// Source data identifier (e.g., "WORKORDER", "LOTUSAGE").
|
|
/// </summary>
|
|
public string SourceData { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Name of IDataFetcher implementation type (without generic suffix).
|
|
/// Deprecated: Will be removed in a future release.
|
|
/// </summary>
|
|
[Obsolete("FetcherTypeName is deprecated and will be removed. Use pipelines.json configuration instead.")]
|
|
public string? FetcherTypeName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Optional IPostProcessor implementation type name.
|
|
/// Deprecated: Will be removed in a future release.
|
|
/// </summary>
|
|
[Obsolete("PostProcessorTypeName is deprecated and will be removed. Use pipelines.json postScripts instead.")]
|
|
public string? PostProcessorTypeName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether this data source is enabled for sync.
|
|
/// </summary>
|
|
public bool IsEnabled { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Mass sync schedule configuration.
|
|
/// </summary>
|
|
public ScheduleConfig MassConfig { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Daily incremental sync configuration.
|
|
/// </summary>
|
|
public ScheduleConfig DailyConfig { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Hourly incremental sync configuration.
|
|
/// </summary>
|
|
public ScheduleConfig HourlyConfig { get; set; } = new();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Schedule configuration for a sync type (Mass/Daily/Hourly).
|
|
/// </summary>
|
|
public class ScheduleConfig
|
|
{
|
|
/// <summary>
|
|
/// Whether this schedule is enabled.
|
|
/// </summary>
|
|
public bool Enabled { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Interval in minutes between syncs.
|
|
/// </summary>
|
|
public int IntervalMinutes { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether to truncate the table before syncing (mass updates only).
|
|
/// Deprecated: Will be removed in a future release.
|
|
/// </summary>
|
|
[Obsolete("PrepurgeData is deprecated and will be removed. Use pipelines.json syncModes.prePurge instead.")]
|
|
public bool PrepurgeData { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Whether to rebuild indexes after syncing (mass updates only).
|
|
/// Deprecated: Will be removed in a future release.
|
|
/// </summary>
|
|
[Obsolete("ReIndexData is deprecated and will be removed. Use pipelines.json syncModes.reIndex instead.")]
|
|
public bool ReIndexData { get; set; } = false;
|
|
}
|