From 1960151f7792c8bb4deaa4bad6229d139e238ff0 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 1 Dec 2025 14:04:34 +0100 Subject: [PATCH] Add `Profile` entity class for database mapping Introduced a new `Profile` class in the `ReC.Domain.Entities` namespace to represent the `TBREC_CFG_PROFILE` table in the `dbo` schema. - Added Entity Framework annotations to map properties to database columns. - Defined properties for fields such as `Id`, `Active`, `Type`, `ProfileName`, `Description`, and others. - Used nullable types for all properties to allow null values. - Marked `Id` as the primary key with auto-generation enabled. This change enables ORM support for managing profile-related data. --- src/ReC.Domain/Entities/Profile.cs | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/ReC.Domain/Entities/Profile.cs diff --git a/src/ReC.Domain/Entities/Profile.cs b/src/ReC.Domain/Entities/Profile.cs new file mode 100644 index 0000000..3d42952 --- /dev/null +++ b/src/ReC.Domain/Entities/Profile.cs @@ -0,0 +1,47 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace ReC.Domain.Entities; + +[Table("TBREC_CFG_PROFILE", Schema = "dbo")] +public class Profile +{ + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Column("GUID")] + public short? Id { get; set; } + + [Column("ACTIVE")] + public bool? Active { get; set; } + + [Column("TYPE")] + public string? Type { get; set; } + + [Column("MANDANTOR")] + public string? Mandantor { get; set; } + + [Column("PROFILE_NAME")] + public string? ProfileName { get; set; } + + [Column("DESCRIPTION")] + public string? Description { get; set; } + + [Column("LOG_LEVEL")] + public string? LogLevel { get; set; } + + [Column("LANGUAGE")] + public string? Language { 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