namespace MiGu.Server.Configs; public record ScenarioTemplate(string Id, string Name, string Category, string Version, string BaselineJson); public record TemplateDslPolicy(bool Enabled, string SchemaVersion); public record LowCodePolicy(bool Enabled, string Editor); public record TemplateVersionPolicy(int KeepVersions, bool AllowRollback); public record ScenarioTemplateConfig( List Templates, TemplateDslPolicy DslPolicy, LowCodePolicy LowCode, TemplateVersionPolicy VersionPolicy) { public static ScenarioTemplateConfig Default() => new( Templates: new List { new("tpl-sps", "SPS 物料配送", "SPS", "1.0.0", "{}"), new("tpl-pack", "电池 Pack 自动化产线", "BatteryPack", "1.0.0", "{}"), new("tpl-loop", "环线运行", "Loop", "1.0.0", "{}"), new("tpl-p2p", "点对点柔性搬运", "P2P", "1.0.0", "{}") }, DslPolicy: new TemplateDslPolicy(true, "1"), LowCode: new LowCodePolicy(false, "json"), VersionPolicy: new TemplateVersionPolicy(10, true)); }