// <auto-generated />
using System;
using DAL;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace DAL.Migrations
{
    [DbContext(typeof(WebApiContext))]
    [Migration("20240806071714_InitialCreate")]
    partial class InitialCreate
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "6.0.32")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);

            modelBuilder.Entity("DAL._Shared.SharedModels.WebAppEmployeeInfo", b =>
                {
                    b.Property<int>("WebAppEmployeeInfoId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_EMPLOYEE_INFO_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WebAppEmployeeInfoId"), 1L, 1);

                    b.Property<int>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<int>("CostCentreId")
                        .HasColumnType("int")
                        .HasColumnName("COST_CENTRE_ID");

                    b.Property<int>("DepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<string>("DepartmentName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAME");

                    b.Property<string>("Email")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EMAIL");

                    b.Property<int>("EmployeeId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_ID");

                    b.Property<string>("EmployeeNo")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EMPLOYEE_NO");

                    b.Property<string>("ExtendedDepartmentIdList")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EXTENDED_DEPARTMENT_ID_LIST");

                    b.Property<string>("FirstName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("FIRST_NAME");

                    b.Property<string>("LastName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("LAST_NAME");

                    b.Property<string>("LoginName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("LOGIN_NAME");

                    b.Property<string>("Position")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("POSITION");

                    b.Property<string>("RangName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("RANG_NAME");

                    b.Property<int>("RangOrder")
                        .HasColumnType("int")
                        .HasColumnName("RANG_ORDER");

                    b.Property<string>("RangShortname")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("RANG_SHORTNAME");

                    b.Property<string>("Salutation")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SALUTATION");

                    b.Property<string>("ShortName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SHORT_NAME");

                    b.Property<string>("Title")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("TITLE");

                    b.Property<int>("WebAppId")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ID");

                    b.HasKey("WebAppEmployeeInfoId");

                    b.ToTable("TBSTF_WEB_APP_EMPLOYEE_INFO", "dbo");
                });

            modelBuilder.Entity("DAL._Shared.SharedModels.WebAppUser", b =>
                {
                    b.Property<int>("WebAppUserId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_USER_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WebAppUserId"), 1L, 1);

                    b.Property<string>("ClientVersion")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("CLIENT_VERSION");

                    b.Property<string>("Culture")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("CULTURE");

                    b.Property<DateTime?>("JwtExpiredOn")
                        .HasColumnType("datetime2")
                        .HasColumnName("JWT_EXPIRED_ON");

                    b.Property<string>("Language")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("LANGUAGE");

                    b.Property<DateTime?>("LastLogin")
                        .HasColumnType("datetime2")
                        .HasColumnName("LAST_LOGIN");

                    b.Property<string>("LoginName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("LOGIN_NAME");

                    b.Property<string>("Name")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("NAME");

                    b.Property<string>("Password")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("PASSWORD");

                    b.Property<string>("RoleList")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ROLE_LIST");

                    b.Property<string>("ShortName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SHORT_NAME");

                    b.Property<string>("WebAppRoleList")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_ROLE_LIST");

                    b.HasKey("WebAppUserId");

                    b.ToTable("TBSTF_WEB_APP_USER", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.AdWebAppToWebAppRole", b =>
                {
                    b.Property<int>("AdWebAppToWebAppRoleId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("AD_WEB_APP_TO_WEB_APP_ROLE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("AdWebAppToWebAppRoleId"), 1L, 1);

                    b.Property<string>("AdWebAppName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("AD_WEB_APP_NAME");

                    b.Property<string>("AdWebAppRoleName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("AD_WEB_APP_ROLE_NAME");

                    b.Property<int>("WebAppId")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ID");

                    b.HasKey("AdWebAppToWebAppRoleId");

                    b.ToTable("TBSTF_AD_WEB_APP_TO_WEB_APP_ROLE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.CostCentre", b =>
                {
                    b.Property<int>("CostCentreId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("COST_CENTRE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CostCentreId"), 1L, 1);

                    b.Property<string>("CostCentreName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COST_CENTRE_NAME");

                    b.Property<int>("SortOrder")
                        .HasColumnType("int")
                        .HasColumnName("SORT_ORDER");

                    b.HasKey("CostCentreId");

                    b.ToTable("TBSTF_COST_CENTRE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.Department", b =>
                {
                    b.Property<int>("DepartmentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DepartmentId"), 1L, 1);

                    b.Property<string>("AdGroupDepartmentName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("AD_GROUP_DEPARTMENT_NAME");

                    b.Property<int?>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<string>("CostCentre")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COST_CENTRE");

                    b.Property<int>("CostCentreId")
                        .HasColumnType("int")
                        .HasColumnName("COST_CENTRE_ID");

                    b.Property<string>("DepartmentName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAME");

                    b.Property<string>("DepartmentNameFolder")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAME_FOLDER");

                    b.Property<int>("DepartmentTypeId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_TYPE_ID");

                    b.Property<string>("ExecutiveDirector")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EXECUTIVE_DIRECTOR");

                    b.Property<int?>("ExecutiveDirectorId")
                        .HasColumnType("int")
                        .HasColumnName("EXECUTIVE_DIRECTOR_ID");

                    b.Property<string>("HeadofDepartment")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("HEADOF_DEPARTMENT");

                    b.Property<int?>("HeadofDepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("HEADOF_DEPARTMENT_ID");

                    b.Property<bool>("IsVirtual")
                        .HasColumnType("bit")
                        .HasColumnName("IS_VIRTUAL");

                    b.Property<string>("ManagingDirector")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("MANAGING_DIRECTOR");

                    b.Property<int?>("ManagingDirectorId")
                        .HasColumnType("int")
                        .HasColumnName("MANAGING_DIRECTOR_ID");

                    b.HasKey("DepartmentId");

                    b.ToTable("TBSTF_DEPARTMENT", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.DepartmentToWebAppToEmployeeForWindream", b =>
                {
                    b.Property<int>("DepartmentToWebAppToEmployeeForWindreamId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_TO_WEB_APP_TO_EMPLOYEE_FOR_WINDREAM_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DepartmentToWebAppToEmployeeForWindreamId"), 1L, 1);

                    b.Property<int?>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<int>("DepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<string>("DepartmentName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAME");

                    b.Property<int>("EmployeeId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_ID");

                    b.Property<int>("IsMain")
                        .HasColumnType("int")
                        .HasColumnName("IS_MAIN");

                    b.Property<string>("LoginName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("LOGIN_NAME");

                    b.Property<string>("ShortName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SHORT_NAME");

                    b.HasKey("DepartmentToWebAppToEmployeeForWindreamId");

                    b.ToTable("TBSTF_DEPARTMENT_TO_WEB_APP_TO_EMPLOYEE_FOR_WINDREAM", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.DocumentArt", b =>
                {
                    b.Property<int>("DocumentArtId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("DOCUMENT_ART_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DocumentArtId"), 1L, 1);

                    b.Property<int>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<string>("Comment")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COMMENT");

                    b.Property<string>("DepartmentNamesList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAMES_LIST");

                    b.Property<string>("Folder")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("FOLDER");

                    b.Property<string>("Name")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("NAME");

                    b.Property<string>("RootPath")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ROOT_PATH");

                    b.Property<string>("Shortname")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SHORTNAME");

                    b.HasKey("DocumentArtId");

                    b.ToTable("TBSTF_DOCUMENT_ART", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.DocumentArtToDepartment", b =>
                {
                    b.Property<int>("DocumentArtToDepartmentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("DOCUMENT_ART_TO_DEPARTMENT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DocumentArtToDepartmentId"), 1L, 1);

                    b.Property<int>("DepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<string>("DocumentArtFolder")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DOCUMENT_ART_FOLDER");

                    b.Property<int>("DocumentArtId")
                        .HasColumnType("int")
                        .HasColumnName("DOCUMENT_ART_ID");

                    b.Property<string>("DocumentArtName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DOCUMENT_ART_NAME");

                    b.Property<string>("DocumentArtShortname")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DOCUMENT_ART_SHORTNAME");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit")
                        .HasColumnName("IS_ACTIVE");

                    b.Property<bool?>("UseGlobix")
                        .HasColumnType("bit")
                        .HasColumnName("USE_GLOBIX");

                    b.HasKey("DocumentArtToDepartmentId");

                    b.ToTable("TBSTF_DOCUMENT_ART_TO_DEPARTMENT", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.Employee", b =>
                {
                    b.Property<int>("EmployeeId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("EmployeeId"), 1L, 1);

                    b.Property<string>("AttributeIdList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ATTRIBUTE_ID_LIST");

                    b.Property<string>("AttributeNamesList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ATTRIBUTE_NAMES_LIST");

                    b.Property<int>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<string>("DepartmentIdList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_ID_LIST");

                    b.Property<string>("DepartmentNamesList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAMES_LIST");

                    b.Property<string>("Email")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EMAIL");

                    b.Property<string>("EmployeeNo")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EMPLOYEE_NO");

                    b.Property<string>("FirstName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("FIRST_NAME");

                    b.Property<bool?>("IsActive")
                        .HasColumnType("bit")
                        .HasColumnName("IS_ACTIVE");

                    b.Property<string>("LastName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("LAST_NAME");

                    b.Property<string>("LoginName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("LOGIN_NAME");

                    b.Property<int?>("MainDepartmentId")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("int")
                        .HasColumnName("MAIN_DEPARTMENT_ID");

                    b.Property<string>("MandantCode")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("MANDANT_CODE");

                    b.Property<string>("MobilePhoneNo")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("MOBILE_PHONE_NO");

                    b.Property<string>("PhoneNo")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("PHONE_NO");

                    b.Property<string>("Position")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("POSITION");

                    b.Property<int?>("RangId")
                        .HasColumnType("int")
                        .HasColumnName("RANG_ID");

                    b.Property<string>("Salutation")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SALUTATION");

                    b.Property<string>("ShortName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SHORT_NAME");

                    b.Property<string>("Title")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("TITLE");

                    b.Property<string>("WebappIdList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEBAPP_ID_LIST");

                    b.Property<string>("WebappNamesList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEBAPP_NAMES_LIST");

                    b.HasKey("EmployeeId");

                    b.ToTable("TBSTF_EMPLOYEE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.EmployeeAttribute", b =>
                {
                    b.Property<int>("EmployeeAttributeId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_ATTRIBUTE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("EmployeeAttributeId"), 1L, 1);

                    b.Property<string>("Name")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("NAME");

                    b.Property<string>("RoleList")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ROLE_LIST");

                    b.Property<int?>("SeqNo")
                        .HasColumnType("int")
                        .HasColumnName("SEQ_NO");

                    b.Property<string>("Shortname")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SHORTNAME");

                    b.HasKey("EmployeeAttributeId");

                    b.ToTable("TBSTF_EMPLOYEE_ATTRIBUTE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.EmployeeStatus", b =>
                {
                    b.Property<int>("EmployeeStatusId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_STATUS_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("EmployeeStatusId"), 1L, 1);

                    b.Property<string>("EmployeeStatusName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EMPLOYEE_STATUS_NAME");

                    b.HasKey("EmployeeStatusId");

                    b.ToTable("TBSTF_EMPLOYEE_STATUS", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.EmployeeToAttribute", b =>
                {
                    b.Property<int>("EmployeeToAttributeId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_TO_ATTRIBUTE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("EmployeeToAttributeId"), 1L, 1);

                    b.Property<int>("EmployeeAttributeId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_ATTRIBUTE_ID");

                    b.Property<int>("EmployeeId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_ID");

                    b.HasKey("EmployeeToAttributeId");

                    b.ToTable("TBSTF_EMPLOYEE_TO_ATTRIBUTE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.EmployeeToDepartment", b =>
                {
                    b.Property<int>("EmployeeToDepartmentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_TO_DEPARTMENT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("EmployeeToDepartmentId"), 1L, 1);

                    b.Property<int>("DepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<string>("DepartmentName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAME");

                    b.Property<decimal>("EmployeeBudget")
                        .HasColumnType("decimal(18,2)")
                        .HasColumnName("EMPLOYEE_BUDGET");

                    b.Property<int>("EmployeeId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_ID");

                    b.Property<int?>("EmployeeStatusId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_STATUS_ID");

                    b.Property<int?>("RangId")
                        .HasColumnType("int")
                        .HasColumnName("RANG_ID");

                    b.HasKey("EmployeeToDepartmentId");

                    b.ToTable("TBSTF_EMPLOYEE_TO_DEPARTMENT", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.EmployeeToWebApp", b =>
                {
                    b.Property<int>("EmployeeToWebAppId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_TO_WEB_APP_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("EmployeeToWebAppId"), 1L, 1);

                    b.Property<string>("AdditionalRoleIdList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ADDITIONAL_ROLE_ID_LIST");

                    b.Property<string>("AdditionalRoleNameList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ADDITIONAL_ROLE_NAME_LIST");

                    b.Property<int?>("DepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<string>("DepartmentName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAME");

                    b.Property<int>("EmployeeId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_ID");

                    b.Property<string>("ExtendedDepartmentIdList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EXTENDED_DEPARTMENT_ID_LIST");

                    b.Property<string>("ExtendedDepartmentNameList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("EXTENDED_DEPARTMENT_NAME_LIST");

                    b.Property<int>("WebAppId")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ID");

                    b.Property<string>("WebAppName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_NAME");

                    b.Property<int>("WebAppRoleId")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ROLE_ID");

                    b.Property<string>("WebAppRoleName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_ROLE_NAME");

                    b.HasKey("EmployeeToWebAppId");

                    b.ToTable("TBSTF_EMPLOYEE_TO_WEB_APP", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.Project", b =>
                {
                    b.Property<int>("ProjectId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("PROJECT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ProjectId"), 1L, 1);

                    b.Property<string>("ProjectName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("PROJECT_NAME");

                    b.HasKey("ProjectId");

                    b.ToTable("TBSTF_PROJECT", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.Rang", b =>
                {
                    b.Property<int>("RangId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("RANG_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RangId"), 1L, 1);

                    b.Property<string>("RangName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("RANG_NAME");

                    b.Property<int>("RangOrder")
                        .HasColumnType("int")
                        .HasColumnName("RANG_ORDER");

                    b.Property<string>("RangShortname")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("RANG_SHORTNAME");

                    b.HasKey("RangId");

                    b.ToTable("TBSTF_RANG", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.Subsidiary", b =>
                {
                    b.Property<int>("SubsidiaryId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("SUBSIDIARY_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("SubsidiaryId"), 1L, 1);

                    b.Property<int?>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<string>("Comment")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COMMENT");

                    b.Property<string>("Name")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("NAME");

                    b.Property<string>("SubsidiaryCode")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SUBSIDIARY_CODE");

                    b.HasKey("SubsidiaryId");

                    b.ToTable("TBSTF_SUBSIDIARY", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WebApp", b =>
                {
                    b.Property<int>("WebAppId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WebAppId"), 1L, 1);

                    b.Property<string>("AdWebAppName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("AD_WEB_APP_NAME");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit")
                        .HasColumnName("IS_ACTIVE");

                    b.Property<string>("WebAppLinkDev")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_LINK_DEV");

                    b.Property<string>("WebAppLinkLive")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_LINK_LIVE");

                    b.Property<string>("WebAppName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_NAME");

                    b.HasKey("WebAppId");

                    b.ToTable("TBSTF_WEB_APP", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WebAppAdditionalRole", b =>
                {
                    b.Property<int>("WebAppAdditionalRoleId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ADDITIONAL_ROLE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WebAppAdditionalRoleId"), 1L, 1);

                    b.Property<string>("AdWebAppAdditionalRoleName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("AD_WEB_APP_ADDITIONAL_ROLE_NAME");

                    b.Property<string>("WebAppAdditionalRoleName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_ADDITIONAL_ROLE_NAME");

                    b.Property<int>("WebAppId")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ID");

                    b.HasKey("WebAppAdditionalRoleId");

                    b.ToTable("TBSTF_WEB_APP_ADDITIONAL_ROLE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WebAppRole", b =>
                {
                    b.Property<int>("WebAppRoleId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ROLE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WebAppRoleId"), 1L, 1);

                    b.Property<int>("WebAppRoleHierarchy")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ROLE_HIERARCHY");

                    b.Property<string>("WebAppRoleName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_ROLE_NAME");

                    b.HasKey("WebAppRoleId");

                    b.ToTable("TBSTF_WEB_APP_ROLE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WebAppToDepartment", b =>
                {
                    b.Property<int>("WebAppToDepartmentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_TO_DEPARTMENT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WebAppToDepartmentId"), 1L, 1);

                    b.Property<int>("DepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<string>("DepartmentName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAME");

                    b.Property<int>("EmployeeToWebAppId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_TO_WEB_APP_ID");

                    b.HasKey("WebAppToDepartmentId");

                    b.ToTable("TBSTF_WEB_APP_TO_DEPARTMENT", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WebAppToWebAppAdditionalRole", b =>
                {
                    b.Property<int>("WebAppToWebAppAdditionalRoleId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_TO_WEB_APP_ADDITIONAL_ROLE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WebAppToWebAppAdditionalRoleId"), 1L, 1);

                    b.Property<int>("EmployeeToWebAppId")
                        .HasColumnType("int")
                        .HasColumnName("EMPLOYEE_TO_WEB_APP_ID");

                    b.Property<int>("WebAppAdditionalRoleId")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ADDITIONAL_ROLE_ID");

                    b.HasKey("WebAppToWebAppAdditionalRoleId");

                    b.ToTable("TBSTF_WEB_APP_TO_WEB_APP_ADDITIONAL_ROLE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WebAppToWebAppRole", b =>
                {
                    b.Property<int>("WebAppToWebAppRoleId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_TO_WEB_APP_ROLE_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WebAppToWebAppRoleId"), 1L, 1);

                    b.Property<int>("WebAppId")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ID");

                    b.Property<int>("WebAppRoleHierarchy")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ROLE_HIERARCHY");

                    b.Property<int>("WebAppRoleId")
                        .HasColumnType("int")
                        .HasColumnName("WEB_APP_ROLE_ID");

                    b.Property<string>("WebAppRoleName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WEB_APP_ROLE_NAME");

                    b.HasKey("WebAppToWebAppRoleId");

                    b.ToTable("TBSTF_WEB_APP_TO_WEB_APP_ROLE", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WindreamColumnsToDepartment", b =>
                {
                    b.Property<int>("WindreamColumnsToDepartmentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_COLUMNS_TO_DEPARTMENT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WindreamColumnsToDepartmentId"), 1L, 1);

                    b.Property<int>("AttributeDwAttrId")
                        .HasColumnType("int")
                        .HasColumnName("ATTRIBUTE_DW_ATTR_ID");

                    b.Property<int>("AttributeDwAttrType")
                        .HasColumnType("int")
                        .HasColumnName("ATTRIBUTE_DW_ATTR_TYPE");

                    b.Property<string>("AttributeSzColumnName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ATTRIBUTE_SZ_COLUMN_NAME");

                    b.Property<int>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<string>("Comment")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COMMENT");

                    b.Property<int>("ComumnLength")
                        .HasColumnType("int")
                        .HasColumnName("COMUMN_LENGTH");

                    b.Property<int>("DepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<string>("ObjectTypeAttributeSzName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("OBJECT_TYPE_ATTRIBUTE_SZ_NAME");

                    b.Property<string>("ObjectTypeszDocTypeName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("OBJECT_TYPESZ_DOC_TYPE_NAME");

                    b.Property<int>("Seq")
                        .HasColumnType("int")
                        .HasColumnName("SEQ");

                    b.Property<int>("WindreamSearchId")
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_ID");

                    b.HasKey("WindreamColumnsToDepartmentId");

                    b.ToTable("TBSTF_WINDREAM_COLUMNS_TO_DEPARTMENT", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WindreamIndex", b =>
                {
                    b.Property<int>("WindreamIndexId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_INDEX_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WindreamIndexId"), 1L, 1);

                    b.Property<int>("AttributeDwAttrId")
                        .HasColumnType("int")
                        .HasColumnName("ATTRIBUTE_DW_ATTR_ID");

                    b.Property<int?>("AttributeDwAttrType")
                        .HasColumnType("int")
                        .HasColumnName("ATTRIBUTE_DW_ATTR_TYPE");

                    b.Property<string>("AttributeSzColumnName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ATTRIBUTE_SZ_COLUMN_NAME");

                    b.Property<int>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<string>("Comment")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COMMENT");

                    b.Property<int?>("ComumnLength")
                        .HasColumnType("int")
                        .HasColumnName("COMUMN_LENGTH");

                    b.Property<string>("ObjectTypeAttributeSzName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("OBJECT_TYPE_ATTRIBUTE_SZ_NAME");

                    b.HasKey("WindreamIndexId");

                    b.ToTable("TBSTF_WINDREAM_INDEX", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WindreamIndexToWindreamSearchToDepartment", b =>
                {
                    b.Property<int>("WindreamIndexToWindreamSearchToDepartmentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_INDEX_TO_WINDREAM_SEARCH_TO_DEPARTMENT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WindreamIndexToWindreamSearchToDepartmentId"), 1L, 1);

                    b.Property<string>("AttributeSzColumnName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ATTRIBUTE_SZ_COLUMN_NAME");

                    b.Property<string>("ObjectTypeAttributeSzName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("OBJECT_TYPE_ATTRIBUTE_SZ_NAME");

                    b.Property<int>("Seq")
                        .HasColumnType("int")
                        .HasColumnName("SEQ");

                    b.Property<int>("WindreamIndexId")
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_INDEX_ID");

                    b.Property<int>("WindreamSearchToDepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_TO_DEPARTMENT_ID");

                    b.HasKey("WindreamIndexToWindreamSearchToDepartmentId");

                    b.ToTable("TBSTF_WINDREAM_INDEX_TO_WINDREAM_SEARCH_TO_DEPARTMENT", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WindreamInputFolder", b =>
                {
                    b.Property<int>("WindreamInputFolderId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_INPUT_FOLDER_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WindreamInputFolderId"), 1L, 1);

                    b.Property<int?>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<string>("Comment")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COMMENT");

                    b.Property<string>("Name")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("NAME");

                    b.Property<string>("XMLPath")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("XMLPATH");

                    b.HasKey("WindreamInputFolderId");

                    b.ToTable("TBSTF_WINDREAM_INPUT_FOLDER", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WindreamSearch", b =>
                {
                    b.Property<int>("WindreamSearchId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WindreamSearchId"), 1L, 1);

                    b.Property<int>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<int?>("Color")
                        .HasColumnType("int")
                        .HasColumnName("COLOR");

                    b.Property<string>("Comment")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COMMENT");

                    b.Property<string>("Name")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("NAME");

                    b.Property<int?>("SearchIndex")
                        .HasColumnType("int")
                        .HasColumnName("SEARCH_INDEX");

                    b.Property<string>("XMLPath")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("XMLPATH");

                    b.HasKey("WindreamSearchId");

                    b.ToTable("TBSTF_WINDREAM_SEARCH", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WindreamSearchItem", b =>
                {
                    b.Property<int>("WindreamSearchItemId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WindreamSearchItemId"), 1L, 1);

                    b.Property<string>("AlternativeWindreamSearchItemIdList")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("ALTERNATIVE_WINDREAM_SEARCH_ITEM_ID_LIST");

                    b.Property<string>("Caption")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("CAPTION");

                    b.Property<int>("ClientId")
                        .HasColumnType("int")
                        .HasColumnName("CLIENT_ID");

                    b.Property<string>("Comment")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("COMMENT");

                    b.Property<string>("ConnectedList")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("CONNECTED_LIST");

                    b.Property<string>("Name")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("NAME");

                    b.Property<string>("PlaceHolder")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("PLACE_HOLDER");

                    b.Property<string>("SearchTemplate")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("SEARCH_TEMPLATE");

                    b.HasKey("WindreamSearchItemId");

                    b.ToTable("TBSTF_WINDREAM_SEARCH_ITEM", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WindreamSearchItemToWindreamSearchToDepartment", b =>
                {
                    b.Property<int>("WindreamSearchItemToWindreamSearchToDepartmentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_TO_WINDREAM_SEARCH_TO_DEPARTMENT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WindreamSearchItemToWindreamSearchToDepartmentId"), 1L, 1);

                    b.Property<int>("DepartmentId")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<int>("Seq")
                        .HasColumnType("int")
                        .HasColumnName("SEQ");

                    b.Property<int?>("WindreamSearchIndexType")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_INDEX_TYPE");

                    b.Property<string>("WindreamSearchItemCaption")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_CAPTION");

                    b.Property<string>("WindreamSearchItemComment")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_COMMENT");

                    b.Property<string>("WindreamSearchItemConnectedList")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_CONNECTED_LIST");

                    b.Property<int>("WindreamSearchItemId")
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_ID");

                    b.Property<string>("WindreamSearchItemName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_NAME");

                    b.Property<string>("WindreamSearchItemPlaceHolder")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_PLACE_HOLDER");

                    b.Property<string>("WindreamSearchItemSearchTemplate")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_SEARCH_TEMPLATE");

                    b.Property<string>("WindreamSearchItemTemplate")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_ITEM_TEMPLATE");

                    b.Property<int>("WindreamSearchToDepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_TO_DEPARTMENT_ID");

                    b.HasKey("WindreamSearchItemToWindreamSearchToDepartmentId");

                    b.ToTable("TBSTF_WINDREAM_SEARCH_ITEM_TO_WINDREAM_SEARCH_TO_DEPARTMENT", "dbo");
                });

            modelBuilder.Entity("DAL.Models.Entities.WindreamSearchToDepartment", b =>
                {
                    b.Property<int>("WindreamSearchToDepartmentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_TO_DEPARTMENT_ID");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("WindreamSearchToDepartmentId"), 1L, 1);

                    b.Property<int>("DepartmentId")
                        .HasColumnType("int")
                        .HasColumnName("DEPARTMENT_ID");

                    b.Property<string>("DepartmentName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("DEPARTMENT_NAME");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit")
                        .HasColumnName("IS_ACTIVE");

                    b.Property<int>("Seq")
                        .HasColumnType("int")
                        .HasColumnName("SEQ");

                    b.Property<int?>("WindreamSearchColor")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_COLOR");

                    b.Property<string>("WindreamSearchComment")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_COMMENT");

                    b.Property<int>("WindreamSearchId")
                        .HasColumnType("int")
                        .HasColumnName("WINDREAM_SEARCH_ID");

                    b.Property<string>("WindreamSearchName")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_NAME");

                    b.Property<string>("WindreamSearchXMLPath")
                        .ValueGeneratedOnAddOrUpdate()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("WINDREAM_SEARCH_XMLPATH");

                    b.HasKey("WindreamSearchToDepartmentId");

                    b.ToTable("TBSTF_WINDREAM_SEARCH_TO_DEPARTMENT", "dbo");
                });
#pragma warning restore 612, 618
        }
    }
}
