From 99c50fb348adeca6ed8beaa81ffdcadf0ca25846 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 15 Dec 2025 17:02:11 +0100 Subject: [PATCH] Make ResultViewDto immutable; add Root property Refactored ResultViewDto to use init-only properties for immutability. Added a new Root property of type OutResDto?. Included a using directive for ReC.Domain.Entities to support the new property. --- .../Common/Dto/ResultViewDto.cs | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/ReC.Application/Common/Dto/ResultViewDto.cs b/src/ReC.Application/Common/Dto/ResultViewDto.cs index 33d720c..49dd9c8 100644 --- a/src/ReC.Application/Common/Dto/ResultViewDto.cs +++ b/src/ReC.Application/Common/Dto/ResultViewDto.cs @@ -1,32 +1,36 @@ -namespace ReC.Application.Common.Dto; +using ReC.Domain.Entities; + +namespace ReC.Application.Common.Dto; public record ResultViewDto { - public long Id { get; set; } + public long Id { get; init; } + + public OutResDto? Root { get; init; } - public long? ActionId { get; set; } + public long? ActionId { get; init; } - public RecActionViewDto? Action { get; set; } + public RecActionViewDto? Action { get; init; } - public long? ProfileId { get; set; } + public long? ProfileId { get; init; } - public ProfileViewDto? Profile { get; set; } + public ProfileViewDto? Profile { get; init; } - public string? ProfileName { get; set; } + public string? ProfileName { get; init; } - public short? StatusCode { get; set; } + public short? StatusCode { get; init; } - public string? StatusName { get; set; } + public string? StatusName { get; init; } - public string? Header { get; set; } + public string? Header { get; init; } - public string? Body { get; set; } + public string? Body { get; init; } - public string? AddedWho { get; set; } + public string? AddedWho { get; init; } - public DateTime? AddedWhen { get; set; } + public DateTime? AddedWhen { get; init; } - public string? ChangedWho { get; set; } + public string? ChangedWho { get; init; } - public DateTime? ChangedWhen { get; set; } + public DateTime? ChangedWhen { get; init; } } \ No newline at end of file