Refactor InsertObjectProcedure into entity-based regions

Organized properties into regions by target entity for clarity.
No functional changes; update improves code readability
and maintainability.
This commit is contained in:
2026-01-12 16:07:52 +01:00
parent bd4046a6c1
commit 1dee3180d5

View File

@@ -6,6 +6,8 @@ namespace ReC.Application.Common.Procedures;
public record InsertObjectProcedure : IRequest<long> public record InsertObjectProcedure : IRequest<long>
{ {
#region Common
/// <summary> /// <summary>
/// Target entity: ACTION, ENDPOINT, ENDPOINT_AUTH, ENDPOINT_PARAMS, PROFILE, RESULT /// Target entity: ACTION, ENDPOINT, ENDPOINT_AUTH, ENDPOINT_PARAMS, PROFILE, RESULT
/// </summary> /// </summary>
@@ -14,7 +16,10 @@ public record InsertObjectProcedure : IRequest<long>
public string? AddedWho { get; set; } public string? AddedWho { get; set; }
public DateTime? AddedWhen { get; set; } public DateTime? AddedWhen { get; set; }
// ACTION #endregion
#region ACTION
public long? ActionProfileId { get; set; } public long? ActionProfileId { get; set; }
public bool? ActionActive { get; set; } public bool? ActionActive { get; set; }
public byte? ActionSequence { get; set; } public byte? ActionSequence { get; set; }
@@ -29,12 +34,18 @@ public record InsertObjectProcedure : IRequest<long>
public string? ActionPostSql { get; set; } public string? ActionPostSql { get; set; }
public byte? ActionErrorActionId { get; set; } public byte? ActionErrorActionId { get; set; }
// ENDPOINT #endregion
#region ENDPOINT
public bool? EndpointActive { get; set; } public bool? EndpointActive { get; set; }
public string? EndpointDescription { get; set; } public string? EndpointDescription { get; set; }
public string? EndpointUri { get; set; } public string? EndpointUri { get; set; }
// ENDPOINT_AUTH #endregion
#region ENDPOINT_AUTH
public bool? EndpointAuthActive { get; set; } public bool? EndpointAuthActive { get; set; }
public string? EndpointAuthDescription { get; set; } public string? EndpointAuthDescription { get; set; }
public byte? EndpointAuthTypeId { get; set; } public byte? EndpointAuthTypeId { get; set; }
@@ -47,7 +58,10 @@ public record InsertObjectProcedure : IRequest<long>
public string? EndpointAuthDomain { get; set; } public string? EndpointAuthDomain { get; set; }
public string? EndpointAuthWorkstation { get; set; } public string? EndpointAuthWorkstation { get; set; }
// PROFILE #endregion
#region PROFILE
public bool? ProfileActive { get; set; } public bool? ProfileActive { get; set; }
public byte? ProfileTypeId { get; set; } public byte? ProfileTypeId { get; set; }
public string? ProfileMandantor { get; set; } public string? ProfileMandantor { get; set; }
@@ -56,19 +70,27 @@ public record InsertObjectProcedure : IRequest<long>
public byte? ProfileLogLevelId { get; set; } public byte? ProfileLogLevelId { get; set; }
public short? ProfileLanguageId { get; set; } public short? ProfileLanguageId { get; set; }
// RESULT #endregion
#region RESULT
public long? ResultActionId { get; set; } public long? ResultActionId { get; set; }
public short? ResultStatusId { get; set; } public short? ResultStatusId { get; set; }
public string? ResultHeader { get; set; } public string? ResultHeader { get; set; }
public string? ResultBody { get; set; } public string? ResultBody { get; set; }
// ENDPOINT_PARAMS #endregion
#region ENDPOINT_PARAMS
public bool? EndpointParamsActive { get; set; } public bool? EndpointParamsActive { get; set; }
public string? EndpointParamsDescription { get; set; } public string? EndpointParamsDescription { get; set; }
public short? EndpointParamsGroupId { get; set; } public short? EndpointParamsGroupId { get; set; }
public byte? EndpointParamsSequence { get; set; } public byte? EndpointParamsSequence { get; set; }
public string? EndpointParamsKey { get; set; } public string? EndpointParamsKey { get; set; }
public string? EndpointParamsValue { get; set; } public string? EndpointParamsValue { get; set; }
#endregion
} }
public class InsertObjectProcedureHandler(IRepository repo) : IRequestHandler<InsertObjectProcedure, long> public class InsertObjectProcedureHandler(IRepository repo) : IRequestHandler<InsertObjectProcedure, long>