From b86d0c0f994a4896a24df8a332ed10b99bd4eacf Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 26 Mar 2026 10:28:52 +0100 Subject: [PATCH] Add [Column] mapping attributes to query result classes Added [Column] attributes to properties in BodyQueryResult, HeaderQueryResult, and InsertObjectResult to explicitly map them to their respective database columns. Also included necessary using directives for DataAnnotations.Schema to support these mappings. This enhances ORM compatibility and ensures correct property-to-column mapping. --- src/ReC.Domain/QueryOutput/BodyQueryResult.cs.cs | 5 ++++- src/ReC.Domain/QueryOutput/HeaderQueryResult.cs | 5 ++++- src/ReC.Domain/QueryOutput/InsertObjectResult.cs | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ReC.Domain/QueryOutput/BodyQueryResult.cs.cs b/src/ReC.Domain/QueryOutput/BodyQueryResult.cs.cs index ee2c692..1ff4d82 100644 --- a/src/ReC.Domain/QueryOutput/BodyQueryResult.cs.cs +++ b/src/ReC.Domain/QueryOutput/BodyQueryResult.cs.cs @@ -1,6 +1,9 @@ -namespace ReC.Domain.QueryOutput; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ReC.Domain.QueryOutput; public class BodyQueryResult { + [Column("REQUEST_BODY")] public string? RawBody { get; init; } } \ No newline at end of file diff --git a/src/ReC.Domain/QueryOutput/HeaderQueryResult.cs b/src/ReC.Domain/QueryOutput/HeaderQueryResult.cs index ed4fd91..85a3609 100644 --- a/src/ReC.Domain/QueryOutput/HeaderQueryResult.cs +++ b/src/ReC.Domain/QueryOutput/HeaderQueryResult.cs @@ -1,6 +1,9 @@ -namespace ReC.Domain.QueryOutput; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ReC.Domain.QueryOutput; public class HeaderQueryResult { + [Column("REQUEST_HEADER")] public string? RawHeader { get; init; } } diff --git a/src/ReC.Domain/QueryOutput/InsertObjectResult.cs b/src/ReC.Domain/QueryOutput/InsertObjectResult.cs index cc90fd7..824759d 100644 --- a/src/ReC.Domain/QueryOutput/InsertObjectResult.cs +++ b/src/ReC.Domain/QueryOutput/InsertObjectResult.cs @@ -4,5 +4,6 @@ namespace ReC.Domain.QueryOutput; public class InsertObjectResult { + [Column("oGUID")] public required long NewObjectId { get; set; } }