144 lines
4.8 KiB
C#
144 lines
4.8 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using DamageAssesment.Api.Questions.Db;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace DamageAssesment.Api.Questions.Migrations
|
|
{
|
|
[DbContext(typeof(QuestionDbContext))]
|
|
[Migration("20230817215744_InitialQuestion")]
|
|
partial class InitialQuestion
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(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<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CategoryId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("Comment")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool>("IsRequired")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool>("Key")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("QuestionGroup")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("QuestionNumber")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("QuestionTypeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("SurveyId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("QuestionTypeId");
|
|
|
|
b.ToTable("Questions");
|
|
});
|
|
|
|
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionCategory", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("CategoryImage")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CategoryName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("QuestionCategories");
|
|
});
|
|
|
|
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionType", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("TypeText")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("QuestionTypes");
|
|
});
|
|
|
|
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionsTranslation", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Language")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("QuestionId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("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
|
|
}
|
|
}
|
|
}
|