Added inital job entity and services. Added released works API integration.
All checks were successful
ci / build-test (push) Successful in 2m21s
ci / publish-image (push) Successful in 2m19s

This commit is contained in:
2026-03-27 01:32:39 -04:00
parent 1c016ac62e
commit d9e421178f
36 changed files with 5596 additions and 43 deletions

View File

@@ -0,0 +1,44 @@
using JSMR.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace JSMR.Infrastructure.Data.Configuration;
public sealed class JobConfiguration : IEntityTypeConfiguration<Job>
{
public void Configure(EntityTypeBuilder<Job> builder)
{
builder.ToTable("Jobs");
builder.HasKey(x => x.Id);
builder.Property(x => x.Code)
.HasMaxLength(100)
.IsRequired();
builder.Property(x => x.RequestedByUserId)
.HasMaxLength(100);
builder.Property(x => x.RequestedSource)
.HasMaxLength(50)
.IsRequired();
builder.Property(x => x.WorkerName)
.HasMaxLength(200);
builder.Property(x => x.CurrentStep)
.HasMaxLength(500);
builder.Property(x => x.ResultSummary)
.HasMaxLength(2000);
builder.Property(x => x.Error)
.HasColumnType("TEXT");
builder.Property(x => x.ParametersJson)
.HasColumnType("LONGTEXT");
builder.HasIndex(x => new { x.Status, x.CreatedUtc });
builder.HasIndex(x => x.Code);
}
}