diff --git a/src/core/DigitalData.TaskFlow.Domain/Entities/CustDocBase64.cs b/src/core/DigitalData.TaskFlow.Domain/Entities/CustDocBase64.cs new file mode 100644 index 0000000..82f533d --- /dev/null +++ b/src/core/DigitalData.TaskFlow.Domain/Entities/CustDocBase64.cs @@ -0,0 +1,31 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace DigitalData.TaskFlow.Domain.Entities; + +[Table("TBCUST_DOC_BASE64", Schema = "dbo")] +public sealed class CustDocBase64 +{ + [Column("ProcessID", TypeName = "bigint")] + public long? ProcessId { get; set; } + + [Column("DocID", TypeName = "bigint")] + public long? DocId { get; set; } + + [Column("Doctype", TypeName = "nvarchar(200)")] + public string? DocType { get; set; } + + [Column("GroupType", TypeName = "nvarchar(200)")] + public string? GroupType { get; set; } + + [Column("filename", TypeName = "nvarchar(500)")] + public string? FileName { get; set; } + + [Column("filebase64", TypeName = "varchar(max)")] + public string? FileBase64 { get; set; } + + [Column("ADDED_WHEN", TypeName = "datetime")] + public DateTime AddedWhen { get; set; } + + [Column("thumbnailbase64", TypeName = "varchar(max)")] + public string? ThumbnailBase64 { get; set; } +} diff --git a/src/infrastructure/DigitalData.TaskFlow.Infrastructure/Persistence/TaskFlowDbContext.cs b/src/infrastructure/DigitalData.TaskFlow.Infrastructure/Persistence/TaskFlowDbContext.cs index 0ee98df..e5c5dc7 100644 --- a/src/infrastructure/DigitalData.TaskFlow.Infrastructure/Persistence/TaskFlowDbContext.cs +++ b/src/infrastructure/DigitalData.TaskFlow.Infrastructure/Persistence/TaskFlowDbContext.cs @@ -1,3 +1,4 @@ +using DigitalData.TaskFlow.Domain.Entities; using DigitalData.TaskFlow.Infrastructure.Persistence.Models; using Microsoft.EntityFrameworkCore; @@ -13,6 +14,11 @@ public sealed class TaskFlowDbContext(DbContextOptions option /// public DbSet WorkflowListingReadModels => Set(); + /// + /// Gets the keyless entity mapped to TBCUST_DOC_BASE64. + /// + public DbSet CustDocBase64 => Set(); + protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); @@ -22,5 +28,11 @@ public sealed class TaskFlowDbContext(DbContextOptions option entity.HasNoKey(); entity.ToView(null); }); + + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + entity.ToTable("TBCUST_DOC_BASE64", "dbo"); + }); } }