// <auto-generated />
using System;
using Fabula.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace Fabula.Data.Migrations
{
    [DbContext(typeof(FabulaDbContext))]
    [Migration("20230629152418_ChangedProfilePictureUrlToNullable")]
    partial class ChangedProfilePictureUrlToNullable
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "6.0.18")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);

            modelBuilder.Entity("Fabula.Data.Models.ApplicationUser", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("AccessFailedCount")
                        .HasColumnType("int");

                    b.Property<Guid?>("ApplicationUserId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("Bio")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)")
                        .HasComment("User bio description");

                    b.Property<DateTime?>("BirthDate")
                        .HasColumnType("datetime2")
                        .HasComment("User date of birth");

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Email")
                        .HasMaxLength(256)
                        .HasColumnType("nvarchar(256)");

                    b.Property<bool>("EmailConfirmed")
                        .HasColumnType("bit");

                    b.Property<string>("FirstName")
                        .IsRequired()
                        .HasMaxLength(150)
                        .HasColumnType("nvarchar(150)")
                        .HasComment("First name of user");

                    b.Property<string>("LastName")
                        .IsRequired()
                        .HasMaxLength(150)
                        .HasColumnType("nvarchar(150)")
                        .HasComment("Last name of user");

                    b.Property<bool>("LockoutEnabled")
                        .HasColumnType("bit");

                    b.Property<DateTimeOffset?>("LockoutEnd")
                        .HasColumnType("datetimeoffset");

                    b.Property<string>("NormalizedEmail")
                        .HasMaxLength(256)
                        .HasColumnType("nvarchar(256)");

                    b.Property<string>("NormalizedUserName")
                        .HasMaxLength(256)
                        .HasColumnType("nvarchar(256)");

                    b.Property<string>("PasswordHash")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("PhoneNumber")
                        .HasColumnType("nvarchar(max)");

                    b.Property<bool>("PhoneNumberConfirmed")
                        .HasColumnType("bit");

                    b.Property<string>("ProfilePictureUrl")
                        .HasMaxLength(2084)
                        .HasColumnType("nvarchar(2084)")
                        .HasComment("A url which leads to the user's profile picture");

                    b.Property<string>("SecurityStamp")
                        .HasColumnType("nvarchar(max)");

                    b.Property<bool>("TwoFactorEnabled")
                        .HasColumnType("bit");

                    b.Property<string>("UserName")
                        .HasMaxLength(256)
                        .HasColumnType("nvarchar(256)");

                    b.HasKey("Id");

                    b.HasIndex("ApplicationUserId");

                    b.HasIndex("NormalizedEmail")
                        .HasDatabaseName("EmailIndex");

                    b.HasIndex("NormalizedUserName")
                        .IsUnique()
                        .HasDatabaseName("UserNameIndex")
                        .HasFilter("[NormalizedUserName] IS NOT NULL");

                    b.ToTable("AspNetUsers", (string)null);

                    b.HasComment("Users");
                });

            modelBuilder.Entity("Fabula.Data.Models.Comment", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of the comment");

                    b.Property<Guid>("AuthorId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of the comment author");

                    b.Property<string>("Content")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)")
                        .HasComment("Content of the comment");

                    b.Property<DateTime?>("DeletedOn")
                        .HasColumnType("datetime2")
                        .HasComment("Date and time of deletion of the comment. Note: A nullable type is used for the purposes of documenting both whether a comment has been deleted and also when the operation took place.");

                    b.Property<Guid>("PieceId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of piece");

                    b.Property<DateTime>("PublishedOn")
                        .HasColumnType("datetime2")
                        .HasComment("Date of publishing");

                    b.HasKey("Id");

                    b.HasIndex("AuthorId");

                    b.HasIndex("PieceId");

                    b.ToTable("Comments");

                    b.HasComment("Comments made by users");
                });

            modelBuilder.Entity("Fabula.Data.Models.Genre", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasComment("Id of genre");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(75)
                        .HasColumnType("nvarchar(75)")
                        .HasComment("Name of genre");

                    b.HasKey("Id");

                    b.ToTable("Genres");

                    b.HasComment("Genre of a piece");
                });

            modelBuilder.Entity("Fabula.Data.Models.List", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of list");

                    b.Property<DateTime>("CreatedOn")
                        .HasColumnType("datetime2")
                        .HasComment("Date of creation");

                    b.Property<Guid>("CreatorId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of creator");

                    b.Property<DateTime?>("DeletedOn")
                        .HasColumnType("datetime2")
                        .HasComment("Date and time of deletion of the list. Note: A nullable type is used for the purposes of documenting both whether a list has been deleted and also when the operation took place.");

                    b.Property<string>("Description")
                        .IsRequired()
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)")
                        .HasComment("Description of list");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(75)
                        .HasColumnType("nvarchar(75)")
                        .HasComment("Title of list");

                    b.Property<bool>("hasAdultContent")
                        .HasColumnType("bit")
                        .HasComment("Adult content flag of the list");

                    b.HasKey("Id");

                    b.HasIndex("CreatorId");

                    b.ToTable("Lists");

                    b.HasComment("Reading lists");
                });

            modelBuilder.Entity("Fabula.Data.Models.Piece", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of the piece");

                    b.Property<Guid>("AuthorId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of piece author");

                    b.Property<string>("Content")
                        .IsRequired()
                        .HasMaxLength(100000)
                        .HasColumnType("nvarchar(max)")
                        .HasComment("The piece itself");

                    b.Property<string>("CoverUrl")
                        .IsRequired()
                        .HasMaxLength(2084)
                        .HasColumnType("nvarchar(2084)")
                        .HasComment("A url which leads to the piece's cover art");

                    b.Property<DateTime?>("DeletedOn")
                        .HasColumnType("datetime2")
                        .HasComment("Date and time of deletion of the piece. Note: A nullable type is used for the purposes of documenting both whether a piece has been deleted and also when the operation took place.");

                    b.Property<Guid?>("ListId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("PublishedOn")
                        .HasColumnType("datetime2")
                        .HasComment("Date of publishing");

                    b.Property<string>("Synopsys")
                        .IsRequired()
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)")
                        .HasComment("Synopsys of the piece");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)")
                        .HasComment("Title of the piece");

                    b.Property<bool>("hasAdultContent")
                        .HasColumnType("bit")
                        .HasComment("Adult content flag of the piece");

                    b.HasKey("Id");

                    b.HasIndex("AuthorId");

                    b.HasIndex("ListId");

                    b.ToTable("Pieces");

                    b.HasComment("User-written pieces");
                });

            modelBuilder.Entity("Fabula.Data.Models.Rating", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of rating");

                    b.Property<DateTime?>("DeletedOn")
                        .HasColumnType("datetime2")
                        .HasComment("Date and time of deletion of the rating. Note: A nullable type is used for the purposes of documenting both whether a rating has been deleted and also when the operation took place.");

                    b.Property<Guid>("PieceId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of piece");

                    b.Property<DateTime>("PublishedOn")
                        .HasColumnType("datetime2")
                        .HasComment("Date of publishing");

                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of user");

                    b.Property<byte>("Value")
                        .HasColumnType("tinyint")
                        .HasComment("Value of rating");

                    b.HasKey("Id");

                    b.HasIndex("PieceId");

                    b.HasIndex("UserId");

                    b.ToTable("Ratings");

                    b.HasComment("Rating of piece");
                });

            modelBuilder.Entity("Fabula.Data.Models.Tag", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasComment("Id of tag");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(75)
                        .HasColumnType("nvarchar(75)")
                        .HasComment("Name of tag");

                    b.HasKey("Id");

                    b.ToTable("Tag");

                    b.HasComment("Tags for better categorisation of literary works");
                });

            modelBuilder.Entity("Fabula.Data.Models.UserFavoritePiece", b =>
                {
                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of user");

                    b.Property<Guid>("PieceId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of piece");

                    b.HasKey("UserId", "PieceId");

                    b.HasIndex("PieceId");

                    b.ToTable("UsersFavoritePieces");

                    b.HasComment("Mapping table for users and the pieces they've favorited");
                });

            modelBuilder.Entity("Fabula.Data.Models.UserFollowedList", b =>
                {
                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of user");

                    b.Property<Guid>("ListId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of list");

                    b.HasKey("UserId", "ListId");

                    b.HasIndex("ListId");

                    b.ToTable("UsersFollowedLists");

                    b.HasComment("Mapping table for users and the lists they've followed");
                });

            modelBuilder.Entity("Fabula.Data.Models.UserLikedComment", b =>
                {
                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of user");

                    b.Property<Guid>("CommentId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of comment");

                    b.HasKey("UserId", "CommentId");

                    b.HasIndex("CommentId");

                    b.ToTable("UsersLikedComments");

                    b.HasComment("Mapping table for users and the comments they've liked");
                });

            modelBuilder.Entity("Fabula.Data.Models.UserLikedList", b =>
                {
                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of user");

                    b.Property<Guid>("ListId")
                        .HasColumnType("uniqueidentifier")
                        .HasComment("Id of list");

                    b.HasKey("UserId", "ListId");

                    b.HasIndex("ListId");

                    b.ToTable("UsersLikedLists");

                    b.HasComment("Mapping table for users and the lists they've liked");
                });

            modelBuilder.Entity("GenrePiece", b =>
                {
                    b.Property<int>("GenresId")
                        .HasColumnType("int");

                    b.Property<Guid>("StoriesId")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("GenresId", "StoriesId");

                    b.HasIndex("StoriesId");

                    b.ToTable("GenrePiece");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Name")
                        .HasMaxLength(256)
                        .HasColumnType("nvarchar(256)");

                    b.Property<string>("NormalizedName")
                        .HasMaxLength(256)
                        .HasColumnType("nvarchar(256)");

                    b.HasKey("Id");

                    b.HasIndex("NormalizedName")
                        .IsUnique()
                        .HasDatabaseName("RoleNameIndex")
                        .HasFilter("[NormalizedName] IS NOT NULL");

                    b.ToTable("AspNetRoles", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);

                    b.Property<string>("ClaimType")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("ClaimValue")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid>("RoleId")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("Id");

                    b.HasIndex("RoleId");

                    b.ToTable("AspNetRoleClaims", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);

                    b.Property<string>("ClaimType")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("ClaimValue")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("AspNetUserClaims", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
                {
                    b.Property<string>("LoginProvider")
                        .HasMaxLength(128)
                        .HasColumnType("nvarchar(128)");

                    b.Property<string>("ProviderKey")
                        .HasMaxLength(128)
                        .HasColumnType("nvarchar(128)");

                    b.Property<string>("ProviderDisplayName")
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("LoginProvider", "ProviderKey");

                    b.HasIndex("UserId");

                    b.ToTable("AspNetUserLogins", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
                {
                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("RoleId")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("UserId", "RoleId");

                    b.HasIndex("RoleId");

                    b.ToTable("AspNetUserRoles", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
                {
                    b.Property<Guid>("UserId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("LoginProvider")
                        .HasMaxLength(128)
                        .HasColumnType("nvarchar(128)");

                    b.Property<string>("Name")
                        .HasMaxLength(128)
                        .HasColumnType("nvarchar(128)");

                    b.Property<string>("Value")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("UserId", "LoginProvider", "Name");

                    b.ToTable("AspNetUserTokens", (string)null);
                });

            modelBuilder.Entity("PieceTag", b =>
                {
                    b.Property<Guid>("PiecesId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("TagsId")
                        .HasColumnType("int");

                    b.HasKey("PiecesId", "TagsId");

                    b.HasIndex("TagsId");

                    b.ToTable("PieceTag");
                });

            modelBuilder.Entity("Fabula.Data.Models.ApplicationUser", b =>
                {
                    b.HasOne("Fabula.Data.Models.ApplicationUser", null)
                        .WithMany("Followers")
                        .HasForeignKey("ApplicationUserId");
                });

            modelBuilder.Entity("Fabula.Data.Models.Comment", b =>
                {
                    b.HasOne("Fabula.Data.Models.ApplicationUser", "Author")
                        .WithMany("WrittenComments")
                        .HasForeignKey("AuthorId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.Piece", "Piece")
                        .WithMany("Comments")
                        .HasForeignKey("PieceId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Author");

                    b.Navigation("Piece");
                });

            modelBuilder.Entity("Fabula.Data.Models.List", b =>
                {
                    b.HasOne("Fabula.Data.Models.ApplicationUser", "Creator")
                        .WithMany("CreatedLists")
                        .HasForeignKey("CreatorId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Creator");
                });

            modelBuilder.Entity("Fabula.Data.Models.Piece", b =>
                {
                    b.HasOne("Fabula.Data.Models.ApplicationUser", "Author")
                        .WithMany("WrittenPieces")
                        .HasForeignKey("AuthorId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.List", null)
                        .WithMany("Pieces")
                        .HasForeignKey("ListId");

                    b.Navigation("Author");
                });

            modelBuilder.Entity("Fabula.Data.Models.Rating", b =>
                {
                    b.HasOne("Fabula.Data.Models.Piece", "Piece")
                        .WithMany("Ratings")
                        .HasForeignKey("PieceId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.ApplicationUser", "User")
                        .WithMany("Ratings")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Piece");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Fabula.Data.Models.UserFavoritePiece", b =>
                {
                    b.HasOne("Fabula.Data.Models.Piece", "Piece")
                        .WithMany("Favorites")
                        .HasForeignKey("PieceId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.ApplicationUser", "User")
                        .WithMany("FavoritePieces")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Piece");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Fabula.Data.Models.UserFollowedList", b =>
                {
                    b.HasOne("Fabula.Data.Models.List", "List")
                        .WithMany("Followers")
                        .HasForeignKey("ListId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.ApplicationUser", "User")
                        .WithMany("FollowedLists")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("List");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Fabula.Data.Models.UserLikedComment", b =>
                {
                    b.HasOne("Fabula.Data.Models.Comment", "Comment")
                        .WithMany("Likes")
                        .HasForeignKey("CommentId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.ApplicationUser", "User")
                        .WithMany("LikedComments")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Comment");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Fabula.Data.Models.UserLikedList", b =>
                {
                    b.HasOne("Fabula.Data.Models.List", "List")
                        .WithMany("Likes")
                        .HasForeignKey("ListId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.ApplicationUser", "User")
                        .WithMany("LikedLists")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("List");

                    b.Navigation("User");
                });

            modelBuilder.Entity("GenrePiece", b =>
                {
                    b.HasOne("Fabula.Data.Models.Genre", null)
                        .WithMany()
                        .HasForeignKey("GenresId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.Piece", null)
                        .WithMany()
                        .HasForeignKey("StoriesId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", null)
                        .WithMany()
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
                {
                    b.HasOne("Fabula.Data.Models.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
                {
                    b.HasOne("Fabula.Data.Models.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", null)
                        .WithMany()
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
                {
                    b.HasOne("Fabula.Data.Models.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("PieceTag", b =>
                {
                    b.HasOne("Fabula.Data.Models.Piece", null)
                        .WithMany()
                        .HasForeignKey("PiecesId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Fabula.Data.Models.Tag", null)
                        .WithMany()
                        .HasForeignKey("TagsId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Fabula.Data.Models.ApplicationUser", b =>
                {
                    b.Navigation("CreatedLists");

                    b.Navigation("FavoritePieces");

                    b.Navigation("FollowedLists");

                    b.Navigation("Followers");

                    b.Navigation("LikedComments");

                    b.Navigation("LikedLists");

                    b.Navigation("Ratings");

                    b.Navigation("WrittenComments");

                    b.Navigation("WrittenPieces");
                });

            modelBuilder.Entity("Fabula.Data.Models.Comment", b =>
                {
                    b.Navigation("Likes");
                });

            modelBuilder.Entity("Fabula.Data.Models.List", b =>
                {
                    b.Navigation("Followers");

                    b.Navigation("Likes");

                    b.Navigation("Pieces");
                });

            modelBuilder.Entity("Fabula.Data.Models.Piece", b =>
                {
                    b.Navigation("Comments");

                    b.Navigation("Favorites");

                    b.Navigation("Ratings");
                });
#pragma warning restore 612, 618
        }
    }
}
