microting/eform-sdk-dotnet

View on GitHub
eFormCore/Migrations/20200224092512_AddingMoreAttributesToUnits.Designer.cs

Summary

Maintainability
F
2 wks
Test Coverage
// <auto-generated />

using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microting.eForm.Infrastructure;

namespace Microting.eForm.Migrations
{
    [DbContext(typeof(MicrotingDbContext))]
    [Migration("20200224092512_AddingMoreAttributesToUnits")]
    partial class AddingMoreAttributesToUnits
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            string autoIDGenStrategy = "SqlServer:ValueGenerationStrategy";
            object autoIDGenStrategyValue = MySqlValueGenerationStrategy.IdentityColumn;
            if (DbConfig.IsMySQL)
            {
                autoIDGenStrategy = "MySql:ValueGenerationStrategy";
                autoIDGenStrategyValue = MySqlValueGenerationStrategy.IdentityColumn;
            }
            modelBuilder
                .HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
                .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answer_value_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int>("AnswerId");

                    b.Property<int>("AnswerValueId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("OptionId");

                    b.Property<int>("QuestionId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<string>("Value");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("AnswerValueId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answer_values", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int>("AnswerId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("OptionId");

                    b.Property<int>("QuestionId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<string>("Value");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("AnswerId");

                    b.HasIndex("OptionId");

                    b.HasIndex("QuestionId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answer_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int>("AnswerDuration");

                    b.Property<int>("AnswerId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<DateTime>("FinishedAt");

                    b.Property<int>("LanguageId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("QuestionSetId");

                    b.Property<int>("SiteId");

                    b.Property<int>("SurveyConfigurationId");

                    b.Property<string>("TimeZone");

                    b.Property<int>("UnitId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<bool>("UtcAdjusted");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answers", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int>("AnswerDuration");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<DateTime>("FinishedAt");

                    b.Property<int>("LanguageId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("QuestionSetId");

                    b.Property<int>("SiteId");

                    b.Property<int>("SurveyConfigurationId");

                    b.Property<string>("TimeZone");

                    b.Property<int>("UnitId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<bool>("UtcAdjusted");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("LanguageId");

                    b.HasIndex("QuestionSetId");

                    b.HasIndex("SiteId");

                    b.HasIndex("SurveyConfigurationId");

                    b.HasIndex("UnitId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.case_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int?>("CaseId");

                    b.Property<string>("CaseUid")
                        .HasMaxLength(255);

                    b.Property<int?>("CheckListId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Custom");

                    b.Property<DateTime?>("DoneAt");

                    b.Property<string>("FieldValue1");

                    b.Property<string>("FieldValue10");

                    b.Property<string>("FieldValue2");

                    b.Property<string>("FieldValue3");

                    b.Property<string>("FieldValue4");

                    b.Property<string>("FieldValue5");

                    b.Property<string>("FieldValue6");

                    b.Property<string>("FieldValue7");

                    b.Property<string>("FieldValue8");

                    b.Property<string>("FieldValue9");

                    b.Property<int?>("MicrotingCheckUid");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int?>("SiteId");

                    b.Property<int?>("Status");

                    b.Property<string>("Type")
                        .HasMaxLength(255);

                    b.Property<int?>("UnitId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<int?>("WorkerId");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.cases", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<string>("CaseUid")
                        .HasMaxLength(255);

                    b.Property<int?>("CheckListId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Custom");

                    b.Property<DateTime?>("DoneAt");

                    b.Property<string>("FieldValue1");

                    b.Property<string>("FieldValue10");

                    b.Property<string>("FieldValue2");

                    b.Property<string>("FieldValue3");

                    b.Property<string>("FieldValue4");

                    b.Property<string>("FieldValue5");

                    b.Property<string>("FieldValue6");

                    b.Property<string>("FieldValue7");

                    b.Property<string>("FieldValue8");

                    b.Property<string>("FieldValue9");

                    b.Property<int?>("MicrotingCheckUid");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int?>("SiteId");

                    b.Property<int?>("Status");

                    b.Property<string>("Type")
                        .HasMaxLength(255);

                    b.Property<int?>("UnitId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<int?>("WorkerId");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("CheckListId");

                    b.HasIndex("SiteId");

                    b.HasIndex("UnitId");

                    b.HasIndex("WorkerId");

                    b.HasIndex("MicrotingUid", "MicrotingCheckUid");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.check_list_site_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int?>("CheckListId");

                    b.Property<int?>("CheckListSiteId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("LastCheckId");

                    b.Property<int>("MicrotingUid");

                    b.Property<int?>("SiteId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.check_list_sites", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int?>("CheckListId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("LastCheckId");

                    b.Property<int>("MicrotingUid");

                    b.Property<int?>("SiteId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("CheckListId");

                    b.HasIndex("SiteId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.check_list_value_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int?>("CaseId");

                    b.Property<int?>("CheckListDuplicateId");

                    b.Property<int?>("CheckListId");

                    b.Property<int?>("CheckListValueId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Status")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("UserId");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.check_list_values", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int?>("CaseId");

                    b.Property<int?>("CheckListDuplicateId");

                    b.Property<int?>("CheckListId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Status")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("UserId");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.check_list_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<short?>("ApprovalEnabled");

                    b.Property<string>("CaseType")
                        .HasMaxLength(255);

                    b.Property<int?>("CheckListId");

                    b.Property<string>("Color");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Custom");

                    b.Property<string>("Description");

                    b.Property<int?>("DisplayIndex");

                    b.Property<bool>("DocxExportEnabled");

                    b.Property<short?>("DoneButtonEnabled");

                    b.Property<short?>("DownloadEntities");

                    b.Property<short?>("ExtraFieldsEnabled");

                    b.Property<short?>("FastNavigation");

                    b.Property<int?>("Field1");

                    b.Property<int?>("Field10");

                    b.Property<int?>("Field2");

                    b.Property<int?>("Field3");

                    b.Property<int?>("Field4");

                    b.Property<int?>("Field5");

                    b.Property<int?>("Field6");

                    b.Property<int?>("Field7");

                    b.Property<int?>("Field8");

                    b.Property<int?>("Field9");

                    b.Property<string>("FolderName")
                        .HasMaxLength(255);

                    b.Property<bool>("JasperExportEnabled");

                    b.Property<string>("Label");

                    b.Property<short?>("ManualSync");

                    b.Property<short?>("MultiApproval");

                    b.Property<string>("OriginalId");

                    b.Property<int?>("ParentId");

                    b.Property<short?>("QuickSyncEnabled");

                    b.Property<int?>("Repeated");

                    b.Property<short?>("ReviewEnabled");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.check_lists", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<short?>("ApprovalEnabled");

                    b.Property<string>("CaseType")
                        .HasMaxLength(255);

                    b.Property<string>("Color");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Custom");

                    b.Property<string>("Description");

                    b.Property<int?>("DisplayIndex");

                    b.Property<bool>("DocxExportEnabled");

                    b.Property<short?>("DoneButtonEnabled");

                    b.Property<short?>("DownloadEntities");

                    b.Property<short?>("ExtraFieldsEnabled");

                    b.Property<short?>("FastNavigation");

                    b.Property<int?>("Field1");

                    b.Property<int?>("Field10");

                    b.Property<int?>("Field2");

                    b.Property<int?>("Field3");

                    b.Property<int?>("Field4");

                    b.Property<int?>("Field5");

                    b.Property<int?>("Field6");

                    b.Property<int?>("Field7");

                    b.Property<int?>("Field8");

                    b.Property<int?>("Field9");

                    b.Property<string>("FolderName")
                        .HasMaxLength(255);

                    b.Property<bool>("JasperExportEnabled");

                    b.Property<string>("Label");

                    b.Property<short?>("ManualSync");

                    b.Property<short?>("MultiApproval");

                    b.Property<string>("OriginalId");

                    b.Property<int?>("ParentId");

                    b.Property<short?>("QuickSyncEnabled");

                    b.Property<int?>("Repeated");

                    b.Property<short?>("ReviewEnabled");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("ParentId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.entity_group_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("EntityGroupId");

                    b.Property<string>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<string>("Type")
                        .HasMaxLength(50);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.entity_groups", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<string>("Type")
                        .HasMaxLength(50);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.entity_item_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Description");

                    b.Property<int>("DisplayIndex");

                    b.Property<int?>("EntityGroupId");

                    b.Property<string>("EntityItemUid")
                        .HasMaxLength(50);

                    b.Property<int>("EntityItemsId");

                    b.Property<string>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<short?>("Synced");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.entity_items", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Description");

                    b.Property<int>("DisplayIndex");

                    b.Property<int>("EntityGroupId");

                    b.Property<string>("EntityItemUid")
                        .HasMaxLength(50);

                    b.Property<string>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<short?>("Synced");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.field_types", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<string>("Description")
                        .HasMaxLength(255);

                    b.Property<string>("FieldType")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.field_value_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<string>("Accuracy")
                        .HasMaxLength(255);

                    b.Property<string>("Altitude")
                        .HasMaxLength(255);

                    b.Property<int?>("CaseId");

                    b.Property<int?>("CheckListDuplicateId");

                    b.Property<int?>("CheckListId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<DateTime?>("Date");

                    b.Property<DateTime?>("DoneAt");

                    b.Property<int?>("FieldId");

                    b.Property<int?>("FieldValueId");

                    b.Property<string>("Heading")
                        .HasMaxLength(255);

                    b.Property<string>("Latitude")
                        .HasMaxLength(255);

                    b.Property<string>("Longitude")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("UploadedDataId");

                    b.Property<string>("Value");

                    b.Property<int?>("Version");

                    b.Property<int?>("WorkerId");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.field_values", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<string>("Accuracy")
                        .HasMaxLength(255);

                    b.Property<string>("Altitude")
                        .HasMaxLength(255);

                    b.Property<int?>("CaseId");

                    b.Property<int?>("CheckListDuplicateId");

                    b.Property<int?>("CheckListId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<DateTime?>("Date");

                    b.Property<DateTime?>("DoneAt");

                    b.Property<int?>("FieldId");

                    b.Property<string>("Heading")
                        .HasMaxLength(255);

                    b.Property<string>("Latitude")
                        .HasMaxLength(255);

                    b.Property<string>("Longitude")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("UploadedDataId");

                    b.Property<string>("Value");

                    b.Property<int?>("Version");

                    b.Property<int?>("WorkerId");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("CheckListId");

                    b.HasIndex("FieldId");

                    b.HasIndex("UploadedDataId");

                    b.HasIndex("WorkerId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.field_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<short?>("BarcodeEnabled");

                    b.Property<string>("BarcodeType")
                        .HasMaxLength(255);

                    b.Property<int?>("CheckListId");

                    b.Property<string>("Color")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Custom");

                    b.Property<int?>("DecimalCount");

                    b.Property<string>("DefaultValue");

                    b.Property<string>("Description");

                    b.Property<int?>("DisplayIndex");

                    b.Property<short?>("Dummy");

                    b.Property<int?>("EntityGroupId");

                    b.Property<int?>("FieldId");

                    b.Property<int?>("FieldTypeId");

                    b.Property<short?>("GeolocationEnabled");

                    b.Property<short?>("GeolocationForced");

                    b.Property<short?>("GeolocationHidden");

                    b.Property<short?>("IsNum");

                    b.Property<string>("KeyValuePairList");

                    b.Property<string>("Label");

                    b.Property<short?>("Mandatory");

                    b.Property<int?>("MaxLength");

                    b.Property<string>("MaxValue")
                        .HasMaxLength(255);

                    b.Property<string>("MinValue")
                        .HasMaxLength(255);

                    b.Property<int?>("Multi");

                    b.Property<short?>("Optional");

                    b.Property<string>("OriginalId");

                    b.Property<int?>("ParentFieldId");

                    b.Property<string>("QueryType")
                        .HasMaxLength(255);

                    b.Property<short?>("ReadOnly");

                    b.Property<short?>("Selected");

                    b.Property<short?>("SplitScreen");

                    b.Property<short?>("StopOnSave");

                    b.Property<string>("UnitName")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.fields", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<short?>("BarcodeEnabled");

                    b.Property<string>("BarcodeType")
                        .HasMaxLength(255);

                    b.Property<int?>("CheckListId");

                    b.Property<string>("Color")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Custom");

                    b.Property<int?>("DecimalCount");

                    b.Property<string>("DefaultValue");

                    b.Property<string>("Description");

                    b.Property<int?>("DisplayIndex");

                    b.Property<short?>("Dummy");

                    b.Property<int?>("EntityGroupId");

                    b.Property<int?>("FieldTypeId");

                    b.Property<short?>("GeolocationEnabled");

                    b.Property<short?>("GeolocationForced");

                    b.Property<short?>("GeolocationHidden");

                    b.Property<short?>("IsNum");

                    b.Property<string>("KeyValuePairList");

                    b.Property<string>("Label");

                    b.Property<short?>("Mandatory");

                    b.Property<int?>("MaxLength");

                    b.Property<string>("MaxValue")
                        .HasMaxLength(255);

                    b.Property<string>("MinValue")
                        .HasMaxLength(255);

                    b.Property<int?>("Multi");

                    b.Property<short?>("Optional");

                    b.Property<string>("OriginalId");

                    b.Property<int?>("ParentFieldId");

                    b.Property<string>("QueryType")
                        .HasMaxLength(255);

                    b.Property<short?>("ReadOnly");

                    b.Property<short?>("Selected");

                    b.Property<short?>("SplitScreen");

                    b.Property<short?>("StopOnSave");

                    b.Property<string>("UnitName")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("CheckListId");

                    b.HasIndex("FieldTypeId");

                    b.HasIndex("ParentFieldId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.folder_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Description");

                    b.Property<int?>("FolderId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int?>("ParentId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.folders", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Description");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int?>("ParentId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("ParentId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.language_question_set_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("LanguageId");

                    b.Property<int>("LanguageQuestionSetId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("QuestionSetId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("LanguageQuestionSetId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.language_question_sets", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("LanguageId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("QuestionSetId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("LanguageId");

                    b.HasIndex("QuestionSetId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.language_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Description");

                    b.Property<int>("LanguageId");

                    b.Property<string>("Name");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("LanguageId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.languages", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Description");

                    b.Property<string>("Name");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.log_exceptions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime>("CreatedAt");

                    b.Property<int>("Level");

                    b.Property<string>("Message");

                    b.Property<string>("Type");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.logs", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime>("CreatedAt");

                    b.Property<int>("Level");

                    b.Property<string>("Message");

                    b.Property<string>("Type");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.notification_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<string>("Activity");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Exception");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("NotificationId");

                    b.Property<string>("NotificationUid")
                        .HasMaxLength(255);

                    b.Property<string>("Stacktrace");

                    b.Property<string>("Transmission");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.notifications", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<string>("Activity");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Exception");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("NotificationUid")
                        .HasMaxLength(255);

                    b.Property<string>("Stacktrace");

                    b.Property<string>("Transmission");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.option_translation_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("LanguageId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int>("OptionId");

                    b.Property<int>("OptionTranslationId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.option_translations", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("LanguageId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int>("OptionId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("LanguageId");

                    b.HasIndex("OptionId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.option_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int>("ContinuousOptionId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("DisplayIndex");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("NextQuestionId");

                    b.Property<int>("OptionId");

                    b.Property<int>("OptionsIndex");

                    b.Property<int>("QuestionId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<int>("Weight");

                    b.Property<int>("WeightValue");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("OptionId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.options", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int>("ContinuousOptionId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("DisplayIndex");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("NextQuestionId");

                    b.Property<int>("OptionsIndex");

                    b.Property<int>("QuestionId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<int>("Weight");

                    b.Property<int>("WeightValue");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("QuestionId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_set_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<bool>("HasChild");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int>("ParentId");

                    b.Property<bool>("PossiblyDeployed");

                    b.Property<int>("QuestionSetId");

                    b.Property<bool>("Share");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("QuestionSetId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_sets", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<bool>("HasChild");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int>("ParentId");

                    b.Property<bool>("PosiblyDeployed");

                    b.Property<bool>("Share");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_translation_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("LanguageId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int>("QuestionId");

                    b.Property<int>("QuestionTranslationId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("QuestionTranslationId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_translations", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("LanguageId");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int>("QuestionId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("LanguageId");

                    b.HasIndex("QuestionId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<bool>("BackButtonEnabled");

                    b.Property<int>("ContinuousQuestionId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("FontSize");

                    b.Property<bool>("Image");

                    b.Property<string>("ImagePosition");

                    b.Property<int>("MaxDuration");

                    b.Property<int>("Maximum");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("MinDuration");

                    b.Property<int>("Minimum");

                    b.Property<bool>("Prioritised");

                    b.Property<int>("QuestionId");

                    b.Property<int>("QuestionIndex");

                    b.Property<int>("QuestionSetId");

                    b.Property<string>("QuestionType");

                    b.Property<int>("RefId");

                    b.Property<string>("Type");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<bool>("ValidDisplay");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("QuestionId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.questions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<bool>("BackButtonEnabled");

                    b.Property<int>("ContinuousQuestionId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("FontSize");

                    b.Property<bool>("Image");

                    b.Property<string>("ImagePosition");

                    b.Property<int>("MaxDuration");

                    b.Property<int>("Maximum");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("MinDuration");

                    b.Property<int>("Minimum");

                    b.Property<bool>("Prioritised");

                    b.Property<int>("QuestionIndex");

                    b.Property<int>("QuestionSetId");

                    b.Property<string>("QuestionType");

                    b.Property<int>("RefId");

                    b.Property<string>("Type");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<bool>("ValidDisplay");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("QuestionSetId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.setting_versions", b =>
                {
                    b.Property<int>("Id");

                    b.Property<string>("ChangedByName");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50);

                    b.Property<int>("SettingId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<string>("Value");

                    b.Property<int>("Version");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.settings", b =>
                {
                    b.Property<int>("Id");

                    b.Property<string>("ChangedByName");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<string>("Value");

                    b.Property<int>("Version");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_group_site_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("SiteGroupId");

                    b.Property<int>("SiteGroupSiteId");

                    b.Property<int>("SiteId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_group_sites", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int>("SiteGroupId");

                    b.Property<int>("SiteId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("SiteGroupId");

                    b.HasIndex("SiteId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_group_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Name");

                    b.Property<int>("ParentId");

                    b.Property<int>("SiteGroupId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_groups", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Name");

                    b.Property<int?>("ParentId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("ParentId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_survey_configuration_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("SiteId");

                    b.Property<int>("SiteSurveyConfigurationId");

                    b.Property<int>("SurveyConfigurationId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("SiteSurveyConfigurationId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_survey_configurations", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int>("SiteId");

                    b.Property<int>("SurveyConfigurationId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("SiteId");

                    b.HasIndex("SurveyConfigurationId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_tag_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("SiteId");

                    b.Property<int>("SiteTagId");

                    b.Property<int?>("TagId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_tags", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("SiteId");

                    b.Property<int?>("TagId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("SiteId");

                    b.HasIndex("TagId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name")
                        .HasMaxLength(255);

                    b.Property<int?>("SiteId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_worker_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int?>("SiteId");

                    b.Property<int?>("SiteWorkerId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<int?>("WorkerId");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_workers", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<int?>("SiteId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<int?>("WorkerId");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("SiteId");

                    b.HasIndex("WorkerId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.sites", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.survey_configuration_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int>("QuestionSetId");

                    b.Property<DateTime>("Start");

                    b.Property<DateTime>("Stop");

                    b.Property<int>("SurveyConfigurationId");

                    b.Property<int>("TimeOut");

                    b.Property<int>("TimeToLive");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("SurveyConfigurationId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.survey_configurations", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Name");

                    b.Property<int>("QuestionSetId");

                    b.Property<DateTime>("Start");

                    b.Property<DateTime>("Stop");

                    b.Property<int>("TimeOut");

                    b.Property<int>("TimeToLive");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("QuestionSetId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.tag_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Name")
                        .HasMaxLength(255);

                    b.Property<int?>("TagId");

                    b.Property<int?>("TaggingsCount");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.tagging_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int?>("CheckListId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("TagId");

                    b.Property<int?>("TaggerId");

                    b.Property<int?>("TaggingId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.taggings", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<int?>("CheckListId");

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("TagId");

                    b.Property<int?>("TaggerId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

                    b.HasIndex("CheckListId");

                    b.HasIndex("TagId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.tags", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Name")
                        .HasMaxLength(255);

                    b.Property<int?>("TaggingsCount");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.unit_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("CustomerNo");

                    b.Property<string>("InSightVersion");

                    b.Property<string>("LastIp");

                    b.Property<bool>("LeftMenuEnabled");

                    b.Property<string>("Manufacturer");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Model");

                    b.Property<string>("Note");

                    b.Property<string>("Os");

                    b.Property<string>("OsVersion");

                    b.Property<int?>("OtpCode");

                    b.Property<bool>("PushEnabled");

                    b.Property<bool>("SeparateFetchSend");

                    b.Property<string>("SerialNumber");

                    b.Property<int?>("SiteId");

                    b.Property<int>("SyncDefaultDelay");

                    b.Property<bool>("SyncDelayEnabled");

                    b.Property<int>("SyncDelayPrCheckList");

                    b.Property<bool>("SyncDialog");

                    b.Property<int?>("UnitId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.Property<string>("eFormVersion");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.units", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<int?>("CustomerNo");

                    b.Property<string>("InSightVersion");

                    b.Property<string>("LastIp");

                    b.Property<bool>("LeftMenuEnabled");

                    b.Property<string>("Manufacturer");

                    b.Property<int?>("MicrotingUid");

                    b.Property<string>("Model");

                    b.Property<string>("Note");

                    b.Property<string>("Os");

                    b.Property<string>("OsVersion");

                    b.Property<int?>("OtpCode");

                    b.Property<bool>("PushEnabled");

                    b.Property<bool>("SeparateFetchSend");

                    b.Property<string>("SerialNumber");

                    b.Property<int?>("SiteId");

                    b.Property<int>("SyncDefaultDelay");

                    b.Property<bool>("SyncDelayEnabled");

                    b.Property<int>("SyncDelayPrCheckList");

                    b.Property<bool>("SyncDialog");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.Property<string>("eFormVersion");

                    b.HasKey("Id");

                    b.HasIndex("SiteId");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.uploaded_data", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<string>("Checksum")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("CurrentFile")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("ExpirationDate");

                    b.Property<string>("Extension")
                        .HasMaxLength(255);

                    b.Property<string>("FileLocation")
                        .HasMaxLength(255);

                    b.Property<string>("FileName")
                        .HasMaxLength(255);

                    b.Property<short?>("Local");

                    b.Property<int?>("TranscriptionId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("UploaderId");

                    b.Property<string>("UploaderType")
                        .HasMaxLength(255);

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.uploaded_data_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<string>("Checksum")
                        .HasMaxLength(255);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("CurrentFile")
                        .HasMaxLength(255);

                    b.Property<int?>("DataUploadedId");

                    b.Property<DateTime?>("ExpirationDate");

                    b.Property<string>("Extension")
                        .HasMaxLength(255);

                    b.Property<string>("FileLocation")
                        .HasMaxLength(255);

                    b.Property<string>("FileName")
                        .HasMaxLength(255);

                    b.Property<short?>("Local");

                    b.Property<int?>("TranscriptionId");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("UploaderId");

                    b.Property<string>("UploaderType")
                        .HasMaxLength(255);

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.worker_versions", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Email")
                        .HasMaxLength(255);

                    b.Property<string>("FirstName")
                        .HasMaxLength(255);

                    b.Property<string>("LastName")
                        .HasMaxLength(255);

                    b.Property<int>("MicrotingUid");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<int?>("WorkerId");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.workers", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation(autoIDGenStrategy, autoIDGenStrategyValue);

                    b.Property<DateTime?>("CreatedAt");

                    b.Property<string>("Email")
                        .HasMaxLength(255);

                    b.Property<string>("FirstName")
                        .HasMaxLength(255);

                    b.Property<string>("LastName")
                        .HasMaxLength(255);

                    b.Property<int>("MicrotingUid");

                    b.Property<DateTime?>("UpdatedAt");

                    b.Property<int?>("Version");

                    b.Property<string>("WorkflowState")
                        .HasMaxLength(255);

                    b.HasKey("Id");

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

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answer_value_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.answer_values", "AnswerValue")
                        .WithMany()
                        .HasForeignKey("AnswerValueId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answer_values", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.answers", "Answer")
                        .WithMany()
                        .HasForeignKey("AnswerId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.options", "Option")
                        .WithMany()
                        .HasForeignKey("OptionId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.questions", "Question")
                        .WithMany()
                        .HasForeignKey("QuestionId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.answers", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.languages", "Language")
                        .WithMany()
                        .HasForeignKey("LanguageId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.question_sets", "QuestionSet")
                        .WithMany()
                        .HasForeignKey("QuestionSetId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                        .WithMany()
                        .HasForeignKey("SiteId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.survey_configurations", "SurveyConfiguration")
                        .WithMany()
                        .HasForeignKey("SurveyConfigurationId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.units", "Unit")
                        .WithMany()
                        .HasForeignKey("UnitId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.cases", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.check_lists", "CheckList")
                        .WithMany("Cases")
                        .HasForeignKey("CheckListId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                        .WithMany("Cases")
                        .HasForeignKey("SiteId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.units", "Unit")
                        .WithMany()
                        .HasForeignKey("UnitId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.workers", "Worker")
                        .WithMany()
                        .HasForeignKey("WorkerId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.check_list_sites", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.check_lists", "CheckList")
                        .WithMany("CheckListSites")
                        .HasForeignKey("CheckListId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                        .WithMany("CheckListSites")
                        .HasForeignKey("SiteId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.check_lists", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.check_lists", "Parent")
                        .WithMany("Children")
                        .HasForeignKey("ParentId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.field_values", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.check_lists", "CheckList")
                        .WithMany()
                        .HasForeignKey("CheckListId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.fields", "Field")
                        .WithMany("FieldValues")
                        .HasForeignKey("FieldId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.uploaded_data", "UploadedData")
                        .WithMany()
                        .HasForeignKey("UploadedDataId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.workers", "Worker")
                        .WithMany()
                        .HasForeignKey("WorkerId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.fields", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.check_lists", "CheckList")
                        .WithMany("Fields")
                        .HasForeignKey("CheckListId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.field_types", "FieldType")
                        .WithMany()
                        .HasForeignKey("FieldTypeId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.fields", "Parent")
                        .WithMany("Children")
                        .HasForeignKey("ParentFieldId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.folders", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.folders", "Parent")
                        .WithMany("Children")
                        .HasForeignKey("ParentId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.language_question_set_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.language_question_sets", "LanguageQuestionSet")
                        .WithMany()
                        .HasForeignKey("LanguageQuestionSetId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.language_question_sets", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.languages", "Language")
                        .WithMany()
                        .HasForeignKey("LanguageId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.question_sets", "QuestionSet")
                        .WithMany("LanguageQuestionSetses")
                        .HasForeignKey("QuestionSetId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.language_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.languages", "Language")
                        .WithMany()
                        .HasForeignKey("LanguageId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.option_translations", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.languages", "Language")
                        .WithMany()
                        .HasForeignKey("LanguageId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.options", "option")
                        .WithMany("OptionTranslationses")
                        .HasForeignKey("OptionId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.option_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.options", "Option")
                        .WithMany()
                        .HasForeignKey("OptionId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.options", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.questions", "Question")
                        .WithMany("Options")
                        .HasForeignKey("QuestionId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_set_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.question_sets", "QuestionSet")
                        .WithMany()
                        .HasForeignKey("QuestionSetId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_translation_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.question_translations", "QuestionTranslation")
                        .WithMany()
                        .HasForeignKey("QuestionTranslationId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_translations", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.languages", "Language")
                        .WithMany()
                        .HasForeignKey("LanguageId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.questions", "Question")
                        .WithMany("QuestionTranslationses")
                        .HasForeignKey("QuestionId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.question_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.questions", "Question")
                        .WithMany()
                        .HasForeignKey("QuestionId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.questions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.question_sets", "QuestionSet")
                        .WithMany("Questions")
                        .HasForeignKey("QuestionSetId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_group_sites", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.site_groups", "SiteGroup")
                        .WithMany("SiteGroupSites")
                        .HasForeignKey("SiteGroupId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                        .WithMany()
                        .HasForeignKey("SiteId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_groups", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.site_groups", "Parent")
                        .WithMany("Children")
                        .HasForeignKey("ParentId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_survey_configuration_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.site_survey_configurations", "SiteSurveyConfiguration")
                        .WithMany()
                        .HasForeignKey("SiteSurveyConfigurationId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_survey_configurations", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                        .WithMany()
                        .HasForeignKey("SiteId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.survey_configurations", "SurveyConfiguration")
                        .WithMany("SiteSurveyConfigurations")
                        .HasForeignKey("SurveyConfigurationId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_tags", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                        .WithMany("SiteTags")
                        .HasForeignKey("SiteId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.tags", "Tag")
                        .WithMany()
                        .HasForeignKey("TagId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.site_workers", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                        .WithMany("SiteWorkers")
                        .HasForeignKey("SiteId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.workers", "Worker")
                        .WithMany("SiteWorkers")
                        .HasForeignKey("WorkerId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.survey_configuration_versions", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.survey_configurations", "SurveyConfiguration")
                        .WithMany()
                        .HasForeignKey("SurveyConfigurationId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.survey_configurations", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.question_sets", "QuestionSet")
                        .WithMany()
                        .HasForeignKey("QuestionSetId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.taggings", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.check_lists", "CheckList")
                        .WithMany("Taggings")
                        .HasForeignKey("CheckListId");

                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.tags", "Tag")
                        .WithMany("Taggings")
                        .HasForeignKey("TagId");
                });

            modelBuilder.Entity("Microting.eForm.Infrastructure.Data.Entities.units", b =>
                {
                    b.HasOne("Microting.eForm.Infrastructure.Data.Entities.sites", "Site")
                        .WithMany("Units")
                        .HasForeignKey("SiteId");
                });
#pragma warning restore 612, 618
        }
    }
}