From d01a3b955b16f8b1d0246b69cda21e9ca3211d8b Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Mon, 5 Aug 2024 12:11:21 +0200 Subject: [PATCH] feat: Created EF Core data migrations --- .../20240805093234_InitialCreate.Designer.cs | 1092 +++++++++++++++++ .../20240805093234_InitialCreate.cs | 751 ++++++++++++ DAL/Migrations/WebApiContextModelSnapshot.cs | 1090 ++++++++++++++++ .../Controllers/EmployeeController.cs | 1 - 4 files changed, 2933 insertions(+), 1 deletion(-) create mode 100644 DAL/Migrations/20240805093234_InitialCreate.Designer.cs create mode 100644 DAL/Migrations/20240805093234_InitialCreate.cs create mode 100644 DAL/Migrations/WebApiContextModelSnapshot.cs diff --git a/DAL/Migrations/20240805093234_InitialCreate.Designer.cs b/DAL/Migrations/20240805093234_InitialCreate.Designer.cs new file mode 100644 index 0000000..8041301 --- /dev/null +++ b/DAL/Migrations/20240805093234_InitialCreate.Designer.cs @@ -0,0 +1,1092 @@ +// +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("20240805093234_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("WebAppEmployeeInfoId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppEmployeeInfoId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("CostCentreId") + .HasColumnType("int"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("EmployeeNo") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtendedDepartmentIdList") + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .HasColumnType("nvarchar(max)"); + + b.Property("LastName") + .HasColumnType("nvarchar(max)"); + + b.Property("LoginName") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("RangName") + .HasColumnType("nvarchar(max)"); + + b.Property("RangOrder") + .HasColumnType("int"); + + b.Property("RangShortname") + .HasColumnType("nvarchar(max)"); + + b.Property("Salutation") + .HasColumnType("nvarchar(max)"); + + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.HasKey("WebAppEmployeeInfoId"); + + b.ToTable("WebAppEmployeeInfo", "webapi"); + }); + + modelBuilder.Entity("DAL._Shared.SharedModels.WebAppUser", b => + { + b.Property("WebAppUserId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppUserId"), 1L, 1); + + b.Property("ClientVersion") + .HasColumnType("nvarchar(max)"); + + b.Property("Culture") + .HasColumnType("nvarchar(max)"); + + b.Property("JwtExpiredOn") + .HasColumnType("datetime2"); + + b.Property("Language") + .HasColumnType("nvarchar(max)"); + + b.Property("LastLogin") + .HasColumnType("datetime2"); + + b.Property("LoginName") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleList") + .HasColumnType("nvarchar(max)"); + + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppRoleList") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WebAppUserId"); + + b.ToTable("WebAppUser", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.AdWebAppToWebAppRole", b => + { + b.Property("AdWebAppToWebAppRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("AdWebAppToWebAppRoleId"), 1L, 1); + + b.Property("AdWebAppName") + .HasColumnType("nvarchar(max)"); + + b.Property("AdWebAppRoleName") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.HasKey("AdWebAppToWebAppRoleId"); + + b.ToTable("AdWebAppToWebAppRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.CostCentre", b => + { + b.Property("CostCentreId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CostCentreId"), 1L, 1); + + b.Property("CostCentreName") + .HasColumnType("nvarchar(max)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.HasKey("CostCentreId"); + + b.ToTable("CostCentre", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Department", b => + { + b.Property("DepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DepartmentId"), 1L, 1); + + b.Property("AdGroupDepartmentName") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("CostCentre") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("CostCentreId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentNameFolder") + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentTypeId") + .HasColumnType("int"); + + b.Property("ExecutiveDirector") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ExecutiveDirectorId") + .HasColumnType("int"); + + b.Property("HeadofDepartment") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("HeadofDepartmentId") + .HasColumnType("int"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("ManagingDirector") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ManagingDirectorId") + .HasColumnType("int"); + + b.HasKey("DepartmentId"); + + b.ToTable("Department", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.DepartmentToWebAppToEmployeeForWindream", b => + { + b.Property("DepartmentToWebAppToEmployeeForWindreamId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DepartmentToWebAppToEmployeeForWindreamId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("IsMain") + .HasColumnType("int"); + + b.Property("LoginName") + .HasColumnType("nvarchar(max)"); + + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("DepartmentToWebAppToEmployeeForWindreamId"); + + b.ToTable("DepartmentToWebAppToEmployeeForWindream", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.DocumentArt", b => + { + b.Property("DocumentArtId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DocumentArtId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentNamesList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("Folder") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RootPath") + .HasColumnType("nvarchar(max)"); + + b.Property("Shortname") + .HasColumnType("nvarchar(max)"); + + b.HasKey("DocumentArtId"); + + b.ToTable("DocumentArt", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.DocumentArtToDepartment", b => + { + b.Property("DocumentArtToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DocumentArtToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DocumentArtFolder") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("DocumentArtId") + .HasColumnType("int"); + + b.Property("DocumentArtName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("DocumentArtShortname") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("UseGlobix") + .HasColumnType("bit"); + + b.HasKey("DocumentArtToDepartmentId"); + + b.ToTable("DocumentArtToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Employee", b => + { + b.Property("EmployeeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeId"), 1L, 1); + + b.Property("AttributeIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("AttributeNamesList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("DepartmentIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentNamesList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeNo") + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("LastName") + .HasColumnType("nvarchar(max)"); + + b.Property("LoginName") + .HasColumnType("nvarchar(max)"); + + b.Property("MainDepartmentId") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("MandantCode") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("MobilePhoneNo") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("RangId") + .HasColumnType("int"); + + b.Property("Salutation") + .HasColumnType("nvarchar(max)"); + + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("WebappIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WebappNamesList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("EmployeeId"); + + b.ToTable("Employee", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeAttribute", b => + { + b.Property("EmployeeAttributeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeAttributeId"), 1L, 1); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleList") + .HasColumnType("nvarchar(max)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("Shortname") + .HasColumnType("nvarchar(max)"); + + b.HasKey("EmployeeAttributeId"); + + b.ToTable("EmployeeAttribute", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeStatus", b => + { + b.Property("EmployeeStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeStatusId"), 1L, 1); + + b.Property("EmployeeStatusName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("EmployeeStatusId"); + + b.ToTable("EmployeeStatus", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeToAttribute", b => + { + b.Property("EmployeeToAttributeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeToAttributeId"), 1L, 1); + + b.Property("EmployeeAttributeId") + .HasColumnType("int"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.HasKey("EmployeeToAttributeId"); + + b.ToTable("EmployeeToAttribute", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeToDepartment", b => + { + b.Property("EmployeeToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeBudget") + .HasColumnType("decimal(18,2)"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("EmployeeStatusId") + .HasColumnType("int"); + + b.Property("RangId") + .HasColumnType("int"); + + b.HasKey("EmployeeToDepartmentId"); + + b.ToTable("EmployeeToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeToWebApp", b => + { + b.Property("EmployeeToWebAppId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeToWebAppId"), 1L, 1); + + b.Property("AdditionalRoleIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("AdditionalRoleNameList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("ExtendedDepartmentIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtendedDepartmentNameList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.Property("WebAppName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppRoleId") + .HasColumnType("int"); + + b.Property("WebAppRoleName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("EmployeeToWebAppId"); + + b.ToTable("EmployeeToWebApp", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ProjectId"), 1L, 1); + + b.Property("ProjectName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("ProjectId"); + + b.ToTable("Project", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Rang", b => + { + b.Property("RangId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("RangId"), 1L, 1); + + b.Property("RangName") + .HasColumnType("nvarchar(max)"); + + b.Property("RangOrder") + .HasColumnType("int"); + + b.Property("RangShortname") + .HasColumnType("nvarchar(max)"); + + b.HasKey("RangId"); + + b.ToTable("Rang", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Subsidiary", b => + { + b.Property("SubsidiaryId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("SubsidiaryId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("SubsidiaryCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("SubsidiaryId"); + + b.ToTable("Subsidiary", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebApp", b => + { + b.Property("WebAppId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppId"), 1L, 1); + + b.Property("AdWebAppName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("WebAppLinkDev") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppLinkLive") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WebAppId"); + + b.ToTable("WebApp", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppAdditionalRole", b => + { + b.Property("WebAppAdditionalRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppAdditionalRoleId"), 1L, 1); + + b.Property("AdWebAppAdditionalRoleName") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppAdditionalRoleName") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.HasKey("WebAppAdditionalRoleId"); + + b.ToTable("WebAppAdditionalRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppRole", b => + { + b.Property("WebAppRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppRoleId"), 1L, 1); + + b.Property("WebAppRoleHierarchy") + .HasColumnType("int"); + + b.Property("WebAppRoleName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WebAppRoleId"); + + b.ToTable("WebAppRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppToDepartment", b => + { + b.Property("WebAppToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeToWebAppId") + .HasColumnType("int"); + + b.HasKey("WebAppToDepartmentId"); + + b.ToTable("WebAppToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppToWebAppAdditionalRole", b => + { + b.Property("WebAppToWebAppAdditionalRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppToWebAppAdditionalRoleId"), 1L, 1); + + b.Property("EmployeeToWebAppId") + .HasColumnType("int"); + + b.Property("WebAppAdditionalRoleId") + .HasColumnType("int"); + + b.HasKey("WebAppToWebAppAdditionalRoleId"); + + b.ToTable("WebAppToWebAppAdditionalRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppToWebAppRole", b => + { + b.Property("WebAppToWebAppRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppToWebAppRoleId"), 1L, 1); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.Property("WebAppRoleHierarchy") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("WebAppRoleId") + .HasColumnType("int"); + + b.Property("WebAppRoleName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("WebAppToWebAppRoleId"); + + b.ToTable("WebAppToWebAppRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamColumnsToDepartment", b => + { + b.Property("WindreamColumnsToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamColumnsToDepartmentId"), 1L, 1); + + b.Property("AttributeDwAttrId") + .HasColumnType("int"); + + b.Property("AttributeDwAttrType") + .HasColumnType("int"); + + b.Property("AttributeSzColumnName") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("ComumnLength") + .HasColumnType("int"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("ObjectTypeAttributeSzName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ObjectTypeszDocTypeName") + .HasColumnType("nvarchar(max)"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("WindreamSearchId") + .HasColumnType("int"); + + b.HasKey("WindreamColumnsToDepartmentId"); + + b.ToTable("WindreamColumnsToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamIndex", b => + { + b.Property("WindreamIndexId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamIndexId"), 1L, 1); + + b.Property("AttributeDwAttrId") + .HasColumnType("int"); + + b.Property("AttributeDwAttrType") + .HasColumnType("int"); + + b.Property("AttributeSzColumnName") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("ComumnLength") + .HasColumnType("int"); + + b.Property("ObjectTypeAttributeSzName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamIndexId"); + + b.ToTable("WindreamIndex", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamIndexToWindreamSearchToDepartment", b => + { + b.Property("WindreamIndexToWindreamSearchToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamIndexToWindreamSearchToDepartmentId"), 1L, 1); + + b.Property("AttributeSzColumnName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ObjectTypeAttributeSzName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("WindreamIndexId") + .HasColumnType("int"); + + b.Property("WindreamSearchToDepartmentId") + .HasColumnType("int"); + + b.HasKey("WindreamIndexToWindreamSearchToDepartmentId"); + + b.ToTable("WindreamIndexToWindreamSearchToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamInputFolder", b => + { + b.Property("WindreamInputFolderId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamInputFolderId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("XMLPath") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamInputFolderId"); + + b.ToTable("WindreamInputFolder", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamSearch", b => + { + b.Property("WindreamSearchId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamSearchId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Color") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("SearchIndex") + .HasColumnType("int"); + + b.Property("XMLPath") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamSearchId"); + + b.ToTable("WindreamSearch", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamSearchItem", b => + { + b.Property("WindreamSearchItemId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamSearchItemId"), 1L, 1); + + b.Property("AlternativeWindreamSearchItemIdList") + .HasColumnType("nvarchar(max)"); + + b.Property("Caption") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("ConnectedList") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PlaceHolder") + .HasColumnType("nvarchar(max)"); + + b.Property("SearchTemplate") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamSearchItemId"); + + b.ToTable("WindreamSearchItem", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamSearchItemToWindreamSearchToDepartment", b => + { + b.Property("WindreamSearchItemToWindreamSearchToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamSearchItemToWindreamSearchToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("WindreamSearchIndexType") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("WindreamSearchItemCaption") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemComment") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemConnectedList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemId") + .HasColumnType("int"); + + b.Property("WindreamSearchItemName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemPlaceHolder") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemSearchTemplate") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemTemplate") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchToDepartmentId") + .HasColumnType("int"); + + b.HasKey("WindreamSearchItemToWindreamSearchToDepartmentId"); + + b.ToTable("WindreamSearchItemToWindreamSearchToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamSearchToDepartment", b => + { + b.Property("WindreamSearchToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamSearchToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("WindreamSearchColor") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("WindreamSearchComment") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchId") + .HasColumnType("int"); + + b.Property("WindreamSearchName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchXMLPath") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamSearchToDepartmentId"); + + b.ToTable("WindreamSearchToDepartment", "webapi"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/DAL/Migrations/20240805093234_InitialCreate.cs b/DAL/Migrations/20240805093234_InitialCreate.cs new file mode 100644 index 0000000..8e64052 --- /dev/null +++ b/DAL/Migrations/20240805093234_InitialCreate.cs @@ -0,0 +1,751 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace DAL.Migrations +{ + public partial class InitialCreate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "webapi"); + + migrationBuilder.CreateTable( + name: "AdWebAppToWebAppRole", + schema: "webapi", + columns: table => new + { + AdWebAppToWebAppRoleId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + WebAppId = table.Column(type: "int", nullable: false), + AdWebAppName = table.Column(type: "nvarchar(max)", nullable: true), + AdWebAppRoleName = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AdWebAppToWebAppRole", x => x.AdWebAppToWebAppRoleId); + }); + + migrationBuilder.CreateTable( + name: "CostCentre", + schema: "webapi", + columns: table => new + { + CostCentreId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + CostCentreName = table.Column(type: "nvarchar(max)", nullable: true), + SortOrder = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CostCentre", x => x.CostCentreId); + }); + + migrationBuilder.CreateTable( + name: "Department", + schema: "webapi", + columns: table => new + { + DepartmentId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), + CostCentreId = table.Column(type: "int", nullable: false), + DepartmentTypeId = table.Column(type: "int", nullable: false), + HeadofDepartmentId = table.Column(type: "int", nullable: true), + ExecutiveDirectorId = table.Column(type: "int", nullable: true), + ManagingDirectorId = table.Column(type: "int", nullable: true), + DepartmentNameFolder = table.Column(type: "nvarchar(max)", nullable: true), + AdGroupDepartmentName = table.Column(type: "nvarchar(max)", nullable: true), + ClientId = table.Column(type: "int", nullable: true), + IsVirtual = table.Column(type: "bit", nullable: false), + CostCentre = table.Column(type: "nvarchar(max)", nullable: true), + HeadofDepartment = table.Column(type: "nvarchar(max)", nullable: true), + ExecutiveDirector = table.Column(type: "nvarchar(max)", nullable: true), + ManagingDirector = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Department", x => x.DepartmentId); + }); + + migrationBuilder.CreateTable( + name: "DepartmentToWebAppToEmployeeForWindream", + schema: "webapi", + columns: table => new + { + DepartmentToWebAppToEmployeeForWindreamId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + EmployeeId = table.Column(type: "int", nullable: false), + DepartmentId = table.Column(type: "int", nullable: false), + DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), + ShortName = table.Column(type: "nvarchar(max)", nullable: true), + LoginName = table.Column(type: "nvarchar(max)", nullable: true), + IsMain = table.Column(type: "int", nullable: false), + ClientId = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DepartmentToWebAppToEmployeeForWindream", x => x.DepartmentToWebAppToEmployeeForWindreamId); + }); + + migrationBuilder.CreateTable( + name: "DocumentArt", + schema: "webapi", + columns: table => new + { + DocumentArtId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + Shortname = table.Column(type: "nvarchar(max)", nullable: true), + RootPath = table.Column(type: "nvarchar(max)", nullable: true), + Folder = table.Column(type: "nvarchar(max)", nullable: true), + Comment = table.Column(type: "nvarchar(max)", nullable: true), + ClientId = table.Column(type: "int", nullable: false), + DepartmentNamesList = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DocumentArt", x => x.DocumentArtId); + }); + + migrationBuilder.CreateTable( + name: "DocumentArtToDepartment", + schema: "webapi", + columns: table => new + { + DocumentArtToDepartmentId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + DepartmentId = table.Column(type: "int", nullable: false), + DocumentArtId = table.Column(type: "int", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + UseGlobix = table.Column(type: "bit", nullable: true), + DocumentArtName = table.Column(type: "nvarchar(max)", nullable: true), + DocumentArtShortname = table.Column(type: "nvarchar(max)", nullable: true), + DocumentArtFolder = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DocumentArtToDepartment", x => x.DocumentArtToDepartmentId); + }); + + migrationBuilder.CreateTable( + name: "Employee", + schema: "webapi", + columns: table => new + { + EmployeeId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + EmployeeNo = table.Column(type: "nvarchar(max)", nullable: true), + Salutation = table.Column(type: "nvarchar(max)", nullable: true), + FirstName = table.Column(type: "nvarchar(max)", nullable: true), + LastName = table.Column(type: "nvarchar(max)", nullable: true), + ShortName = table.Column(type: "nvarchar(max)", nullable: true), + Title = table.Column(type: "nvarchar(max)", nullable: true), + Position = table.Column(type: "nvarchar(max)", nullable: true), + LoginName = table.Column(type: "nvarchar(max)", nullable: true), + Email = table.Column(type: "nvarchar(max)", nullable: true), + RangId = table.Column(type: "int", nullable: true), + ClientId = table.Column(type: "int", nullable: false), + IsActive = table.Column(type: "bit", nullable: true), + MandantCode = table.Column(type: "nvarchar(max)", nullable: true), + MainDepartmentId = table.Column(type: "int", nullable: true), + DepartmentNamesList = table.Column(type: "nvarchar(max)", nullable: true), + DepartmentIdList = table.Column(type: "nvarchar(max)", nullable: true), + WebappNamesList = table.Column(type: "nvarchar(max)", nullable: true), + WebappIdList = table.Column(type: "nvarchar(max)", nullable: true), + AttributeNamesList = table.Column(type: "nvarchar(max)", nullable: true), + AttributeIdList = table.Column(type: "nvarchar(max)", nullable: true), + MobilePhoneNo = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNo = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Employee", x => x.EmployeeId); + }); + + migrationBuilder.CreateTable( + name: "EmployeeAttribute", + schema: "webapi", + columns: table => new + { + EmployeeAttributeId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + Shortname = table.Column(type: "nvarchar(max)", nullable: true), + RoleList = table.Column(type: "nvarchar(max)", nullable: true), + SeqNo = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EmployeeAttribute", x => x.EmployeeAttributeId); + }); + + migrationBuilder.CreateTable( + name: "EmployeeStatus", + schema: "webapi", + columns: table => new + { + EmployeeStatusId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + EmployeeStatusName = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EmployeeStatus", x => x.EmployeeStatusId); + }); + + migrationBuilder.CreateTable( + name: "EmployeeToAttribute", + schema: "webapi", + columns: table => new + { + EmployeeToAttributeId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + EmployeeId = table.Column(type: "int", nullable: false), + EmployeeAttributeId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_EmployeeToAttribute", x => x.EmployeeToAttributeId); + }); + + migrationBuilder.CreateTable( + name: "EmployeeToDepartment", + schema: "webapi", + columns: table => new + { + EmployeeToDepartmentId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + EmployeeId = table.Column(type: "int", nullable: false), + DepartmentId = table.Column(type: "int", nullable: false), + DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), + EmployeeBudget = table.Column(type: "decimal(18,2)", nullable: false), + EmployeeStatusId = table.Column(type: "int", nullable: true), + RangId = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EmployeeToDepartment", x => x.EmployeeToDepartmentId); + }); + + migrationBuilder.CreateTable( + name: "EmployeeToWebApp", + schema: "webapi", + columns: table => new + { + EmployeeToWebAppId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + EmployeeId = table.Column(type: "int", nullable: false), + WebAppId = table.Column(type: "int", nullable: false), + WebAppRoleId = table.Column(type: "int", nullable: false), + DepartmentId = table.Column(type: "int", nullable: true), + WebAppRoleName = table.Column(type: "nvarchar(max)", nullable: true), + WebAppName = table.Column(type: "nvarchar(max)", nullable: true), + DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), + ExtendedDepartmentNameList = table.Column(type: "nvarchar(max)", nullable: true), + ExtendedDepartmentIdList = table.Column(type: "nvarchar(max)", nullable: true), + AdditionalRoleNameList = table.Column(type: "nvarchar(max)", nullable: true), + AdditionalRoleIdList = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EmployeeToWebApp", x => x.EmployeeToWebAppId); + }); + + migrationBuilder.CreateTable( + name: "Project", + schema: "webapi", + columns: table => new + { + ProjectId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + ProjectName = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Project", x => x.ProjectId); + }); + + migrationBuilder.CreateTable( + name: "Rang", + schema: "webapi", + columns: table => new + { + RangId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + RangName = table.Column(type: "nvarchar(max)", nullable: true), + RangShortname = table.Column(type: "nvarchar(max)", nullable: true), + RangOrder = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Rang", x => x.RangId); + }); + + migrationBuilder.CreateTable( + name: "Subsidiary", + schema: "webapi", + columns: table => new + { + SubsidiaryId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + ClientId = table.Column(type: "int", nullable: true), + Name = table.Column(type: "nvarchar(max)", nullable: true), + SubsidiaryCode = table.Column(type: "nvarchar(max)", nullable: true), + Comment = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Subsidiary", x => x.SubsidiaryId); + }); + + migrationBuilder.CreateTable( + name: "WebApp", + schema: "webapi", + columns: table => new + { + WebAppId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + WebAppName = table.Column(type: "nvarchar(max)", nullable: true), + WebAppLinkLive = table.Column(type: "nvarchar(max)", nullable: true), + WebAppLinkDev = table.Column(type: "nvarchar(max)", nullable: true), + IsActive = table.Column(type: "bit", nullable: false), + AdWebAppName = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WebApp", x => x.WebAppId); + }); + + migrationBuilder.CreateTable( + name: "WebAppAdditionalRole", + schema: "webapi", + columns: table => new + { + WebAppAdditionalRoleId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + WebAppId = table.Column(type: "int", nullable: false), + WebAppAdditionalRoleName = table.Column(type: "nvarchar(max)", nullable: true), + AdWebAppAdditionalRoleName = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WebAppAdditionalRole", x => x.WebAppAdditionalRoleId); + }); + + migrationBuilder.CreateTable( + name: "WebAppEmployeeInfo", + schema: "webapi", + columns: table => new + { + WebAppEmployeeInfoId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + EmployeeNo = table.Column(type: "nvarchar(max)", nullable: true), + Salutation = table.Column(type: "nvarchar(max)", nullable: true), + FirstName = table.Column(type: "nvarchar(max)", nullable: true), + LastName = table.Column(type: "nvarchar(max)", nullable: true), + ShortName = table.Column(type: "nvarchar(max)", nullable: true), + Title = table.Column(type: "nvarchar(max)", nullable: true), + Position = table.Column(type: "nvarchar(max)", nullable: true), + LoginName = table.Column(type: "nvarchar(max)", nullable: true), + Email = table.Column(type: "nvarchar(max)", nullable: true), + DepartmentId = table.Column(type: "int", nullable: false), + ExtendedDepartmentIdList = table.Column(type: "nvarchar(max)", nullable: true), + DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), + EmployeeId = table.Column(type: "int", nullable: false), + CostCentreId = table.Column(type: "int", nullable: false), + RangShortname = table.Column(type: "nvarchar(max)", nullable: true), + RangName = table.Column(type: "nvarchar(max)", nullable: true), + RangOrder = table.Column(type: "int", nullable: false), + ClientId = table.Column(type: "int", nullable: false), + WebAppId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_WebAppEmployeeInfo", x => x.WebAppEmployeeInfoId); + }); + + migrationBuilder.CreateTable( + name: "WebAppRole", + schema: "webapi", + columns: table => new + { + WebAppRoleId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + WebAppRoleName = table.Column(type: "nvarchar(max)", nullable: true), + WebAppRoleHierarchy = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_WebAppRole", x => x.WebAppRoleId); + }); + + migrationBuilder.CreateTable( + name: "WebAppToDepartment", + schema: "webapi", + columns: table => new + { + WebAppToDepartmentId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + EmployeeToWebAppId = table.Column(type: "int", nullable: false), + DepartmentId = table.Column(type: "int", nullable: false), + DepartmentName = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WebAppToDepartment", x => x.WebAppToDepartmentId); + }); + + migrationBuilder.CreateTable( + name: "WebAppToWebAppAdditionalRole", + schema: "webapi", + columns: table => new + { + WebAppToWebAppAdditionalRoleId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + WebAppAdditionalRoleId = table.Column(type: "int", nullable: false), + EmployeeToWebAppId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_WebAppToWebAppAdditionalRole", x => x.WebAppToWebAppAdditionalRoleId); + }); + + migrationBuilder.CreateTable( + name: "WebAppToWebAppRole", + schema: "webapi", + columns: table => new + { + WebAppToWebAppRoleId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + WebAppId = table.Column(type: "int", nullable: false), + WebAppRoleId = table.Column(type: "int", nullable: false), + WebAppRoleName = table.Column(type: "nvarchar(max)", nullable: true), + WebAppRoleHierarchy = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_WebAppToWebAppRole", x => x.WebAppToWebAppRoleId); + }); + + migrationBuilder.CreateTable( + name: "WebAppUser", + schema: "webapi", + columns: table => new + { + WebAppUserId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + ShortName = table.Column(type: "nvarchar(max)", nullable: true), + LoginName = table.Column(type: "nvarchar(max)", nullable: true), + Password = table.Column(type: "nvarchar(max)", nullable: true), + RoleList = table.Column(type: "nvarchar(max)", nullable: true), + WebAppRoleList = table.Column(type: "nvarchar(max)", nullable: true), + JwtExpiredOn = table.Column(type: "datetime2", nullable: true), + LastLogin = table.Column(type: "datetime2", nullable: true), + ClientVersion = table.Column(type: "nvarchar(max)", nullable: true), + Language = table.Column(type: "nvarchar(max)", nullable: true), + Culture = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WebAppUser", x => x.WebAppUserId); + }); + + migrationBuilder.CreateTable( + name: "WindreamColumnsToDepartment", + schema: "webapi", + columns: table => new + { + WindreamColumnsToDepartmentId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + AttributeDwAttrId = table.Column(type: "int", nullable: false), + AttributeSzColumnName = table.Column(type: "nvarchar(max)", nullable: true), + Comment = table.Column(type: "nvarchar(max)", nullable: true), + AttributeDwAttrType = table.Column(type: "int", nullable: false), + ComumnLength = table.Column(type: "int", nullable: false), + ObjectTypeAttributeSzName = table.Column(type: "nvarchar(max)", nullable: true), + ClientId = table.Column(type: "int", nullable: false), + ObjectTypeszDocTypeName = table.Column(type: "nvarchar(max)", nullable: true), + DepartmentId = table.Column(type: "int", nullable: false), + Seq = table.Column(type: "int", nullable: false), + WindreamSearchId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_WindreamColumnsToDepartment", x => x.WindreamColumnsToDepartmentId); + }); + + migrationBuilder.CreateTable( + name: "WindreamIndex", + schema: "webapi", + columns: table => new + { + WindreamIndexId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + AttributeDwAttrId = table.Column(type: "int", nullable: false), + AttributeSzColumnName = table.Column(type: "nvarchar(max)", nullable: true), + Comment = table.Column(type: "nvarchar(max)", nullable: true), + ComumnLength = table.Column(type: "int", nullable: true), + AttributeDwAttrType = table.Column(type: "int", nullable: true), + ClientId = table.Column(type: "int", nullable: false), + ObjectTypeAttributeSzName = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WindreamIndex", x => x.WindreamIndexId); + }); + + migrationBuilder.CreateTable( + name: "WindreamIndexToWindreamSearchToDepartment", + schema: "webapi", + columns: table => new + { + WindreamIndexToWindreamSearchToDepartmentId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + WindreamSearchToDepartmentId = table.Column(type: "int", nullable: false), + WindreamIndexId = table.Column(type: "int", nullable: false), + Seq = table.Column(type: "int", nullable: false), + AttributeSzColumnName = table.Column(type: "nvarchar(max)", nullable: true), + ObjectTypeAttributeSzName = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WindreamIndexToWindreamSearchToDepartment", x => x.WindreamIndexToWindreamSearchToDepartmentId); + }); + + migrationBuilder.CreateTable( + name: "WindreamInputFolder", + schema: "webapi", + columns: table => new + { + WindreamInputFolderId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + XMLPath = table.Column(type: "nvarchar(max)", nullable: true), + Comment = table.Column(type: "nvarchar(max)", nullable: true), + ClientId = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WindreamInputFolder", x => x.WindreamInputFolderId); + }); + + migrationBuilder.CreateTable( + name: "WindreamSearch", + schema: "webapi", + columns: table => new + { + WindreamSearchId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + XMLPath = table.Column(type: "nvarchar(max)", nullable: true), + Comment = table.Column(type: "nvarchar(max)", nullable: true), + ClientId = table.Column(type: "int", nullable: false), + Color = table.Column(type: "int", nullable: true), + SearchIndex = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WindreamSearch", x => x.WindreamSearchId); + }); + + migrationBuilder.CreateTable( + name: "WindreamSearchItem", + schema: "webapi", + columns: table => new + { + WindreamSearchItemId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(max)", nullable: true), + Comment = table.Column(type: "nvarchar(max)", nullable: true), + ClientId = table.Column(type: "int", nullable: false), + Caption = table.Column(type: "nvarchar(max)", nullable: true), + PlaceHolder = table.Column(type: "nvarchar(max)", nullable: true), + SearchTemplate = table.Column(type: "nvarchar(max)", nullable: true), + ConnectedList = table.Column(type: "nvarchar(max)", nullable: true), + AlternativeWindreamSearchItemIdList = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WindreamSearchItem", x => x.WindreamSearchItemId); + }); + + migrationBuilder.CreateTable( + name: "WindreamSearchItemToWindreamSearchToDepartment", + schema: "webapi", + columns: table => new + { + WindreamSearchItemToWindreamSearchToDepartmentId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + WindreamSearchToDepartmentId = table.Column(type: "int", nullable: false), + Seq = table.Column(type: "int", nullable: false), + WindreamSearchItemId = table.Column(type: "int", nullable: false), + DepartmentId = table.Column(type: "int", nullable: false), + WindreamSearchItemName = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchItemCaption = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchItemPlaceHolder = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchItemSearchTemplate = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchItemTemplate = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchItemConnectedList = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchItemComment = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchIndexType = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WindreamSearchItemToWindreamSearchToDepartment", x => x.WindreamSearchItemToWindreamSearchToDepartmentId); + }); + + migrationBuilder.CreateTable( + name: "WindreamSearchToDepartment", + schema: "webapi", + columns: table => new + { + WindreamSearchToDepartmentId = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + DepartmentId = table.Column(type: "int", nullable: false), + WindreamSearchId = table.Column(type: "int", nullable: false), + Seq = table.Column(type: "int", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchName = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchXMLPath = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchComment = table.Column(type: "nvarchar(max)", nullable: true), + WindreamSearchColor = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WindreamSearchToDepartment", x => x.WindreamSearchToDepartmentId); + }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AdWebAppToWebAppRole", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "CostCentre", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "Department", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "DepartmentToWebAppToEmployeeForWindream", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "DocumentArt", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "DocumentArtToDepartment", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "Employee", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "EmployeeAttribute", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "EmployeeStatus", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "EmployeeToAttribute", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "EmployeeToDepartment", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "EmployeeToWebApp", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "Project", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "Rang", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "Subsidiary", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WebApp", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WebAppAdditionalRole", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WebAppEmployeeInfo", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WebAppRole", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WebAppToDepartment", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WebAppToWebAppAdditionalRole", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WebAppToWebAppRole", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WebAppUser", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WindreamColumnsToDepartment", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WindreamIndex", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WindreamIndexToWindreamSearchToDepartment", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WindreamInputFolder", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WindreamSearch", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WindreamSearchItem", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WindreamSearchItemToWindreamSearchToDepartment", + schema: "webapi"); + + migrationBuilder.DropTable( + name: "WindreamSearchToDepartment", + schema: "webapi"); + } + } +} diff --git a/DAL/Migrations/WebApiContextModelSnapshot.cs b/DAL/Migrations/WebApiContextModelSnapshot.cs new file mode 100644 index 0000000..53f6aff --- /dev/null +++ b/DAL/Migrations/WebApiContextModelSnapshot.cs @@ -0,0 +1,1090 @@ +// +using System; +using DAL; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace DAL.Migrations +{ + [DbContext(typeof(WebApiContext))] + partial class WebApiContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(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("WebAppEmployeeInfoId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppEmployeeInfoId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("CostCentreId") + .HasColumnType("int"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("EmployeeNo") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtendedDepartmentIdList") + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .HasColumnType("nvarchar(max)"); + + b.Property("LastName") + .HasColumnType("nvarchar(max)"); + + b.Property("LoginName") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("RangName") + .HasColumnType("nvarchar(max)"); + + b.Property("RangOrder") + .HasColumnType("int"); + + b.Property("RangShortname") + .HasColumnType("nvarchar(max)"); + + b.Property("Salutation") + .HasColumnType("nvarchar(max)"); + + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.HasKey("WebAppEmployeeInfoId"); + + b.ToTable("WebAppEmployeeInfo", "webapi"); + }); + + modelBuilder.Entity("DAL._Shared.SharedModels.WebAppUser", b => + { + b.Property("WebAppUserId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppUserId"), 1L, 1); + + b.Property("ClientVersion") + .HasColumnType("nvarchar(max)"); + + b.Property("Culture") + .HasColumnType("nvarchar(max)"); + + b.Property("JwtExpiredOn") + .HasColumnType("datetime2"); + + b.Property("Language") + .HasColumnType("nvarchar(max)"); + + b.Property("LastLogin") + .HasColumnType("datetime2"); + + b.Property("LoginName") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Password") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleList") + .HasColumnType("nvarchar(max)"); + + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppRoleList") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WebAppUserId"); + + b.ToTable("WebAppUser", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.AdWebAppToWebAppRole", b => + { + b.Property("AdWebAppToWebAppRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("AdWebAppToWebAppRoleId"), 1L, 1); + + b.Property("AdWebAppName") + .HasColumnType("nvarchar(max)"); + + b.Property("AdWebAppRoleName") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.HasKey("AdWebAppToWebAppRoleId"); + + b.ToTable("AdWebAppToWebAppRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.CostCentre", b => + { + b.Property("CostCentreId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CostCentreId"), 1L, 1); + + b.Property("CostCentreName") + .HasColumnType("nvarchar(max)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.HasKey("CostCentreId"); + + b.ToTable("CostCentre", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Department", b => + { + b.Property("DepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DepartmentId"), 1L, 1); + + b.Property("AdGroupDepartmentName") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("CostCentre") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("CostCentreId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentNameFolder") + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentTypeId") + .HasColumnType("int"); + + b.Property("ExecutiveDirector") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ExecutiveDirectorId") + .HasColumnType("int"); + + b.Property("HeadofDepartment") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("HeadofDepartmentId") + .HasColumnType("int"); + + b.Property("IsVirtual") + .HasColumnType("bit"); + + b.Property("ManagingDirector") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ManagingDirectorId") + .HasColumnType("int"); + + b.HasKey("DepartmentId"); + + b.ToTable("Department", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.DepartmentToWebAppToEmployeeForWindream", b => + { + b.Property("DepartmentToWebAppToEmployeeForWindreamId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DepartmentToWebAppToEmployeeForWindreamId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("IsMain") + .HasColumnType("int"); + + b.Property("LoginName") + .HasColumnType("nvarchar(max)"); + + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("DepartmentToWebAppToEmployeeForWindreamId"); + + b.ToTable("DepartmentToWebAppToEmployeeForWindream", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.DocumentArt", b => + { + b.Property("DocumentArtId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DocumentArtId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentNamesList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("Folder") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RootPath") + .HasColumnType("nvarchar(max)"); + + b.Property("Shortname") + .HasColumnType("nvarchar(max)"); + + b.HasKey("DocumentArtId"); + + b.ToTable("DocumentArt", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.DocumentArtToDepartment", b => + { + b.Property("DocumentArtToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("DocumentArtToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DocumentArtFolder") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("DocumentArtId") + .HasColumnType("int"); + + b.Property("DocumentArtName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("DocumentArtShortname") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("UseGlobix") + .HasColumnType("bit"); + + b.HasKey("DocumentArtToDepartmentId"); + + b.ToTable("DocumentArtToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Employee", b => + { + b.Property("EmployeeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeId"), 1L, 1); + + b.Property("AttributeIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("AttributeNamesList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("DepartmentIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentNamesList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeNo") + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("LastName") + .HasColumnType("nvarchar(max)"); + + b.Property("LoginName") + .HasColumnType("nvarchar(max)"); + + b.Property("MainDepartmentId") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("MandantCode") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("MobilePhoneNo") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("RangId") + .HasColumnType("int"); + + b.Property("Salutation") + .HasColumnType("nvarchar(max)"); + + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("WebappIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WebappNamesList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("EmployeeId"); + + b.ToTable("Employee", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeAttribute", b => + { + b.Property("EmployeeAttributeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeAttributeId"), 1L, 1); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleList") + .HasColumnType("nvarchar(max)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("Shortname") + .HasColumnType("nvarchar(max)"); + + b.HasKey("EmployeeAttributeId"); + + b.ToTable("EmployeeAttribute", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeStatus", b => + { + b.Property("EmployeeStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeStatusId"), 1L, 1); + + b.Property("EmployeeStatusName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("EmployeeStatusId"); + + b.ToTable("EmployeeStatus", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeToAttribute", b => + { + b.Property("EmployeeToAttributeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeToAttributeId"), 1L, 1); + + b.Property("EmployeeAttributeId") + .HasColumnType("int"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.HasKey("EmployeeToAttributeId"); + + b.ToTable("EmployeeToAttribute", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeToDepartment", b => + { + b.Property("EmployeeToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeBudget") + .HasColumnType("decimal(18,2)"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("EmployeeStatusId") + .HasColumnType("int"); + + b.Property("RangId") + .HasColumnType("int"); + + b.HasKey("EmployeeToDepartmentId"); + + b.ToTable("EmployeeToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.EmployeeToWebApp", b => + { + b.Property("EmployeeToWebAppId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("EmployeeToWebAppId"), 1L, 1); + + b.Property("AdditionalRoleIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("AdditionalRoleNameList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("ExtendedDepartmentIdList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtendedDepartmentNameList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.Property("WebAppName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppRoleId") + .HasColumnType("int"); + + b.Property("WebAppRoleName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("EmployeeToWebAppId"); + + b.ToTable("EmployeeToWebApp", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ProjectId"), 1L, 1); + + b.Property("ProjectName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("ProjectId"); + + b.ToTable("Project", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Rang", b => + { + b.Property("RangId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("RangId"), 1L, 1); + + b.Property("RangName") + .HasColumnType("nvarchar(max)"); + + b.Property("RangOrder") + .HasColumnType("int"); + + b.Property("RangShortname") + .HasColumnType("nvarchar(max)"); + + b.HasKey("RangId"); + + b.ToTable("Rang", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.Subsidiary", b => + { + b.Property("SubsidiaryId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("SubsidiaryId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("SubsidiaryCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("SubsidiaryId"); + + b.ToTable("Subsidiary", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebApp", b => + { + b.Property("WebAppId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppId"), 1L, 1); + + b.Property("AdWebAppName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("WebAppLinkDev") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppLinkLive") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WebAppId"); + + b.ToTable("WebApp", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppAdditionalRole", b => + { + b.Property("WebAppAdditionalRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppAdditionalRoleId"), 1L, 1); + + b.Property("AdWebAppAdditionalRoleName") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppAdditionalRoleName") + .HasColumnType("nvarchar(max)"); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.HasKey("WebAppAdditionalRoleId"); + + b.ToTable("WebAppAdditionalRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppRole", b => + { + b.Property("WebAppRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppRoleId"), 1L, 1); + + b.Property("WebAppRoleHierarchy") + .HasColumnType("int"); + + b.Property("WebAppRoleName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WebAppRoleId"); + + b.ToTable("WebAppRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppToDepartment", b => + { + b.Property("WebAppToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeToWebAppId") + .HasColumnType("int"); + + b.HasKey("WebAppToDepartmentId"); + + b.ToTable("WebAppToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppToWebAppAdditionalRole", b => + { + b.Property("WebAppToWebAppAdditionalRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppToWebAppAdditionalRoleId"), 1L, 1); + + b.Property("EmployeeToWebAppId") + .HasColumnType("int"); + + b.Property("WebAppAdditionalRoleId") + .HasColumnType("int"); + + b.HasKey("WebAppToWebAppAdditionalRoleId"); + + b.ToTable("WebAppToWebAppAdditionalRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WebAppToWebAppRole", b => + { + b.Property("WebAppToWebAppRoleId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WebAppToWebAppRoleId"), 1L, 1); + + b.Property("WebAppId") + .HasColumnType("int"); + + b.Property("WebAppRoleHierarchy") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("WebAppRoleId") + .HasColumnType("int"); + + b.Property("WebAppRoleName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("WebAppToWebAppRoleId"); + + b.ToTable("WebAppToWebAppRole", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamColumnsToDepartment", b => + { + b.Property("WindreamColumnsToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamColumnsToDepartmentId"), 1L, 1); + + b.Property("AttributeDwAttrId") + .HasColumnType("int"); + + b.Property("AttributeDwAttrType") + .HasColumnType("int"); + + b.Property("AttributeSzColumnName") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("ComumnLength") + .HasColumnType("int"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("ObjectTypeAttributeSzName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ObjectTypeszDocTypeName") + .HasColumnType("nvarchar(max)"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("WindreamSearchId") + .HasColumnType("int"); + + b.HasKey("WindreamColumnsToDepartmentId"); + + b.ToTable("WindreamColumnsToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamIndex", b => + { + b.Property("WindreamIndexId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamIndexId"), 1L, 1); + + b.Property("AttributeDwAttrId") + .HasColumnType("int"); + + b.Property("AttributeDwAttrType") + .HasColumnType("int"); + + b.Property("AttributeSzColumnName") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("ComumnLength") + .HasColumnType("int"); + + b.Property("ObjectTypeAttributeSzName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamIndexId"); + + b.ToTable("WindreamIndex", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamIndexToWindreamSearchToDepartment", b => + { + b.Property("WindreamIndexToWindreamSearchToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamIndexToWindreamSearchToDepartmentId"), 1L, 1); + + b.Property("AttributeSzColumnName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("ObjectTypeAttributeSzName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("WindreamIndexId") + .HasColumnType("int"); + + b.Property("WindreamSearchToDepartmentId") + .HasColumnType("int"); + + b.HasKey("WindreamIndexToWindreamSearchToDepartmentId"); + + b.ToTable("WindreamIndexToWindreamSearchToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamInputFolder", b => + { + b.Property("WindreamInputFolderId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamInputFolderId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("XMLPath") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamInputFolderId"); + + b.ToTable("WindreamInputFolder", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamSearch", b => + { + b.Property("WindreamSearchId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamSearchId"), 1L, 1); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Color") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("SearchIndex") + .HasColumnType("int"); + + b.Property("XMLPath") + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamSearchId"); + + b.ToTable("WindreamSearch", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamSearchItem", b => + { + b.Property("WindreamSearchItemId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamSearchItemId"), 1L, 1); + + b.Property("AlternativeWindreamSearchItemIdList") + .HasColumnType("nvarchar(max)"); + + b.Property("Caption") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientId") + .HasColumnType("int"); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("ConnectedList") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PlaceHolder") + .HasColumnType("nvarchar(max)"); + + b.Property("SearchTemplate") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamSearchItemId"); + + b.ToTable("WindreamSearchItem", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamSearchItemToWindreamSearchToDepartment", b => + { + b.Property("WindreamSearchItemToWindreamSearchToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamSearchItemToWindreamSearchToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("WindreamSearchIndexType") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("WindreamSearchItemCaption") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemComment") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemConnectedList") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemId") + .HasColumnType("int"); + + b.Property("WindreamSearchItemName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemPlaceHolder") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemSearchTemplate") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchItemTemplate") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchToDepartmentId") + .HasColumnType("int"); + + b.HasKey("WindreamSearchItemToWindreamSearchToDepartmentId"); + + b.ToTable("WindreamSearchItemToWindreamSearchToDepartment", "webapi"); + }); + + modelBuilder.Entity("DAL.Models.Entities.WindreamSearchToDepartment", b => + { + b.Property("WindreamSearchToDepartmentId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("WindreamSearchToDepartmentId"), 1L, 1); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("DepartmentName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("WindreamSearchColor") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("WindreamSearchComment") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchId") + .HasColumnType("int"); + + b.Property("WindreamSearchName") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.Property("WindreamSearchXMLPath") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("nvarchar(max)"); + + b.HasKey("WindreamSearchToDepartmentId"); + + b.ToTable("WindreamSearchToDepartment", "webapi"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/StaffDBServer/Controllers/EmployeeController.cs b/StaffDBServer/Controllers/EmployeeController.cs index 54f70f7..768f619 100644 --- a/StaffDBServer/Controllers/EmployeeController.cs +++ b/StaffDBServer/Controllers/EmployeeController.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; namespace StaffDBServer.Controllers { - [JWTAuthorize] public class EmployeeController : BaseController { public EmployeeController(IBaseRepository repositoryBase) : base(repositoryBase)