diff options
Diffstat (limited to 'src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs')
| -rw-r--r-- | src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs index cf0a82b..f662af7 100644 --- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs @@ -1,5 +1,6 @@ // <auto-generated /> using System; +using System.Collections.Generic; using DevHive.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -25,13 +26,13 @@ namespace DevHive.Data.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); - b.Property<Guid>("CreatorId") + b.Property<Guid?>("CreatorId") .HasColumnType("uuid"); b.Property<string>("Message") .HasColumnType("text"); - b.Property<Guid>("PostId") + b.Property<Guid?>("PostId") .HasColumnType("uuid"); b.Property<DateTime>("TimeCreated") @@ -39,6 +40,8 @@ namespace DevHive.Data.Migrations b.HasKey("Id"); + b.HasIndex("CreatorId"); + b.HasIndex("PostId"); b.ToTable("Comments"); @@ -64,9 +67,12 @@ namespace DevHive.Data.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); - b.Property<Guid>("CreatorId") + b.Property<Guid?>("CreatorId") .HasColumnType("uuid"); + b.Property<List<string>>("FileUrls") + .HasColumnType("text[]"); + b.Property<string>("Message") .HasColumnType("text"); @@ -75,6 +81,8 @@ namespace DevHive.Data.Migrations b.HasKey("Id"); + b.HasIndex("CreatorId"); + b.ToTable("Posts"); }); @@ -364,11 +372,26 @@ namespace DevHive.Data.Migrations modelBuilder.Entity("DevHive.Data.Models.Comment", b => { - b.HasOne("DevHive.Data.Models.Post", null) + b.HasOne("DevHive.Data.Models.User", "Creator") .WithMany("Comments") - .HasForeignKey("PostId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .HasForeignKey("CreatorId"); + + b.HasOne("DevHive.Data.Models.Post", "Post") + .WithMany("Comments") + .HasForeignKey("PostId"); + + b.Navigation("Creator"); + + b.Navigation("Post"); + }); + + modelBuilder.Entity("DevHive.Data.Models.Post", b => + { + b.HasOne("DevHive.Data.Models.User", "Creator") + .WithMany("Posts") + .HasForeignKey("CreatorId"); + + b.Navigation("Creator"); }); modelBuilder.Entity("DevHive.Data.Models.User", b => @@ -500,7 +523,11 @@ namespace DevHive.Data.Migrations modelBuilder.Entity("DevHive.Data.Models.User", b => { + b.Navigation("Comments"); + b.Navigation("Friends"); + + b.Navigation("Posts"); }); #pragma warning restore 612, 618 } |
