初始化 MiGu.Server 项目,包含基本的 ASP.NET Core 8 配置、JWT 鉴权、RBAC 权限管理、YARP 反向代理及相关配置文件。新增 build-and-run 脚本以简化构建与运行流程,添加 README 文档以指导用户快速上手。
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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));
|
||||
}
|
||||
Reference in New Issue
Block a user