From c33144ad7b25e60545150429b6c8ef12bda977da Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 25 Nov 2025 10:31:55 +0100 Subject: [PATCH] Add EndpointParam entity for database table mapping Introduced the `EndpointParam` class to represent the `TBREC_CFG_ENDPOINT_PARAMS` table in the database. - Added `using` directives for data annotations and table mapping. - Defined properties to map to table columns, all nullable for flexibility. - Annotated the class with `[Table]` and properties with `[Column]` attributes. - Marked `Guid` as the primary key using the `[Key]` attribute. - Documented the class with a summary explaining its purpose and design. This change facilitates ORM integration and ensures schema flexibility. --- src/ReC.Domain/Entities/EndpointParam.cs | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/ReC.Domain/Entities/EndpointParam.cs diff --git a/src/ReC.Domain/Entities/EndpointParam.cs b/src/ReC.Domain/Entities/EndpointParam.cs new file mode 100644 index 0000000..da3c2df --- /dev/null +++ b/src/ReC.Domain/Entities/EndpointParam.cs @@ -0,0 +1,47 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ReC.Domain.Entities; + +/// +/// Represents the TBREC_CFG_ENDPOINT_PARAMS table. +/// All properties are nullable to provide flexibility on the database side, +/// preventing breaking changes if columns are altered to be nullable in production. +/// +[Table("TBREC_CFG_ENDPOINT_PARAMS", Schema = "dbo")] +public class EndpointParam +{ + [Key] + [Column("GUID")] + public long? Guid { get; set; } + + [Column("ACTIVE")] + public bool? Active { get; set; } + + [Column("DESCRIPTION")] + public string? Description { get; set; } + + [Column("GROUP_ID")] + public short? GroupId { get; set; } + + [Column("SEQUENCE")] + public byte? Sequence { get; set; } + + [Column("KEY")] + public string? Key { get; set; } + + [Column("VALUE")] + public string? Value { get; set; } + + [Column("ADDED_WHO")] + public string? AddedWho { get; set; } + + [Column("ADDED_WHEN")] + public DateTime? AddedWhen { get; set; } + + [Column("CHANGED_WHO")] + public string? ChangedWho { get; set; } + + [Column("CHANGED_WHEN")] + public DateTime? ChangedWhen { get; set; } +} \ No newline at end of file