371 lines
12 KiB
C#
371 lines
12 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace Web.Migrations
|
|
{
|
|
[DbContext(typeof(SurveyContext))]
|
|
[Migration("20240307153635_SurveyModelsAdded")]
|
|
partial class SurveyModelsAdded
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.2")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Model.Address", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("CVR")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("City")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Country")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Mobile")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PostalCode")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("State")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Street")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Addresss");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.Answer", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("QuestionId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Text")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("QuestionId");
|
|
|
|
b.ToTable("Answers");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.Banner", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ImageUrl")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("LinkUrl")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Banners");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.Footer", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ImageUlr")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("LastUpdated")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Owner")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Sitecopyright")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UpdatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Footers");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
{
|
|
b.Property<int>("FooterId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("SocialId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("FooterId", "SocialId");
|
|
|
|
b.HasIndex("SocialId");
|
|
|
|
b.ToTable("FooterSocialMedias");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.Page", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("BannerId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Slug")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BannerId");
|
|
|
|
b.ToTable("Pages");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.Question", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("QuestionnaireId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Text")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("QuestionnaireId");
|
|
|
|
b.ToTable("Questions");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.QuestionTypeEntities", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("QuestionTypeEntities");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Title")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Questionnaires");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Url")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("SocialMedia");
|
|
});
|
|
|
|
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.Navigation("banner");
|
|
});
|
|
|
|
modelBuilder.Entity("Model.Question", b =>
|
|
{
|
|
b.HasOne("Model.Questionnaire", "Questionnaire")
|
|
.WithMany("Questions")
|
|
.HasForeignKey("QuestionnaireId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Questionnaire");
|
|
});
|
|
|
|
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.SocialMedia", b =>
|
|
{
|
|
b.Navigation("FooterSocialMedias");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|