Add table mappings and navigation property updates

Added `[Table]` attributes to `Connection`, `Endpoint`, `EndpointAuth`, and `Profile` classes to define database table mappings. Updated `Profile` with schema information.

Introduced a `Profile` navigation property in `RecAction` with a `[ForeignKey]` attribute to establish a relationship with the `Profile` entity. Temporarily marked it as `[NotMapped]` due to a foreign key type mismatch, with a `TODO` to resolve this in the future.

Included `System.ComponentModel.DataAnnotations.Schema` in `using` directives to support these changes.
This commit is contained in:
tekh 2025-12-03 11:15:07 +01:00
parent 2c005c35fb
commit 23ccd44bd6
5 changed files with 6 additions and 8 deletions

View File

@ -1,5 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.Entities;

View File

@ -1,5 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.Entities;

View File

@ -1,5 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.Entities;

View File

@ -1,5 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.Entities;

View File

@ -13,6 +13,8 @@ public class RecAction
[Column("PROFILE_ID")]
public long? ProfileId { get; set; }
// TODO: Remove [NotMapped] once ProfileId FK type mismatch is resolved.
[NotMapped]
[ForeignKey("ProfileId")]
public Profile? Profile { get; set; }