version 2
This commit is contained in:
@@ -118,24 +118,88 @@ public sealed class DeviceSettingsDto
|
||||
public int DeviceId { get; set; }
|
||||
public string DeviceName { get; set; } = string.Empty;
|
||||
|
||||
// Temperature settings
|
||||
public decimal DangerMaxTemperature { get; set; }
|
||||
public decimal DangerMinTemperature { get; set; }
|
||||
public decimal MaxTemperature { get; set; }
|
||||
public decimal MinTemperature { get; set; }
|
||||
|
||||
// Gas settings
|
||||
public int MaxGasPPM { get; set; }
|
||||
public int MinGasPPM { get; set; }
|
||||
|
||||
// Light settings
|
||||
public decimal MaxLux { get; set; }
|
||||
public decimal MinLux { get; set; }
|
||||
|
||||
// Humidity settings
|
||||
public decimal MaxHumidityPercent { get; set; }
|
||||
public decimal MinHumidityPercent { get; set; }
|
||||
public string Province { get; set; } = string.Empty;
|
||||
public string City { get; set; } = string.Empty;
|
||||
public decimal? Latitude { get; set; }
|
||||
public decimal? Longitude { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
|
||||
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; }
|
||||
}
|
||||
|
||||
public sealed class CreateAlertConditionRequest
|
||||
{
|
||||
public required int DeviceId { get; set; }
|
||||
public required Domain.AlertNotificationType NotificationType { get; set; }
|
||||
public required Domain.AlertTimeType TimeType { get; set; }
|
||||
public int CallCooldownMinutes { get; set; } = 60;
|
||||
public int SmsCooldownMinutes { get; set; } = 15;
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
public required List<CreateAlertRuleRequest> Rules { get; set; }
|
||||
}
|
||||
|
||||
public sealed class CreateAlertRuleRequest
|
||||
{
|
||||
public required Domain.SensorType SensorType { get; set; }
|
||||
public required Domain.ComparisonType ComparisonType { get; set; }
|
||||
public required decimal Value1 { get; set; }
|
||||
public decimal? Value2 { get; set; }
|
||||
public int Order { get; set; }
|
||||
}
|
||||
|
||||
public sealed class UpdateAlertConditionRequest
|
||||
{
|
||||
public required int Id { get; set; }
|
||||
public required Domain.AlertNotificationType NotificationType { get; set; }
|
||||
public required Domain.AlertTimeType TimeType { get; set; }
|
||||
public int CallCooldownMinutes { get; set; } = 60;
|
||||
public int SmsCooldownMinutes { get; set; } = 15;
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
public required List<CreateAlertRuleRequest> Rules { get; set; }
|
||||
}
|
||||
|
||||
public sealed class DailyReportRequest
|
||||
{
|
||||
public required int DeviceId { get; set; }
|
||||
public required string PersianDate { get; set; } // yyyy/MM/dd
|
||||
}
|
||||
|
||||
public sealed class DailyReportResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int DeviceId { get; set; }
|
||||
public string DeviceName { get; set; } = string.Empty;
|
||||
public string PersianDate { get; set; } = string.Empty;
|
||||
public string Analysis { get; set; } = string.Empty;
|
||||
public int RecordCount { get; set; }
|
||||
public int SampledRecordCount { get; set; }
|
||||
public int TotalTokens { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public bool FromCache { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user