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

@@ -24,7 +24,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>
@@ -42,7 +42,7 @@ namespace ECMJobRunner.Domain.Entities
public short Sequence { get; set; } = 0;
/// <summary>
/// Optional name
/// Optional name (max 150 chars)
/// </summary>
[Column("NAME")]
[MaxLength(150)]
@@ -67,14 +67,14 @@ namespace ECMJobRunner.Domain.Entities
public string? ApiCommand { get; set; }
/// <summary>
/// Optional description
/// Optional description (max 500 chars)
/// </summary>
[Column("COMMENT")]
[MaxLength(500)]
public string? Comment { get; set; }
/// <summary>
/// Created by
/// Created by (max 50 chars)
/// </summary>
[Required]
[Column("ADDED_WHO")]
@@ -89,7 +89,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)]
@@ -106,6 +106,6 @@ namespace ECMJobRunner.Domain.Entities
/// <summary>
/// Associated Profile
/// </summary>
public virtual Profile Profile { get; set; } = null!;
public virtual CfgProfile? CfgProfile { get; set; }
}
}