Files
Migu2.0/MiGu.Server/Configs/FleetLifecycleConfig.cs
T
zhaowei.huangandCursor 42978930ca feat: 迁入 MiGu.Server、平台前端与车辆列表 reflection 回退
从 Simple-FR 拆出 Platform.Server 并重命名为 MiGu.Server;frontends 源码与构建脚本迁入本仓库。地图监控在 projection/cars 失败或为空时回退 reflection 车辆列表;Simple 仓库已移除旧 Platform.Server。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 18:16:34 +08:00

24 lines
952 B
C#

namespace MiGu.Server.Configs;
public record FleetGroup(string Id, string Name, string Floor, string Region, List<string> CarIds);
public record OtaPolicy(bool Enabled, int BatchSize, bool RollbackOnFail);
public record BatchOpsPolicy(bool ConfirmationRequired, int MaxBatch);
public record NetworkDiagPolicy(int RttThresholdMs, double PacketLossThreshold);
public record FleetLifecycleConfig(
List<FleetGroup> Groups,
OtaPolicy Ota,
BatchOpsPolicy BatchOps,
NetworkDiagPolicy NetworkDiag)
{
public static FleetLifecycleConfig Default() => new(
Groups: new List<FleetGroup>
{
new("G-A", "A 区车队", "F1", "A", new List<string> { "C01", "C02", "C03" }),
new("G-B", "B 区车队", "F1", "B", new List<string> { "C04", "C05" })
},
Ota: new OtaPolicy(true, 2, true),
BatchOps: new BatchOpsPolicy(true, 10),
NetworkDiag: new NetworkDiagPolicy(80, 0.02));
}