feat(configmanager): add configuration models

This commit is contained in:
Joseph Doherty
2026-01-19 17:36:10 -05:00
parent 0e1bb6aa35
commit 4335286560
3 changed files with 147 additions and 0 deletions
@@ -0,0 +1,60 @@
namespace JdeScoping.ConfigManager.Models;
/// <summary>
/// Root model for pipelines.json configuration.
/// </summary>
public class PipelinesConfigModel
{
public PipelineSettings Settings { get; set; } = new();
public ScheduleDefaults ScheduleDefaults { get; set; } = new();
public Dictionary<string, PipelineModel> Pipelines { get; set; } = new();
}
public class PipelineSettings
{
public string Timezone { get; set; } = "UTC";
}
public class ScheduleDefaults
{
public ScheduleModel Mass { get; set; } = new() { Enabled = true, IntervalMinutes = 10080, PrePurge = true, ReIndex = true };
public ScheduleModel Daily { get; set; } = new() { Enabled = true, IntervalMinutes = 1440 };
public ScheduleModel Hourly { get; set; } = new() { Enabled = true, IntervalMinutes = 60 };
}
public class PipelineModel
{
public PipelineSource Source { get; set; } = new();
public PipelineSchedules Schedules { get; set; } = new();
public PipelineDestination Destination { get; set; } = new();
public string[]? PostScripts { get; set; }
}
public class PipelineSource
{
public string Connection { get; set; } = string.Empty;
public string Query { get; set; } = string.Empty;
public string? MassQuery { get; set; }
public Dictionary<string, ParameterDefinition> Parameters { get; set; } = new();
}
public class ParameterDefinition
{
public string Name { get; set; } = string.Empty;
public string? Format { get; set; }
public string? Source { get; set; }
}
public class PipelineSchedules
{
public ScheduleModel? Mass { get; set; }
public ScheduleModel? Daily { get; set; }
public ScheduleModel? Hourly { get; set; }
}
public class PipelineDestination
{
public string Table { get; set; } = string.Empty;
public string[] MatchColumns { get; set; } = [];
public string[] ExcludeFromUpdate { get; set; } = [];
}