feat: Update Application layer for Hangfire integration
- Add CronSchedule property to CfgProfileDto for scheduling support - Create ProfileSqlJobDto for SQL job execution data transfer - Update TriggeringDEXJobBatchCommand to accept ProfileId and Jobs collection - Make TriggeringDEXJobBatchCommand public for Hangfire job activation - Update Application DependencyInjection with required service registrations
This commit is contained in:
@@ -7,7 +7,7 @@ namespace ECMJobRunner.Application.Common.Dtos
|
||||
/// Data Transfer Object for CfgProfile entity
|
||||
/// Used for querying and returning profile data
|
||||
/// </summary>
|
||||
public class CfgProfileDto
|
||||
public record CfgProfileDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Profile ID
|
||||
@@ -64,55 +64,4 @@ namespace ECMJobRunner.Application.Common.Dtos
|
||||
/// </summary>
|
||||
public List<ProfileSqlJobDto>? SqlJobs { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object for ProfileSqlJob entity
|
||||
/// </summary>
|
||||
public class ProfileSqlJobDto
|
||||
{
|
||||
/// <summary>
|
||||
/// SQL Job ID
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Profile ID (foreign key)
|
||||
/// </summary>
|
||||
public long ProfileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Active / Inactive switch
|
||||
/// </summary>
|
||||
public bool Active { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Execution sequence order
|
||||
/// </summary>
|
||||
public short Sequence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Job name
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SQL query for pre-check validation
|
||||
/// </summary>
|
||||
public string? SqlCheckQuery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Main SQL query to execute
|
||||
/// </summary>
|
||||
public string? SqlMainQuery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// API command to execute
|
||||
/// </summary>
|
||||
public string? ApiCommand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional description
|
||||
/// </summary>
|
||||
public string? Comment { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
53
ECMJobRunner.Application/Common/Dtos/ProfileSqlJobDto.cs
Normal file
53
ECMJobRunner.Application/Common/Dtos/ProfileSqlJobDto.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace ECMJobRunner.Application.Common.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// Data Transfer Object for ProfileSqlJob entity
|
||||
/// </summary>
|
||||
public class ProfileSqlJobDto
|
||||
{
|
||||
/// <summary>
|
||||
/// SQL Job ID
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Profile ID (foreign key)
|
||||
/// </summary>
|
||||
public long ProfileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Active / Inactive switch
|
||||
/// </summary>
|
||||
public bool Active { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Execution sequence order
|
||||
/// </summary>
|
||||
public short Sequence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Job name
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SQL query for pre-check validation
|
||||
/// </summary>
|
||||
public string? SqlCheckQuery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Main SQL query to execute
|
||||
/// </summary>
|
||||
public string? SqlMainQuery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// API command to execute
|
||||
/// </summary>
|
||||
public string? ApiCommand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional description
|
||||
/// </summary>
|
||||
public string? Comment { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user