From cc78fe1068a5c2f32be87201516f365bd392db74 Mon Sep 17 00:00:00 2001 From: transtrike Date: Thu, 10 Dec 2020 14:18:24 +0200 Subject: Migrations added & UserMapper beginning --- API/Migrations/DevHiveContextModelSnapshot.cs | 77 +++++++++++---------------- 1 file changed, 30 insertions(+), 47 deletions(-) (limited to 'API/Migrations/DevHiveContextModelSnapshot.cs') diff --git a/API/Migrations/DevHiveContextModelSnapshot.cs b/API/Migrations/DevHiveContextModelSnapshot.cs index 07fe3c4..cf670a2 100644 --- a/API/Migrations/DevHiveContextModelSnapshot.cs +++ b/API/Migrations/DevHiveContextModelSnapshot.cs @@ -19,34 +19,6 @@ namespace API.Migrations .HasAnnotation("Relational:MaxIdentifierLength", 63) .HasAnnotation("ProductVersion", "5.0.1"); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .UseIdentityByDefaultColumn(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") @@ -160,6 +132,34 @@ namespace API.Migrations b.ToTable("Languages"); }); + modelBuilder.Entity("Models.Classes.Roles", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .UseIdentityByDefaultColumn(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles"); + }); + modelBuilder.Entity("Models.Classes.Technology", b => { b.Property("Id") @@ -233,9 +233,6 @@ namespace API.Migrations b.Property("TwoFactorEnabled") .HasColumnType("boolean"); - b.Property("UserId") - .HasColumnType("integer"); - b.Property("UserName") .IsRequired() .HasMaxLength(256) @@ -250,14 +247,12 @@ namespace API.Migrations .IsUnique() .HasDatabaseName("UserNameIndex"); - b.HasIndex("UserId"); - b.ToTable("AspNetUsers"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + b.HasOne("Models.Classes.Roles", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) @@ -284,7 +279,7 @@ namespace API.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + b.HasOne("Models.Classes.Roles", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) @@ -305,18 +300,6 @@ namespace API.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - - modelBuilder.Entity("Models.Classes.User", b => - { - b.HasOne("Models.Classes.User", null) - .WithMany("Friends") - .HasForeignKey("UserId"); - }); - - modelBuilder.Entity("Models.Classes.User", b => - { - b.Navigation("Friends"); - }); #pragma warning restore 612, 618 } } -- cgit v1.2.3