初始化 MiGu.Server 项目,包含基本的 ASP.NET Core 8 配置、JWT 鉴权、RBAC 权限管理、YARP 反向代理及相关配置文件。新增 build-and-run 脚本以简化构建与运行流程,添加 README 文档以指导用户快速上手。
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace MiGu.Server.Configs;
|
||||
|
||||
public record FaultReportPolicy(bool Enabled, List<string> EmailTo);
|
||||
public record AutoRepairPolicy(bool Enabled, int CooldownSec);
|
||||
|
||||
public record VehicleMaintenancePolicy(
|
||||
double LowBatteryThreshold,
|
||||
double CriticalBatteryThreshold,
|
||||
FaultReportPolicy FaultReport,
|
||||
AutoRepairPolicy AutoRepair)
|
||||
{
|
||||
public static VehicleMaintenancePolicy Default() => new(
|
||||
LowBatteryThreshold: 0.3,
|
||||
CriticalBatteryThreshold: 0.15,
|
||||
FaultReport: new FaultReportPolicy(true, new List<string> { "ops@example.com" }),
|
||||
AutoRepair: new AutoRepairPolicy(false, 600));
|
||||
}
|
||||
Reference in New Issue
Block a user