Adding Organiztion, environment and project. Segment fix, tag fix
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user