Skip to content

Commit

Permalink
CB-33 Migrate Interaction Image Ports
Browse files Browse the repository at this point in the history
  • Loading branch information
izzat5233 committed Jan 13, 2025
1 parent 53d9fee commit 7b79d7f
Show file tree
Hide file tree
Showing 5 changed files with 2,150 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public void Configure(EntityTypeBuilder<InteractionOutput> builder)

builder.OwnsOne(o => o.TextOutput, t => t.ConfigureTextData());

builder.OwnsMany(o => o.ImageOutputs, i => i.ConfigureImageData());
builder.Navigation(o => o.ImageOutputs).AutoInclude();

builder.Property(o => o.TextExpected);
builder.Property(o => o.OptionExpected);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public void Configure(EntityTypeBuilder<InteractionNode> builder)
.HasForeignKey<InteractionNode>()
.OnDelete(DeleteBehavior.NoAction);

builder.HasMany(n => n.ImageInputPorts)
.WithOne()
.IsRequired(false)
.OnDelete(DeleteBehavior.NoAction);

builder.HasOne(n => n.TextOutputPort)
.WithOne()
.HasForeignKey<InteractionNode>()
Expand Down Expand Up @@ -51,6 +56,7 @@ public void Configure(EntityTypeBuilder<InteractionNode> builder)
.OnDelete(DeleteBehavior.NoAction); // Issue

builder.Navigation(n => n.TextInputPort).AutoInclude();
builder.Navigation(n => n.ImageInputPorts).AutoInclude();
builder.Navigation(n => n.TextOutputPort).AutoInclude();
builder.Navigation(n => n.OutputEnum).AutoInclude();
builder.Navigation(n => n.OptionOutputPort).AutoInclude();
Expand Down
Loading

0 comments on commit 7b79d7f

Please sign in to comment.