admin page phaze2

This commit is contained in:
2026-09-25 16:34:36 +03:30
parent 9d4ad26dcc
commit 6abb5aae15
19 changed files with 2847 additions and 6 deletions

View File

@@ -127,3 +127,77 @@ public sealed class UsageDayDto
public int AiQueryCount { get; set; }
public int AiTokenCount { get; set; }
}
// ==================== Alerts ====================
public sealed class AdminAlertFilter
{
public int? DeviceId { get; set; }
public Domain.AlertStatus? Status { get; set; }
public DateTime? From { get; set; }
public DateTime? To { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public sealed class AdminAlertItemDto
{
public int Id { get; set; }
public int DeviceId { get; set; }
public string DeviceName { get; set; } = string.Empty;
public string OwnerName { get; set; } = string.Empty;
public string Message { get; set; } = string.Empty;
public Domain.AlertNotificationType NotificationType { get; set; }
public Domain.AlertStatus Status { get; set; }
public string? ErrorMessage { get; set; }
public DateTime SentAt { get; set; }
}
// ==================== Posts ====================
public sealed class AdminPostFilter
{
public int? DeviceId { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public sealed class AdminPostItemDto
{
public int Id { get; set; }
public int DeviceId { get; set; }
public string DeviceName { get; set; } = string.Empty;
public string AuthorName { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public Domain.DevicePostType PostType { get; set; }
public int ImageCount { get; set; }
public DateTime CreatedAt { get; set; }
}
// ==================== Device Debug ====================
public sealed class AdminDeviceTestResultDto
{
public bool Success { get; set; }
public string Message { get; set; } = string.Empty;
}
// ==================== Audit Log ====================
public sealed class AdminAuditLogFilter
{
public int? AdminId { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public sealed class AdminAuditLogDto
{
public int Id { get; set; }
public int AdminUserId { get; set; }
public string AdminName { get; set; } = string.Empty;
public string Action { get; set; } = string.Empty;
public string TargetId { get; set; } = string.Empty;
public string Details { get; set; } = string.Empty;
public DateTime At { get; set; }
}