// using System; using Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Web.Migrations { [DbContext(typeof(SurveyContext))] partial class SurveyContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") .HasColumnType("nvarchar(450)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("nvarchar(max)"); b.Property("Name") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("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", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClaimType") .HasColumnType("nvarchar(max)"); b.Property("ClaimValue") .HasColumnType("nvarchar(max)"); b.Property("RoleId") .IsRequired() .HasColumnType("nvarchar(450)"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClaimType") .HasColumnType("nvarchar(max)"); b.Property("ClaimValue") .HasColumnType("nvarchar(max)"); b.Property("UserId") .IsRequired() .HasColumnType("nvarchar(450)"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasColumnType("nvarchar(450)"); b.Property("ProviderKey") .HasColumnType("nvarchar(450)"); b.Property("ProviderDisplayName") .HasColumnType("nvarchar(max)"); b.Property("UserId") .IsRequired() .HasColumnType("nvarchar(450)"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") .HasColumnType("nvarchar(450)"); b.Property("RoleId") .HasColumnType("nvarchar(450)"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("nvarchar(450)"); b.Property("LoginProvider") .HasColumnType("nvarchar(450)"); b.Property("Name") .HasColumnType("nvarchar(450)"); b.Property("Value") .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens", (string)null); }); modelBuilder.Entity("Model.Address", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CVR") .HasColumnType("nvarchar(max)"); b.Property("City") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Country") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Mobile") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PostalCode") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("State") .HasColumnType("nvarchar(max)"); b.Property("Street") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Addresss"); }); modelBuilder.Entity("Model.Answer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ConditionJson") .HasColumnType("nvarchar(max)"); b.Property("IsOtherOption") .HasColumnType("bit"); b.Property("QuestionId") .HasColumnType("int"); b.Property("Text") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("QuestionId"); b.ToTable("Answers"); }); modelBuilder.Entity("Model.ApplicationUser", b => { b.Property("Id") .HasColumnType("nvarchar(450)"); b.Property("AccessFailedCount") .HasColumnType("int"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("nvarchar(max)"); b.Property("Email") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("EmailConfirmed") .HasColumnType("bit"); b.Property("FirstName") .HasColumnType("nvarchar(max)"); b.Property("LastName") .HasColumnType("nvarchar(max)"); b.Property("LockoutEnabled") .HasColumnType("bit"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("PasswordHash") .HasColumnType("nvarchar(max)"); b.Property("PhoneNumber") .HasColumnType("nvarchar(max)"); b.Property("PhoneNumberConfirmed") .HasColumnType("bit"); b.Property("SecurityStamp") .HasColumnType("nvarchar(max)"); b.Property("TwoFactorEnabled") .HasColumnType("bit"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex") .HasFilter("[NormalizedUserName] IS NOT NULL"); b.ToTable("AspNetUsers", (string)null); }); modelBuilder.Entity("Model.Banner", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Content") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ImageUrl") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("LinkUrl") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Title") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Banners"); }); modelBuilder.Entity("Model.Footer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Content") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ImageUlr") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("LastUpdated") .HasColumnType("datetime2"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Owner") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Sitecopyright") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Title") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("UpdatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Footers"); }); modelBuilder.Entity("Model.FooterSocialMedia", b => { b.Property("FooterId") .HasColumnType("int"); b.Property("SocialId") .HasColumnType("int"); b.HasKey("FooterId", "SocialId"); b.HasIndex("SocialId"); b.ToTable("FooterSocialMedias"); }); modelBuilder.Entity("Model.Page", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BannerId") .HasColumnType("int"); b.Property("Content") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("FooterId") .HasColumnType("int"); b.Property("Slug") .HasColumnType("nvarchar(max)"); b.Property("Title") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("BannerId"); b.HasIndex("FooterId"); b.ToTable("Pages"); }); modelBuilder.Entity("Model.Question", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedDate") .HasColumnType("datetime2"); b.Property("IsActive") .HasColumnType("bit"); b.Property("QuestionnaireId") .HasColumnType("int"); b.Property("Text") .HasColumnType("nvarchar(max)"); b.Property("Type") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("QuestionnaireId"); b.ToTable("Questions"); }); modelBuilder.Entity("Model.Questionnaire", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ArchivedDate") .HasColumnType("datetime2"); b.Property("CreatedDate") .HasColumnType("datetime2"); b.Property("Description") .HasColumnType("nvarchar(max)"); b.Property("PublishedDate") .HasColumnType("datetime2"); b.Property("Status") .HasColumnType("int"); b.Property("Title") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Questionnaires"); }); modelBuilder.Entity("Model.Response", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("QuestionnaireId") .HasColumnType("int"); b.Property("SubmissionDate") .HasColumnType("datetime2"); b.Property("UserEmail") .HasColumnType("nvarchar(max)"); b.Property("UserName") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("QuestionnaireId"); b.ToTable("Responses"); }); modelBuilder.Entity("Model.ResponseAnswer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AnswerId") .HasColumnType("int"); b.Property("ResponseDetailId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ResponseDetailId"); b.ToTable("ResponseAnswers"); }); modelBuilder.Entity("Model.ResponseDetail", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("OtherText") .HasColumnType("nvarchar(max)"); b.Property("QuestionId") .HasColumnType("int"); b.Property("QuestionType") .HasColumnType("int"); b.Property("ResponseId") .HasColumnType("int"); b.Property("SkipReason") .HasColumnType("nvarchar(max)"); b.Property("Status") .HasColumnType("int"); b.Property("TextResponse") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("QuestionId"); b.HasIndex("ResponseId"); b.ToTable("ResponseDetails"); }); modelBuilder.Entity("Model.SentNewsletterEamil", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Body") .HasColumnType("nvarchar(max)"); b.Property("Geo") .HasColumnType("nvarchar(max)"); b.Property("IpAddress") .HasColumnType("nvarchar(max)"); b.Property("IsBlocked") .HasColumnType("bit"); b.Property("IsBounced") .HasColumnType("bit"); b.Property("IsClicked") .HasColumnType("bit"); b.Property("IsDelivered") .HasColumnType("bit"); b.Property("IsOpened") .HasColumnType("bit"); b.Property("IsSent") .HasColumnType("bit"); b.Property("IsSpam") .HasColumnType("bit"); b.Property("IsUnsubscribed") .HasColumnType("bit"); b.Property("ReceivedActivity") .HasColumnType("datetime2"); b.Property("RecipientEmail") .HasColumnType("nvarchar(max)"); b.Property("SentDate") .HasColumnType("datetime2"); b.Property("Subject") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("SentNewsletterEamils"); }); modelBuilder.Entity("Model.SocialMedia", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Url") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("SocialMedia"); }); modelBuilder.Entity("Model.Subscription", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsSubscribed") .HasColumnType("bit"); b.Property("Name") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Subscriptions"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.HasOne("Model.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("Model.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Model.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("Model.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Model.Answer", b => { b.HasOne("Model.Question", "Question") .WithMany("Answers") .HasForeignKey("QuestionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Question"); }); modelBuilder.Entity("Model.FooterSocialMedia", b => { b.HasOne("Model.Footer", "Footer") .WithMany("FooterSocialMedias") .HasForeignKey("FooterId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Model.SocialMedia", "SocialMedia") .WithMany("FooterSocialMedias") .HasForeignKey("SocialId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Footer"); b.Navigation("SocialMedia"); }); modelBuilder.Entity("Model.Page", b => { b.HasOne("Model.Banner", "banner") .WithMany() .HasForeignKey("BannerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Model.Footer", "footer") .WithMany() .HasForeignKey("FooterId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("banner"); b.Navigation("footer"); }); modelBuilder.Entity("Model.Question", b => { b.HasOne("Model.Questionnaire", "Questionnaire") .WithMany("Questions") .HasForeignKey("QuestionnaireId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Questionnaire"); }); modelBuilder.Entity("Model.Response", b => { b.HasOne("Model.Questionnaire", "Questionnaire") .WithMany() .HasForeignKey("QuestionnaireId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Questionnaire"); }); modelBuilder.Entity("Model.ResponseAnswer", b => { b.HasOne("Model.ResponseDetail", "ResponseDetail") .WithMany("ResponseAnswers") .HasForeignKey("ResponseDetailId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ResponseDetail"); }); modelBuilder.Entity("Model.ResponseDetail", b => { b.HasOne("Model.Question", "Question") .WithMany() .HasForeignKey("QuestionId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Model.Response", "Response") .WithMany("ResponseDetails") .HasForeignKey("ResponseId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Question"); b.Navigation("Response"); }); modelBuilder.Entity("Model.Footer", b => { b.Navigation("FooterSocialMedias"); }); modelBuilder.Entity("Model.Question", b => { b.Navigation("Answers"); }); modelBuilder.Entity("Model.Questionnaire", b => { b.Navigation("Questions"); }); modelBuilder.Entity("Model.Response", b => { b.Navigation("ResponseDetails"); }); modelBuilder.Entity("Model.ResponseDetail", b => { b.Navigation("ResponseAnswers"); }); modelBuilder.Entity("Model.SocialMedia", b => { b.Navigation("FooterSocialMedias"); }); #pragma warning restore 612, 618 } } }