Refactor Profile entity and update property constraints

Renamed `Profile` to `CfgProfile` across the codebase for clarity and consistency. Updated property constraints in `CfgProfile.cs`, `ProfileHistory.cs`, and `ProfileSqlJob.cs` to include maximum length validations. Changed navigation properties in `CfgProfile.cs` to use `IEnumerable` and made them nullable. Updated `ForeignKey` attributes in `ProfileHistory.cs` and `ProfileSqlJob.cs` to reference `CfgProfile`. Improved property descriptions for better documentation.
This commit is contained in:
2026-07-09 13:23:46 +02:00
parent be8e58df84
commit ce47653831
3 changed files with 18 additions and 18 deletions

View File

@@ -25,7 +25,7 @@ namespace ECMJobRunner.Domain.Entities
/// </summary>
[Required]
[Column("FK_TBJR_CFG_PROFILE_ID")]
[ForeignKey(nameof(Profile))]
[ForeignKey(nameof(CfgProfile))]
public long ProfileId { get; set; }
/// <summary>
@@ -43,7 +43,7 @@ namespace ECMJobRunner.Domain.Entities
public string ResultText { get; set; } = string.Empty;
/// <summary>
/// Created by
/// Created by (max 50 chars)
/// </summary>
[Required]
[Column("ADDED_WHO")]
@@ -58,7 +58,7 @@ namespace ECMJobRunner.Domain.Entities
public DateTime AddedWhen { get; set; } = DateTime.Now;
/// <summary>
/// Modified by
/// Modified by (max 50 chars)
/// </summary>
[Column("CHANGED_WHO")]
[MaxLength(50)]
@@ -75,6 +75,6 @@ namespace ECMJobRunner.Domain.Entities
/// <summary>
/// Associated Profile
/// </summary>
public virtual Profile Profile { get; set; } = null!;
public virtual CfgProfile? CfgProfile { get; set; }
}
}