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
@@ -1,5 +1,3 @@
using JdeScoping.Core.ApiContracts.Auth;
namespace JdeScoping.Core.Models.Auth;
/// <summary>
@@ -0,0 +1,52 @@
namespace JdeScoping.Core.Models.Auth;
/// <summary>
/// API response DTO for authenticated user information.
/// </summary>
public record UserInfoDto
{
/// <summary>
/// User's login username.
/// </summary>
public string Username { get; init; } = string.Empty;
/// <summary>
/// User's first name.
/// </summary>
public string FirstName { get; init; } = string.Empty;
/// <summary>
/// User's last name.
/// </summary>
public string LastName { get; init; } = string.Empty;
/// <summary>
/// User's display name (computed on server).
/// </summary>
public string DisplayName { get; init; } = string.Empty;
/// <summary>
/// User's organization title.
/// </summary>
public string Title { get; init; } = string.Empty;
/// <summary>
/// User's email address.
/// </summary>
public string EmailAddress { get; init; } = string.Empty;
/// <summary>
/// Creates a UserInfoDto from a UserInfo entity.
/// </summary>
/// <param name="userInfo">The UserInfo entity to convert.</param>
/// <returns>A new UserInfoDto instance.</returns>
public static UserInfoDto FromUserInfo(UserInfo userInfo) => new()
{
Username = userInfo.Username,
FirstName = userInfo.FirstName,
LastName = userInfo.LastName,
DisplayName = userInfo.DisplayName,
Title = userInfo.Title,
EmailAddress = userInfo.EmailAddress
};
}