This commit is contained in:
Paul Schneider 2021-05-16 14:07:14 +01:00
commit e4511a8aaa
38 changed files with 615 additions and 68 deletions

View file

@ -126,7 +126,7 @@ namespace nugethost.Migrations
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("nuget_host.Models.ApiKeys.ApiKey", b =>
modelBuilder.Entity("nuget_host.Data.ApiKeys.ApiKey", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
@ -147,7 +147,7 @@ namespace nugethost.Migrations
b.ToTable("ApiKeys");
});
modelBuilder.Entity("nuget_host.Models.ApplicationUser", b =>
modelBuilder.Entity("nuget_host.Data.ApplicationUser", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
@ -199,6 +199,47 @@ namespace nugethost.Migrations
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("nuget_host.Data.Package", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Description");
b.Property<string>("OwnerId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("OwnerId");
b.ToTable("Packages");
});
modelBuilder.Entity("nuget_host.Data.PackageVersion", b =>
{
b.Property<string>("FullString")
.ValueGeneratedOnAdd()
.HasMaxLength(32);
b.Property<bool>("IsPrerelease");
b.Property<int>("Major");
b.Property<int>("Minor");
b.Property<string>("PackageId")
.IsRequired();
b.Property<int>("Patch");
b.HasKey("FullString");
b.HasIndex("PackageId");
b.ToTable("PackageVersions");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
@ -209,7 +250,7 @@ namespace nugethost.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("nuget_host.Models.ApplicationUser")
b.HasOne("nuget_host.Data.ApplicationUser")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
@ -217,7 +258,7 @@ namespace nugethost.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("nuget_host.Models.ApplicationUser")
b.HasOne("nuget_host.Data.ApplicationUser")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
@ -230,7 +271,7 @@ namespace nugethost.Migrations
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("nuget_host.Models.ApplicationUser")
b.HasOne("nuget_host.Data.ApplicationUser")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
@ -238,19 +279,35 @@ namespace nugethost.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("nuget_host.Models.ApplicationUser")
b.HasOne("nuget_host.Data.ApplicationUser")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("nuget_host.Models.ApiKeys.ApiKey", b =>
modelBuilder.Entity("nuget_host.Data.ApiKeys.ApiKey", b =>
{
b.HasOne("nuget_host.Models.ApplicationUser", "User")
b.HasOne("nuget_host.Data.ApplicationUser", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("nuget_host.Data.Package", b =>
{
b.HasOne("nuget_host.Data.ApplicationUser", "Owner")
.WithMany()
.HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("nuget_host.Data.PackageVersion", b =>
{
b.HasOne("nuget_host.Data.Package", "Package")
.WithMany()
.HasForeignKey("PackageId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}