//
using System;
using DamageAssesment.Api.Questions.Db;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace DamageAssesment.Api.Questions.Migrations
{
[DbContext(typeof(QuestionDbContext))]
partial class QuestionDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CategoryId")
.HasColumnType("int");
b.Property("Comment")
.HasColumnType("bit");
b.Property("IsRequired")
.HasColumnType("bit");
b.Property("Key")
.HasColumnType("bit");
b.Property("QuestionGroup")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("QuestionNumber")
.HasColumnType("int");
b.Property("QuestionTypeId")
.HasColumnType("int");
b.Property("SurveyId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("QuestionTypeId");
b.ToTable("Questions");
});
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionCategory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CategoryImage")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CategoryName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("QuestionCategories");
});
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionType", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("TypeText")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("QuestionTypes");
});
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionsTranslation", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Language")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("QuestionId")
.HasColumnType("int");
b.Property("QuestionText")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("QuestionsTranslations");
});
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b =>
{
b.HasOne("DamageAssesment.Api.Questions.Db.QuestionType", "QuestionType")
.WithMany()
.HasForeignKey("QuestionTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("QuestionType");
});
#pragma warning restore 612, 618
}
}
}