feat: 扩展领域模型与配置

This commit is contained in:
贺爱泽
2025-12-01 13:26:05 +08:00
parent a08804658b
commit 5ddad07658
148 changed files with 8519 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
using TakeoutSaaS.Domain.Analytics.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;
namespace TakeoutSaaS.Domain.Analytics.Entities;
/// <summary>
/// 指标告警规则。
/// </summary>
public sealed class MetricAlertRule : MultiTenantEntityBase
{
/// <summary>
/// 关联指标。
/// </summary>
public Guid MetricDefinitionId { get; set; }
/// <summary>
/// 触发条件 JSON。
/// </summary>
public string ConditionJson { get; set; } = string.Empty;
/// <summary>
/// 告警级别。
/// </summary>
public MetricAlertSeverity Severity { get; set; } = MetricAlertSeverity.Warning;
/// <summary>
/// 通知渠道。
/// </summary>
public string NotificationChannels { get; set; } = "email";
/// <summary>
/// 是否启用。
/// </summary>
public bool Enabled { get; set; } = true;
}