Files
Migu2.0/backends/MiGu.Server/Configs/TrafficRule.cs
T
ArtoriasWu 87629a8537 调整 .gitignore 以适配 backends 目录结构
将 MiGu.Server 相关忽略规则迁移至 backends/MiGu.Server,并新增对 .tmp-build* 和 /.cursor/rules 的忽略,优化敏感数据与临时文件的管理。
2026-06-22 08:55:55 +08:00

17 lines
724 B
C#

namespace MiGu.Server.Configs;
public record IntersectionPolicy(string Id, List<string> SiteIds, string Mode);
public record ZoneMutex(string Id, List<string> ZoneIds);
public record DynamicYield(string Id, string From, string To, string Condition);
public record TrafficRule(
List<IntersectionPolicy> Intersections,
List<ZoneMutex> Mutex,
List<DynamicYield> Yields)
{
public static TrafficRule Default() => new(
Intersections: new List<IntersectionPolicy> { new("IX1", new List<string> { "S006", "S007" }, "mutex") },
Mutex: new List<ZoneMutex> { new("MZ1", new List<string> { "Z-CROSS" }) },
Yields: new List<DynamicYield> { new("YD1", "A 区", "B 区", "priority<peer") });
}