diff --git a/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/AuthorizedUser.cs b/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/AuthorizedUser.cs new file mode 100644 index 0000000..cbec8fc --- /dev/null +++ b/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/AuthorizedUser.cs @@ -0,0 +1,6 @@ +namespace DigitalData.TaskFlow.Domain.ProcedureResults; + +public class AuthorizedUser +{ + public int WisagId { get; init; } +} diff --git a/src/infrastructure/DigitalData.TaskFlow.Infrastructure/Persistence/TaskFlowDbContext.cs b/src/infrastructure/DigitalData.TaskFlow.Infrastructure/Persistence/TaskFlowDbContext.cs index 3f406fc..a16752a 100644 --- a/src/infrastructure/DigitalData.TaskFlow.Infrastructure/Persistence/TaskFlowDbContext.cs +++ b/src/infrastructure/DigitalData.TaskFlow.Infrastructure/Persistence/TaskFlowDbContext.cs @@ -23,6 +23,11 @@ public sealed class TaskFlowDbContext(DbContextOptions option /// public DbSet WorkflowClosings => Set(); + /// + /// Gets the keyless result model used for authorized users procedure results. + /// + public DbSet AuthorizedUsers => Set(); + protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); @@ -50,5 +55,12 @@ public sealed class TaskFlowDbContext(DbContextOptions option entity.Property(x => x.Code).HasColumnName("CODE").HasColumnType("int"); entity.Property(x => x.Result).HasColumnName("RESULT").HasColumnType("nvarchar(400)"); }); + + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + entity.ToView(null); + entity.Property(x => x.WisagId).HasColumnName("wisagid").HasColumnType("int"); + }); } }