Add ECMJobRunner.Domain entities and documentation

Introduced the `ECMJobRunner.Domain` project to support both
.NET Framework 4.8 and .NET 8.0. Added `Profile`,
`ProfileSqlJob`, and `ProfileHistory` entities to map to the
database schema, including relationships and audit fields.

Updated `ECMJobRunner.Domain.csproj` to enable multi-targeting
and added dependencies for Entity Framework 6.5.1 and EF Core
8.0.11. Enabled nullable reference types and set the language
version to `latest`.

Added comprehensive documentation in `AGENTS.md` detailing the
project structure, entities, database schema, and build
instructions.
This commit is contained in:
2026-07-09 12:45:09 +02:00
parent 26dc58d82e
commit be8e58df84
5 changed files with 449 additions and 1 deletions

View File

@@ -0,0 +1,111 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ECMJobRunner.Domain.Entities
{
/// <summary>
/// SQL Job Configuration for Profile
/// Represents individual SQL jobs within a job runner profile
/// </summary>
[Table("TBJR_CFG_PROFILE_SQLJOB", Schema = "dbo")]
public class ProfileSqlJob
{
/// <summary>
/// Primary Key
/// </summary>
[Key]
[Column("PK_TBJR_CFG_PROFILE_SQLJOB_ID")]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
/// <summary>
/// Foreign Key to Profile
/// </summary>
[Required]
[Column("FK_TBJR_CFG_PROFILE_ID")]
[ForeignKey(nameof(Profile))]
public long ProfileId { get; set; }
/// <summary>
/// Active / Inactive switch
/// </summary>
[Required]
[Column("ACTIVE")]
public bool Active { get; set; } = true;
/// <summary>
/// Sequence order within the profile
/// </summary>
[Required]
[Column("SEQUENCE")]
public short Sequence { get; set; } = 0;
/// <summary>
/// Optional name
/// </summary>
[Column("NAME")]
[MaxLength(150)]
public string? Name { get; set; }
/// <summary>
/// SQL Check Query
/// </summary>
[Column("SQL_CHECK_QUERY")]
public string? SqlCheckQuery { get; set; }
/// <summary>
/// SQL Main Query
/// </summary>
[Column("SQL_MAIN_QUERY")]
public string? SqlMainQuery { get; set; }
/// <summary>
/// API Command
/// </summary>
[Column("API_COMMAND")]
public string? ApiCommand { get; set; }
/// <summary>
/// Optional description
/// </summary>
[Column("COMMENT")]
[MaxLength(500)]
public string? Comment { get; set; }
/// <summary>
/// Created by
/// </summary>
[Required]
[Column("ADDED_WHO")]
[MaxLength(50)]
public string AddedWho { get; set; } = "DEFAULT";
/// <summary>
/// Created at
/// </summary>
[Required]
[Column("ADDED_WHEN")]
public DateTime AddedWhen { get; set; } = DateTime.Now;
/// <summary>
/// Modified by
/// </summary>
[Column("CHANGED_WHO")]
[MaxLength(50)]
public string? ChangedWho { get; set; }
/// <summary>
/// Modified at
/// </summary>
[Column("CHANGED_WHEN")]
public DateTime? ChangedWhen { get; set; }
// Navigation properties
/// <summary>
/// Associated Profile
/// </summary>
public virtual Profile Profile { get; set; } = null!;
}
}