From 362182006056ab03077a33f5226b2e43a610fae3 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 15 Dec 2025 14:01:11 +0100 Subject: [PATCH] Refactor RecActionView Profile property; add ProfileViewDto Changed RecActionView.Profile to use ProfileView type instead of Profile entity. Added new ProfileViewDto class to represent profile data as a DTO, including related properties and audit fields. --- .../Common/Dto/ProfileViewDto.cs | 42 +++++++++++++++++++ src/ReC.Domain/Entities/RecActionView.cs | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/ReC.Application/Common/Dto/ProfileViewDto.cs diff --git a/src/ReC.Application/Common/Dto/ProfileViewDto.cs b/src/ReC.Application/Common/Dto/ProfileViewDto.cs new file mode 100644 index 0000000..006122f --- /dev/null +++ b/src/ReC.Application/Common/Dto/ProfileViewDto.cs @@ -0,0 +1,42 @@ +namespace ReC.Application.Common.Dto; + +public class ProfileViewDto +{ + public long Id { get; init; } + + public IEnumerable? RecActions { get; set; } + + public bool Active { get; init; } + + public byte TypeId { get; init; } + + public string? Type { get; init; } + + public string? Mandantor { get; init; } + + public string? ProfileName { get; init; } + + public string? Description { get; init; } + + public byte LogLevelId { get; init; } + + public string? LogLevel { get; init; } + + public short LanguageId { get; init; } + + public string? Language { get; init; } + + public string? AddedWho { get; init; } + + public DateTime AddedWhen { get; init; } + + public string? ChangedWho { get; init; } + + public DateTime? ChangedWhen { get; init; } + + public DateTime? FirstRun { get; init; } + + public DateTime? LastRun { get; init; } + + public string? LastResult { get; init; } +} diff --git a/src/ReC.Domain/Entities/RecActionView.cs b/src/ReC.Domain/Entities/RecActionView.cs index d5a53d9..26f247a 100644 --- a/src/ReC.Domain/Entities/RecActionView.cs +++ b/src/ReC.Domain/Entities/RecActionView.cs @@ -22,7 +22,7 @@ public class RecActionView public long? ProfileId { get; set; } [ForeignKey("ProfileId")] - public Profile? Profile { get; set; } + public ProfileView? Profile { get; set; } public string? ProfileName { get; set; }