refactor: reorganize Application layer into folder structure
This commit is contained in:
29
src/GreenHome.Application/Dtos/Alert/AlertConditionDto.cs
Normal file
29
src/GreenHome.Application/Dtos/Alert/AlertConditionDto.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Domain = GreenHome.Domain;
|
||||
|
||||
namespace GreenHome.Application;
|
||||
|
||||
public sealed class AlertConditionDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int DeviceId { get; set; }
|
||||
public string DeviceName { get; set; } = string.Empty;
|
||||
public Domain.AlertNotificationType NotificationType { get; set; }
|
||||
public Domain.AlertTimeType TimeType { get; set; }
|
||||
public int CallCooldownMinutes { get; set; } = 60;
|
||||
public int SmsCooldownMinutes { get; set; } = 15;
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
public List<AlertRuleDto> Rules { get; set; } = new();
|
||||
}
|
||||
|
||||
public sealed class AlertRuleDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int AlertConditionId { get; set; }
|
||||
public Domain.SensorType SensorType { get; set; }
|
||||
public Domain.ComparisonType ComparisonType { get; set; }
|
||||
public decimal Value1 { get; set; }
|
||||
public decimal? Value2 { get; set; }
|
||||
public int Order { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user