diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-21 22:13:16 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-21 22:13:16 +0200 |
| commit | 13a2ceda912f961a232c87236f1b29aa29bb6160 (patch) | |
| tree | 59f8d2bf63b03bacc76f98114d2aed78e420ddcd /src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs | |
| parent | a47ea20ab91017da53437f750ed8e0f939f5cdba (diff) | |
| parent | bda98b96433d7a9952524fab4ec65f96998b55de (diff) | |
| download | DevHive-13a2ceda912f961a232c87236f1b29aa29bb6160.tar DevHive-13a2ceda912f961a232c87236f1b29aa29bb6160.tar.gz DevHive-13a2ceda912f961a232c87236f1b29aa29bb6160.zip | |
Merge branch 'refactor_user_updating' into dev
Diffstat (limited to 'src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs')
| -rw-r--r-- | src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs | 111 |
1 files changed, 90 insertions, 21 deletions
diff --git a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs index 7197c81..0727d33 100644 --- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs @@ -31,11 +31,16 @@ namespace DevHive.Data.Migrations b.Property<string>("Message") .HasColumnType("text"); + b.Property<Guid?>("PostId") + .HasColumnType("uuid"); + b.Property<DateTime>("TimeCreated") .HasColumnType("timestamp without time zone"); b.HasKey("Id"); + b.HasIndex("PostId"); + b.ToTable("Comments"); }); @@ -48,14 +53,29 @@ namespace DevHive.Data.Migrations b.Property<string>("Name") .HasColumnType("text"); - b.Property<Guid?>("UserId") + b.HasKey("Id"); + + b.ToTable("Languages"); + }); + + modelBuilder.Entity("DevHive.Data.Models.Post", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() .HasColumnType("uuid"); - b.HasKey("Id"); + b.Property<Guid>("IssuerId") + .HasColumnType("uuid"); - b.HasIndex("UserId"); + b.Property<string>("Message") + .HasColumnType("text"); - b.ToTable("Languages"); + b.Property<DateTime>("TimeCreated") + .HasColumnType("timestamp without time zone"); + + b.HasKey("Id"); + + b.ToTable("Posts"); }); modelBuilder.Entity("DevHive.Data.Models.Role", b => @@ -94,13 +114,8 @@ namespace DevHive.Data.Migrations b.Property<string>("Name") .HasColumnType("text"); - b.Property<Guid?>("UserId") - .HasColumnType("uuid"); - b.HasKey("Id"); - b.HasIndex("UserId"); - b.ToTable("Technologies"); }); @@ -186,6 +201,21 @@ namespace DevHive.Data.Migrations b.ToTable("AspNetUsers"); }); + modelBuilder.Entity("LanguageUser", b => + { + b.Property<Guid>("LanguagesId") + .HasColumnType("uuid"); + + b.Property<Guid>("UsersId") + .HasColumnType("uuid"); + + b.HasKey("LanguagesId", "UsersId"); + + b.HasIndex("UsersId"); + + b.ToTable("LanguageUser"); + }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b => { b.Property<int>("Id") @@ -302,18 +332,26 @@ namespace DevHive.Data.Migrations b.ToTable("RoleUser"); }); - modelBuilder.Entity("DevHive.Data.Models.Language", b => + modelBuilder.Entity("TechnologyUser", b => { - b.HasOne("DevHive.Data.Models.User", null) - .WithMany("Languages") - .HasForeignKey("UserId"); + b.Property<Guid>("TechnologiesId") + .HasColumnType("uuid"); + + b.Property<Guid>("UsersId") + .HasColumnType("uuid"); + + b.HasKey("TechnologiesId", "UsersId"); + + b.HasIndex("UsersId"); + + b.ToTable("TechnologyUser"); }); - modelBuilder.Entity("DevHive.Data.Models.Technology", b => + modelBuilder.Entity("DevHive.Data.Models.Comment", b => { - b.HasOne("DevHive.Data.Models.User", null) - .WithMany("Technologies") - .HasForeignKey("UserId"); + b.HasOne("DevHive.Data.Models.Post", null) + .WithMany("Comments") + .HasForeignKey("PostId"); }); modelBuilder.Entity("DevHive.Data.Models.User", b => @@ -323,6 +361,21 @@ namespace DevHive.Data.Migrations .HasForeignKey("UserId"); }); + modelBuilder.Entity("LanguageUser", b => + { + b.HasOne("DevHive.Data.Models.Language", null) + .WithMany() + .HasForeignKey("LanguagesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DevHive.Data.Models.User", null) + .WithMany() + .HasForeignKey("UsersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b => { b.HasOne("DevHive.Data.Models.Role", null) @@ -389,13 +442,29 @@ namespace DevHive.Data.Migrations .IsRequired(); }); - modelBuilder.Entity("DevHive.Data.Models.User", b => + modelBuilder.Entity("TechnologyUser", b => { - b.Navigation("Friends"); + b.HasOne("DevHive.Data.Models.Technology", null) + .WithMany() + .HasForeignKey("TechnologiesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Languages"); + b.HasOne("DevHive.Data.Models.User", null) + .WithMany() + .HasForeignKey("UsersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("DevHive.Data.Models.Post", b => + { + b.Navigation("Comments"); + }); - b.Navigation("Technologies"); + modelBuilder.Entity("DevHive.Data.Models.User", b => + { + b.Navigation("Friends"); }); #pragma warning restore 612, 618 } |
