refactor(core): reorganize DTOs into Models and ViewModels folders

Move DTOs from ApiContracts to appropriate locations:
- SignalR DTOs → ViewModels (renamed Dto→ViewModel suffix)
- Pipeline DTOs → Models/Pipelines
- UserInfoDto → Models/Auth
- DataUpdateDto → Models/Infrastructure
This commit is contained in:
Joseph Doherty
2026-01-19 00:34:57 -05:00
parent 7e36bb4225
commit 0c8657713b
36 changed files with 166 additions and 88 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
using JdeScoping.Core.ApiContracts.SignalR;
using JdeScoping.Core.ViewModels;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
@@ -9,7 +9,7 @@ namespace JdeScoping.Api.Hubs;
/// </summary>
public class StatusHub : Hub
{
private static StatusUpdateDto _cachedStatus = new()
private static StatusUpdateViewModel _cachedStatus = new()
{
Message = "Unknown",
Timestamp = DateTime.UtcNow
@@ -27,7 +27,7 @@ public class StatusHub : Hub
/// Caches the update and broadcasts to all clients.
/// </summary>
/// <param name="statusUpdate">Status update to broadcast</param>
public async Task SetStatus(StatusUpdateDto statusUpdate)
public async Task SetStatus(StatusUpdateViewModel statusUpdate)
{
_cachedStatus = statusUpdate;
await Clients.All.SendAsync("statusUpdate", statusUpdate);
@@ -38,7 +38,7 @@ public class StatusHub : Hub
/// Called by clients to get initial cached status on connection.
/// </summary>
/// <returns>The most recent status update</returns>
public StatusUpdateDto GetCachedStatus()
public StatusUpdateViewModel GetCachedStatus()
{
return _cachedStatus;
}
@@ -47,7 +47,7 @@ public class StatusHub : Hub
/// Called by controllers/services to broadcast search updates.
/// </summary>
/// <param name="searchUpdate">Search update to broadcast</param>
public async Task PublishSearchUpdate(SearchUpdateDto searchUpdate)
public async Task PublishSearchUpdate(SearchUpdateViewModel searchUpdate)
{
await Clients.All.SendAsync("searchUpdate", searchUpdate);
_logger.LogDebug("Search update published: ID={Id}, Status={Status}", searchUpdate.Id, searchUpdate.Status);