Adding Organiztion, environment and project. Segment fix, tag fix

This commit is contained in:
2026-04-14 14:10:37 -07:00
parent 4195d384d0
commit b75f5f602e
20 changed files with 3370 additions and 61 deletions

View File

@@ -22,8 +22,7 @@ public class FeatureConfiguration : IEntityTypeConfiguration<Feature>
.OnDelete(DeleteBehavior.Cascade);
builder.HasMany(f => f.Tags)
.WithOne()
.HasForeignKey(t => t.ProjectId)
.OnDelete(DeleteBehavior.NoAction);
.WithMany()
.UsingEntity("FeatureTags");
}
}

View File

@@ -1,4 +1,5 @@
using MicCheck.Api.Features;
using MicCheck.Api.Projects;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
@@ -11,5 +12,10 @@ public class TagConfiguration : IEntityTypeConfiguration<Tag>
builder.HasKey(t => t.Id);
builder.Property(t => t.Label).HasMaxLength(200).IsRequired();
builder.Property(t => t.Color).HasMaxLength(20).IsRequired();
builder.HasOne<Project>()
.WithMany()
.HasForeignKey(t => t.ProjectId)
.OnDelete(DeleteBehavior.Cascade);
}
}