Rename ActionId to Id across the codebase

Updated the `ActionId` property to `Id` in `RecActionDto`
and `RecAction` classes for consistency. Reflected this
change in all relevant files, including log messages,
property assignments, and database column mappings.
Standardized naming conventions to improve code clarity
and maintainability.
This commit is contained in:
tekh 2025-12-01 12:30:57 +01:00
parent dc777a04f6
commit de17d398ff
5 changed files with 10 additions and 10 deletions

View File

@ -19,7 +19,7 @@ public class HeaderQueryBehavior<TRecAction>(IRecDbContext dbContext, ILogger<He
if (result?.RawHeader is null)
{
logger?.LogWarning("Header query did not return a result or returned a null REQUEST_HEADER. Profile ID: {ProfileId}, Action ID: {ActionId}", action.ProfileId, action.ActionId);
logger?.LogWarning("Header query did not return a result or returned a null REQUEST_HEADER. Profile ID: {ProfileId}, Action ID: {Id}", action.ProfileId, action.Id);
return await next(cancel);
}
@ -29,8 +29,8 @@ public class HeaderQueryBehavior<TRecAction>(IRecDbContext dbContext, ILogger<He
if(headerDict is null)
{
logger?.LogWarning(
"Header JSON deserialization returned null. RawHeader: {RawHeader}, ProfileId: {ProfileId}, ActionId: {ActionId}",
result.RawHeader, action.ProfileId, action.ActionId);
"Header JSON deserialization returned null. RawHeader: {RawHeader}, ProfileId: {ProfileId}, Id: {Id}",
result.RawHeader, action.ProfileId, action.Id);
return await next(cancel);
}

View File

@ -2,7 +2,7 @@
public record RecActionDto
{
public required long ActionId { get; init; }
public required long Id { get; init; }
public long? ProfileId { get; init; }

View File

@ -33,9 +33,9 @@ public class InvokeRecActionsCommandHandler(ISender sender, IHttpClientFactory c
{
logger?.LogError(
ex,
"Error invoking Rec action. ProfileId: {ProfileId}, ActionId: {ActionId}",
"Error invoking Rec action. ProfileId: {ProfileId}, Id: {Id}",
action.ProfileId,
action.ActionId
action.Id
);
}
finally

View File

@ -33,9 +33,9 @@ public class InvokeRecActionCommandHandler(
if (action.RestType is null)
{
logger?.LogWarning(
"Rec action could not be invoked because the RestType value is null. ProfileId: {ProfileId}, ActionId: {ActionId}",
"Rec action could not be invoked because the RestType value is null. ProfileId: {ProfileId}, Id: {Id}",
action.ProfileId,
action.ActionId
action.Id
);
return;
}
@ -60,7 +60,7 @@ public class InvokeRecActionCommandHandler(
await sender.Send(new CreateOutResCommand
{
ActionId = action.ActionId,
ActionId = action.Id,
Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }),
Body = resBody,
AddedWho = config?["AddedWho"]

View File

@ -15,7 +15,7 @@ namespace ReC.Domain.Entities;
public class RecAction
{
[Column("ACTION_ID")]
public required long ActionId { get; set; }
public required long Id { get; set; }
[Column("PROFILE_ID")]
public long? ProfileId { get; set; }