diff --git a/.github/workflows/administration-service.yml b/.github/workflows/administration-service.yml index 3395ad80b3..75f8c583c4 100644 --- a/.github/workflows/administration-service.yml +++ b/.github/workflows/administration-service.yml @@ -31,6 +31,7 @@ on: - 'src/notifications/**' - 'src/portalbackend/**' - 'src/provisioning/**' + - 'src/web/**' # workflow file - '.github/workflows/administration-service.yml' # dockerfile diff --git a/.github/workflows/maintenance-service.yml b/.github/workflows/maintenance-service.yml index b6570ce8b1..a943cddaaa 100644 --- a/.github/workflows/maintenance-service.yml +++ b/.github/workflows/maintenance-service.yml @@ -23,8 +23,8 @@ on: push: paths: # service and transitive paths - - 'src/maintenance/Maintenance.App/**' - 'src/framework/**' + - 'src/maintenance/Maintenance.App/**' - 'src/portalbackend/PortalBackend.PortalEntities/**' # workflow file - '.github/workflows/maintenance-service.yml' diff --git a/.github/workflows/marketplace-app-service.yml b/.github/workflows/marketplace-app-service.yml index 154326d66a..49d5e9f503 100644 --- a/.github/workflows/marketplace-app-service.yml +++ b/.github/workflows/marketplace-app-service.yml @@ -24,11 +24,13 @@ on: paths: # service and transitive paths - 'src/marketplace/Apps.Service/**' + - 'src/marketplace/Offers.Library/**' - 'src/framework/**' - 'src/keycloak/**' - 'src/mailing/**' - 'src/notifications/**' - 'src/portalbackend/**' + - 'src/web/**' # workflow file - '.github/workflows/marketplace-app-service.yml' # dockerfile diff --git a/.github/workflows/notification-service.yml b/.github/workflows/notification-service.yml index b781d3717d..78e606c35c 100644 --- a/.github/workflows/notification-service.yml +++ b/.github/workflows/notification-service.yml @@ -27,6 +27,7 @@ on: - 'src/framework/**' - 'src/keycloak/**' - 'src/portalbackend/**' + - 'src/web/**' # workflow file - '.github/workflows/notification-service.yml' # dockerfile diff --git a/.github/workflows/nuget-package-push.yml b/.github/workflows/nuget-package-push.yml new file mode 100644 index 0000000000..18ac0e30ef --- /dev/null +++ b/.github/workflows/nuget-package-push.yml @@ -0,0 +1,74 @@ +############################################################### +# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +name: Push Nuget Packages and Tag + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: ['7.0'] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v2 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + - name: Install dependencies + run: dotnet restore src + + - name: Build + run: dotnet build src --configuration Release --no-restore + + - name: Check Package Suffix Versions + shell: bash + run: | + script_output=$(./scripts/no_suffix_check.sh) + + if [ -z "$script_output" ]; then + echo "No version suffixes set" + else + echo "the following packages have a suffix version set, please remove them:" + echo "$script_output" + exit 1 + fi + + - name: Push nuget packages + shell: bash + run: | + bash ./scripts/pack_and_push_packages.sh --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate + + - name: Get new version + id: nugetPackageVersion + shell: bash + run: | + current_version=$(./scripts/get_current_version.sh) + echo "version=$current_version" >> "$GITHUB_OUTPUT" + + - name: Create git tag + uses: rickstaa/action-create-tag@v1 + with: + tag: v${{ steps.nugetPackageVersion.outputs.version }} diff --git a/.github/workflows/unit.tests-formatting.yml b/.github/workflows/pre-checks.yml similarity index 50% rename from .github/workflows/unit.tests-formatting.yml rename to .github/workflows/pre-checks.yml index cb772cf6d5..8bb147b61f 100644 --- a/.github/workflows/unit.tests-formatting.yml +++ b/.github/workflows/pre-checks.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -17,7 +17,9 @@ # SPDX-License-Identifier: Apache-2.0 ############################################################### -name: Unit-Tests and Formatting +# This workflow builds all services and related projects, checks the formatting and if all tests are passing. +# If framework related code changed, all steps mentioned above will happen for framework related code as well as a check for a version update of the nuget packages will be made +name: Pre Checks on: push: @@ -27,15 +29,32 @@ on: workflow_dispatch: jobs: - build: + + changes: + name: Get changed paths + runs-on: ubuntu-latest + outputs: + framework: ${{ steps.changes.outputs.framework }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + framework: + - 'src/framework/**' + checkServices: + name: Build, check and test services runs-on: ubuntu-latest strategy: matrix: dotnet-version: ['7.0'] steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} uses: actions/setup-dotnet@v2 with: @@ -50,3 +69,27 @@ jobs: run: dotnet format src --verify-no-changes --no-restore - name: Test run: dotnet test src --filter FullyQualifiedName\!~Org.Eclipse.TractusX.Portal.Backend.EndToEnd.Tests --no-restore --verbosity normal + + checkFramework: + name: Check nuget packages + needs: changes + if: ${{ needs.changes.outputs.framework == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Check Package Versions + shell: bash + run: | + script_output=$(./scripts/nuget_version_check.sh origin/${{ github.event.pull_request.base.ref }}) + + if [ -z "$script_output" ]; then + echo "Expected version updates were made" + else + echo "the following packages need a version update:" + echo "$script_output" + echo "Please see https://github.com/eclipse-tractusx/portal-backend/blob/main/src/framework/README.md for further information" + exit 1 + fi diff --git a/.github/workflows/processes-worker.yml b/.github/workflows/processes-worker.yml index f097a90ee9..15271128a3 100644 --- a/.github/workflows/processes-worker.yml +++ b/.github/workflows/processes-worker.yml @@ -23,13 +23,14 @@ on: push: paths: # service and transitive paths + - 'src/framework/**' + - 'src/processes/Processes.ProcessIdentity/**' - 'src/processes/Processes.Worker/**' - 'src/processes/ApplicationChecklist.Library/**' - 'src/processes/ApplicationChecklist.Executor/**' - 'src/processes/NetworkRegistration.Library/**' - 'src/processes/NetworkRegistration.Executor/**' - 'src/externalsystems/**' - - 'src/framework/**' - 'src/portalbackend/PortalBackend.PortalEntities/**' # workflow file - '.github/workflows/processes-worker.yml' diff --git a/.github/workflows/registration-service.yml b/.github/workflows/registration-service.yml index cb0106caf9..d7e25b714e 100644 --- a/.github/workflows/registration-service.yml +++ b/.github/workflows/registration-service.yml @@ -23,12 +23,13 @@ on: push: paths: # service and transitive paths - - 'src/registration/**' - 'src/framework/**' + - 'src/registration/**' - 'src/keycloak/**' - 'src/mailing/**' - 'src/portalbackend/**' - 'src/provisioning/**' + - 'src/web/**' # workflow file - '.github/workflows/registration-service.yml' # dockerfile diff --git a/.github/workflows/services-service.yml b/.github/workflows/services-service.yml index c01f237c69..e3307e894e 100644 --- a/.github/workflows/services-service.yml +++ b/.github/workflows/services-service.yml @@ -23,12 +23,13 @@ on: push: paths: # service and transitive paths + - 'src/framework/**' - 'src/marketplace/Services.Service/**' - 'src/marketplace/Offers.Library/**' - - 'src/framework/**' - 'src/keycloak/**' - 'src/notifications/**' - 'src/portalbackend/**' + - 'src/web/**' # workflow file - '.github/workflows/services-service.yml' # dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index b4691cbe09..0c50ca5b2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,32 @@ New features, fixed bugs, known defects and other noteworthy changes to each rel ## 1.8.0-RC4 +### Change +* Registration Service + * adjust endpoint GET: /api/registration/applications to additionally response the registrationType + +### Feature +* Mailing + * make the sender email configurable +* IdentityProvider + * add more metadata to identityProvider details + +### Technical Support +* Nuget Packages + * Provide Framework Packages as Nuget Packages +* add new keycloak user to delete idps +* Bpdm Push + * ignore nullable values + * set the sharing state to ready +* Company Certificates + * add database structure for company certificates + * add seeding for company certificates + +### Known Knowns +n/a + +## 1.8.0-RC4 + ### Change * updated response body of the GET: /api/administration/user/owncompany/users endpoint by changing the "role" section to an array to include role client information ![Tag](https://img.shields.io/static/v1?label=&message=BreakingChange&color=yellow&style=flat) * pattern harmonization of 'company name' insert endpoints diff --git a/DEPENDENCIES b/DEPENDENCIES index 0f8e6299bf..47d1893765 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -40,9 +40,11 @@ nuget/nuget/-/Serilog.Extensions.Hosting/7.0.0, Apache-2.0, approved, #10078 nuget/nuget/-/Serilog.Extensions.Logging/7.0.0, Apache-2.0, approved, #10070 nuget/nuget/-/Serilog.Formatting.Compact/1.1.0, Apache-2.0, approved, #11115 nuget/nuget/-/Serilog.Settings.Configuration/7.0.0, Apache-2.0, approved, #10069 +nuget/nuget/-/Serilog.Sinks.Console/4.0.1, Apache-2.0, approved, #12858 nuget/nuget/-/Serilog.Sinks.Console/4.1.0, Apache-2.0, approved, #8434 nuget/nuget/-/Serilog.Sinks.Debug/2.0.0, Apache-2.0, approved, clearlydefined nuget/nuget/-/Serilog.Sinks.File/5.0.0, Apache-2.0, approved, #11116 +nuget/nuget/-/Serilog/2.12.0, Apache-2.0, approved, #8435 nuget/nuget/-/Serilog/3.0.1, Apache-2.0, approved, #10063 nuget/nuget/-/SharpZipLib/1.4.2, MIT AND GFDL-1.3-or-later AND (Apache-2.0 AND MIT) AND WTFPL AND bzip2-1.0.6 AND LicenseRef-Permissive-license-with-conditions AND LicenseRef-Permission-Notice, approved, #10058 nuget/nuget/-/SshNet.Security.Cryptography/1.3.0, MIT, approved, clearlydefined diff --git a/README.md b/README.md index 880875bced..37b47db295 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,15 @@ This application provides container images for demonstration purposes. ### DockerHub -* https://hub.docker.com/r/tractusx/portal-registration-service -* https://hub.docker.com/r/tractusx/portal-administration-service -* https://hub.docker.com/r/tractusx/portal-marketplace-app-service -* https://hub.docker.com/r/tractusx/portal-services-service -* https://hub.docker.com/r/tractusx/portal-notification-service -* https://hub.docker.com/r/tractusx/portal-processes-worker -* https://hub.docker.com/r/tractusx/portal-portal-migrations -* https://hub.docker.com/r/tractusx/portal-provisioning-migrations -* https://hub.docker.com/r/tractusx/portal-maintenance-service +* [portal-registration-service](https://hub.docker.com/r/tractusx/portal-registration-service) +* [portal-administration-service](https://hub.docker.com/r/tractusx/portal-administration-service) +* [portal-marketplace-app-service](https://hub.docker.com/r/tractusx/portal-marketplace-app-service) +* [portal-services-service](https://hub.docker.com/r/tractusx/portal-services-service) +* [portal-notification-service](https://hub.docker.com/r/tractusx/portal-notification-service) +* [portal-processes-worker](https://hub.docker.com/r/tractusx/portal-processes-worker) +* [portal-portal-migrations](https://hub.docker.com/r/tractusx/portal-portal-migrations) +* [portal-provisioning-migrations](https://hub.docker.com/r/tractusx/portal-provisioning-migrations) +* [portal-maintenance-service](https://hub.docker.com/r/tractusx/portal-maintenance-service) ### Base images @@ -60,6 +60,29 @@ mcr.microsoft.com/dotnet/runtime:7.0-alpine: * GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) * DockerHub: [https://hub.docker.com/_/microsoft-dotnet-runtime](https://hub.docker.com/_/microsoft-dotnet-runtime) +## Notice for Nuget Packages + +This application provides nuget packages to share functionalities across different repos. To see how the development and update of nuget packages is working please have a look at the [documentation](/docs/nuget/update-nuget-packages.md). + +### Nuget + +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Async](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Async/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Cors](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Cors/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.IO](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.IO/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Linq](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Linq/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Logging](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Logging/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Models](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Models/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Token](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Token/) +* [Org.Eclipse.TractusX.Portal.Backend.Framework.Web](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Web/) + ## License Distributed under the Apache 2.0 License. diff --git a/docker/Dockerfile-administration-service b/docker/Dockerfile-administration-service index 9e0ca6f46e..597c2bfead 100644 --- a/docker/Dockerfile-administration-service +++ b/docker/Dockerfile-administration-service @@ -27,6 +27,7 @@ WORKDIR /src/administration/Administration.Service RUN dotnet publish "Administration.Service.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . ENV ASPNETCORE_URLS http://+:8080 diff --git a/docker/Dockerfile-iam-seeding b/docker/Dockerfile-iam-seeding index 6af1f4bf43..69f14f514e 100644 --- a/docker/Dockerfile-iam-seeding +++ b/docker/Dockerfile-iam-seeding @@ -23,7 +23,7 @@ FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine-amd64 AS publish WORKDIR / COPY LICENSE NOTICE.md DEPENDENCIES / COPY /src/framework/Framework.Async /src/framework/Framework.Async -COPY /src/framework/Framework.ErrorHandling.Library /src/framework/Framework.ErrorHandling.Library +COPY /src/framework/Framework.ErrorHandling /src/framework/Framework.ErrorHandling COPY /src/framework/Framework.Linq /src/framework/Framework.Linq COPY /src/framework/Framework.Logging /src/framework/Framework.Logging COPY /src/framework/Framework.Models /src/framework/Framework.Models @@ -35,6 +35,7 @@ WORKDIR /src/keycloak/Keycloak.Seeding RUN dotnet publish "Keycloak.Seeding.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . RUN chown -R 1000:3000 /app diff --git a/docker/Dockerfile-maintenance-service b/docker/Dockerfile-maintenance-service index f64ed8b8fe..044cb8a853 100644 --- a/docker/Dockerfile-maintenance-service +++ b/docker/Dockerfile-maintenance-service @@ -25,24 +25,22 @@ COPY LICENSE NOTICE.md DEPENDENCIES / COPY src/maintenance/Maintenance.App/ src/maintenance/Maintenance.App/ COPY src/portalbackend/PortalBackend.DBAccess/ src/portalbackend/PortalBackend.DBAccess/ COPY src/portalbackend/PortalBackend.PortalEntities/ src/portalbackend/PortalBackend.PortalEntities/ -COPY src/framework/Framework.BaseDependencies/ src/framework/Framework.BaseDependencies/ COPY src/framework/Framework.DBAccess/ src/framework/Framework.DBAccess/ COPY src/framework/Framework.Linq/ src/framework/Framework.Linq/ COPY src/framework/Framework.Models/ src/framework/Framework.Models/ COPY src/framework/Framework.Logging/ src/framework/Framework.Logging/ COPY src/framework/Framework.Seeding/ src/framework/Framework.Seeding/ -COPY src/framework/Framework.ErrorHandling.Library/ src/framework/Framework.ErrorHandling.Library/ -COPY src/framework/Framework.ProcessIdentity/ src/framework/Framework.ProcessIdentity/ -COPY /src/framework/Framework.DateTimeProvider /src/framework/Framework.DateTimeProvider +COPY src/framework/Framework.ErrorHandling/ src/framework/Framework.ErrorHandling/ +COPY src/framework/Framework.DateTimeProvider/ src/framework/Framework.DateTimeProvider/ +COPY src/processes/Processes.ProcessIdentity/ src/processes/Processes.ProcessIdentity/ RUN dotnet restore "src/maintenance/Maintenance.App/Maintenance.App.csproj" WORKDIR /src/maintenance/Maintenance.App RUN dotnet publish "Maintenance.App.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . -ENV ASPNETCORE_URLS http://+:8080 -EXPOSE 8080 RUN chown -R 1000:3000 /app USER 1000:3000 ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.Portal.Backend.Maintenance.App.dll"] diff --git a/docker/Dockerfile-marketplace-app-service b/docker/Dockerfile-marketplace-app-service index e58a53fd8b..6d9e8d1610 100644 --- a/docker/Dockerfile-marketplace-app-service +++ b/docker/Dockerfile-marketplace-app-service @@ -27,6 +27,7 @@ WORKDIR /src/marketplace/Apps.Service RUN dotnet publish "Apps.Service.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . ENV ASPNETCORE_URLS http://+:8080 diff --git a/docker/Dockerfile-notification-service b/docker/Dockerfile-notification-service index 5569b65d29..7c639aba78 100644 --- a/docker/Dockerfile-notification-service +++ b/docker/Dockerfile-notification-service @@ -27,6 +27,7 @@ WORKDIR /src/notifications/Notifications.Service RUN dotnet publish "Notifications.Service.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . ENV ASPNETCORE_URLS http://+:8080 diff --git a/docker/Dockerfile-portal-migrations b/docker/Dockerfile-portal-migrations index 476553e7f8..fef7fcf617 100644 --- a/docker/Dockerfile-portal-migrations +++ b/docker/Dockerfile-portal-migrations @@ -27,19 +27,17 @@ COPY /src/framework/Framework.DBAccess /src/framework/Framework.DBAccess COPY /src/framework/Framework.Logging /src/framework/Framework.Logging COPY /src/framework/Framework.Models /src/framework/Framework.Models COPY /src/framework/Framework.Linq /src/framework/Framework.Linq -COPY /src/framework/Framework.ErrorHandling.Library /src/framework/Framework.ErrorHandling.Library -COPY /src/framework/Framework.BaseDependencies /src/framework/Framework.BaseDependencies -COPY /src/framework/Framework.ProcessIdentity /src/framework/Framework.ProcessIdentity/ +COPY /src/framework/Framework.ErrorHandling /src/framework/Framework.ErrorHandling COPY /src/framework/Framework.Seeding /src/framework/Framework.Seeding COPY /src/framework/Framework.DateTimeProvider /src/framework/Framework.DateTimeProvider +COPY /src/processes/Processes.ProcessIdentity/ /src/processes/Processes.ProcessIdentity/ WORKDIR /src/portalbackend/PortalBackend.Migrations RUN dotnet publish "PortalBackend.Migrations.csproj" -c Release -o /migrations/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /migrations COPY --from=publish /migrations/publish . -ENV ASPNETCORE_URLS http://+:8080 -EXPOSE 8080 RUN chown -R 1000:3000 /migrations USER 1000:3000 ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.Portal.Backend.PortalBackend.Migrations.dll"] diff --git a/docker/Dockerfile-processes-worker b/docker/Dockerfile-processes-worker index d71ace7642..5615ce77f9 100644 --- a/docker/Dockerfile-processes-worker +++ b/docker/Dockerfile-processes-worker @@ -28,9 +28,9 @@ WORKDIR /src/processes/Processes.Worker RUN dotnet publish "Processes.Worker.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . - RUN chown -R 1000:3000 /app USER 1000:3000 ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.dll"] diff --git a/docker/Dockerfile-provisioning-migrations b/docker/Dockerfile-provisioning-migrations index ceb3a01e74..20fd0196bf 100644 --- a/docker/Dockerfile-provisioning-migrations +++ b/docker/Dockerfile-provisioning-migrations @@ -23,8 +23,7 @@ FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine-amd64 AS publish WORKDIR / COPY LICENSE NOTICE.md DEPENDENCIES / COPY /src/provisioning /src/provisioning -COPY /src/framework/Framework.ErrorHandling.Library /src/framework/Framework.ErrorHandling.Library -COPY /src/framework/Framework.BaseDependencies /src/framework/Framework.BaseDependencies +COPY /src/framework/Framework.ErrorHandling /src/framework/Framework.ErrorHandling COPY /src/framework/Framework.Seeding /src/framework/Framework.Seeding COPY /src/framework/Framework.Models /src/framework/Framework.Models COPY /src/framework/Framework.Linq /src/framework/Framework.Linq @@ -33,10 +32,9 @@ WORKDIR /src/provisioning/Provisioning.Migrations RUN dotnet publish "Provisioning.Migrations.csproj" -c Release -o /migrations/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /migrations COPY --from=publish /migrations/publish . -ENV ASPNETCORE_URLS http://+:8080 -EXPOSE 8080 RUN chown -R 1000:3000 /migrations USER 1000:3000 -ENTRYPOINT ["dotnet", "Org.CatenaX.Ng.Portal.Backend.Provisioning.Migrations.dll"] +ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.Portal.Backend.Provisioning.Migrations.dll"] diff --git a/docker/Dockerfile-registration-service b/docker/Dockerfile-registration-service index 7ee6196be4..ad0597c85e 100644 --- a/docker/Dockerfile-registration-service +++ b/docker/Dockerfile-registration-service @@ -27,6 +27,7 @@ WORKDIR /src/registration/Registration.Service RUN dotnet publish "Registration.Service.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . ENV ASPNETCORE_URLS http://+:8080 diff --git a/docker/Dockerfile-services-service b/docker/Dockerfile-services-service index 985af166bd..a995fe1612 100644 --- a/docker/Dockerfile-services-service +++ b/docker/Dockerfile-services-service @@ -27,6 +27,7 @@ WORKDIR /src/marketplace/Services.Service RUN dotnet publish "Services.Service.csproj" -c Release -o /app/publish FROM base AS final +ENV COMPlus_EnableDiagnostics=0 WORKDIR /app COPY --from=publish /app/publish . ENV ASPNETCORE_URLS http://+:8080 diff --git a/docs/nuget/update-nuget-packages.md b/docs/nuget/update-nuget-packages.md new file mode 100644 index 0000000000..a600534c1f --- /dev/null +++ b/docs/nuget/update-nuget-packages.md @@ -0,0 +1,83 @@ +# Update nuget packages + +Each project of the [framework](/src/framework/) directory is build and provided as an nuget package. + +To be able to build and test changes locally we recommend the following setup: + +## Local nuget directory + +1. Create a directory to store the locally build nuget packages + +```bash +mkdir ~/packages + +``` + +2. Add the directory to the nuget config + +```bash +dotnet nuget add source ~/packages --name local + +``` + +## Update version for packages + +After the changes within the source code are done you can execute the following script from the root of the project to update the packages: + +To update the version for the packages: + +```bash +./scripts/update_framework_versions.sh +``` + +For version there are the following options: + - major + - minor + - patch + - alpha + - beta + - rc + - pre + +Depending on the version the Directory.Build.props of the project will be updated. +For major, minor and patch the version will be incremented by 1. +For alpha, beta, rc, pre the Suffix will be set, if the version is already in the suffix it will be incremented by one. + +Example: + +|current value|used version| new value | +|-------------|------------|-------------| +| 1.0.0 | major | 2.0.0 | +| 1.1.0 | major | 2.0.0 | +| 1.1.0.alpha | major | 2.0.0 | +| 1.0.0 | minor | 1.1.0 | +| 1.1.0 | minor | 1.2.0 | +| 1.0.1 | minor | 1.1.0 | +| 1.1.0.alpha | minor | 1.2.0 | +| 1.0.0 | patch | 1.0.1 | +| 1.1.0 | patch | 1.1.1 | +| 1.0.1 | minor | 1.0.2 | +| 1.1.0.alpha | minor | 1.1.1 | +| 1.1.0 | alpha | 1.1.0.alpha | +|1.1.0.alpha.1| alpha |1.1.0.alpha.2| +| 1.1.0.beta | alpha | 1.1.0.alpha | + +## Build and push nuget packages + +To build and push the changed nuget packages make sure to first update the package version, you should use one of the script mentioned above to make sure that all dependent packages are updated as well. + +After all packages are updated to the wanted version you can run the following command from the root of the project to build and push the nuget packages: + +To push the updated packages to the local source + +```bash +./scripts/pack_and_push_packages_local.sh +``` + +To update the version of a specific package: + +```bash +./scripts/pack_and_push_packages.sh +``` + +NUGET_API_KEY is the key generated on nuget.org. The last command should only be executed within the github action [nuget-package-push](/.github/workflows/nuget-package-push.yml) diff --git a/scripts/get_current_version.sh b/scripts/get_current_version.sh new file mode 100755 index 0000000000..6178ecd35d --- /dev/null +++ b/scripts/get_current_version.sh @@ -0,0 +1,36 @@ +############################################################### +# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +#!/bin/bash + +file="src/framework/Framework.Async/Directory.Build.props" +# Get the version prefix +version_prefix=$(grep -oP '\K[^<]+' $file) + +# Get the version suffix +version_suffix=$(grep -oP '\K[^<]+' $file) + +# Combine the prefix and suffix if the suffix is not empty +if [ -n "$version_suffix" ]; then + version="$version_prefix-$version_suffix-framework" +else + version="$version_prefix-framework" +fi + +echo "Version: $version" diff --git a/scripts/no_suffix_version_check.sh b/scripts/no_suffix_version_check.sh new file mode 100755 index 0000000000..e04c1903dd --- /dev/null +++ b/scripts/no_suffix_version_check.sh @@ -0,0 +1,29 @@ +############################################################### +# Copyright (c) 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +#!/bin/bash + +for dir in ./src/framework/*/; do + if [ -d "$dir" ]; then + local props_file=$dir"Directory.Build.props" + if ! grep -qE "<\/VersionSuffix>" $props_file; then + echo $dir + fi + fi +done diff --git a/scripts/nuget_version_check.sh b/scripts/nuget_version_check.sh new file mode 100755 index 0000000000..66936801d7 --- /dev/null +++ b/scripts/nuget_version_check.sh @@ -0,0 +1,117 @@ +############################################################### +# Copyright (c) 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +#!/bin/bash + +# Get branch names +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Assign the arguments to variables +branchRange="$1" + +# Initialize a global arrays to store data +version_update_needed=() + +check_version_update(){ + local project="$1" + local props_file=$project"Directory.Build.props" + + # check if the code (.cs) unchanged + if ! git diff --name-only $branchRange -- "$project" | grep -qE '\.cs$' || + # check if build.props file has been deleted + ! [ -z $(git diff --name-only --diff-filter=D $branchRange -- "$props_file") ]; then + return + fi + + # check if build.props file is unchanged + if [ -z $(git diff --name-only $branchRange -- "$props_file") ]; then + version_update_needed+=($project) + return + fi + + suffix_before=$(git diff $branchRange -- "$props_file" | grep -E '^-.*' | sed -E 's/^-.*([^<]*)<\/VersionSuffix>/\1/') + suffix_after=$(git diff $branchRange -- "$props_file" | grep -E '^\+.*' | sed -E 's/^\+.*([^<]*)<\/VersionSuffix>/\1/') + + version_before=$(git diff $branchRange -- "$props_file" | grep -E '^-.*' | sed -E 's/^-.*([^<]*)<\/VersionPrefix>/\1/') + version_after=$(git diff $branchRange -- "$props_file" | grep -E '^\+.*' | sed -E 's/^\+.*([^<]*)<\/VersionPrefix>/\1/') + + if [ -z $version_after ] && + [ -z $suffix_after ] && + [ -z $suffix_before ]; then + version_update_needed+=($project) + return + fi + + if [ -z $version_before ]; then + version_before="0.0.0" + fi + + if [ -z $version_after ]; then + version_after=$version_before + fi + + IFS='.' read -r major_before minor_before patch_before <<< "$version_before" + IFS='.' read -r major_after minor_after patch_after <<< "$version_after" + + if [ -n "$major_before" ] && [ -n "$major_after" ] && + [ -n "$minor_before" ] && [ -n "$minor_after" ] && + [ -n "$patch_before" ] && [ -n "$patch_after" ]; then + + # example + # 1.0.0.rc1 -> 1.0.0.rc1 OK + # 1.0.0.rc1 -> 1.0.0.rc2 OK + # 1.0.0.rc1 -> 1.0.0 OK + if [ -n "$suffix_before" ] && + [ "$major_after" -eq "$major_before" -a "$minor_after" -eq "$minor_before" -a "$patch_after" -eq "$patch_before" ]; then + return + fi + + # example + # 1.0.0 -> 1.1.0.rc1 OK + # 1.0.0.rc1 -> 1.1.0.rc2 OK + # 1.0.0 -> 2.0.0 OK + # 1.0.0 -> 1.1.0 OK + # 1.0.0 -> 1.0.1 OK + # 1.0.0 -> 1.0.0.rc1 NOT OK + # 1.0.0 -> 0.9.0 NOT OK + if [ "$major_after" -gt "$major_before" ] || + [ "$major_after" -eq "$major_before" -a "$minor_after" -gt "$minor_before" ] || + [ "$major_after" -eq "$major_before" -a "$minor_after" -eq "$minor_before" -a "$patch_after" -gt "$patch_before" ]; then + return; + fi + + fi + + version_update_needed+=($project) +} + +# check version update was made for all framework packages which includes changes +for dir in ./src/framework/*/; do + if [ -d "$dir" ]; then + check_version_update $dir + fi +done + +# return all packages that still need a version update +for dir in "${version_update_needed[@]}"; do + echo "$dir" +done diff --git a/scripts/pack_and_push_packages.sh b/scripts/pack_and_push_packages.sh new file mode 100755 index 0000000000..450f816a6e --- /dev/null +++ b/scripts/pack_and_push_packages.sh @@ -0,0 +1,41 @@ +############################################################### +# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +#!/bin/bash + +folderPath="./packages" + +# Function to iterate over directories in the Framework directory and create a nuget package +iterate_directories() { + for dir in ./src/framework/*/; do + if [ -d "$dir" ]; then + proj="$(basename "$dir")" + echo "Pack project: $proj" + dotnet pack src/framework/$proj/$proj.csproj -c Release -o "$folderPath" + fi + done +} + +iterate_directories + +for packageFile in "$folderPath"/*.nupkg; do + dotnet nuget push "$packageFile" "$@" +done + +rm -r "$folderPath" diff --git a/scripts/pack_and_push_packages_local.sh b/scripts/pack_and_push_packages_local.sh new file mode 100755 index 0000000000..358c27d65c --- /dev/null +++ b/scripts/pack_and_push_packages_local.sh @@ -0,0 +1,22 @@ +############################################################### +# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +#!/bin/bash + +. ./scripts/pack_and_push_packages.sh --source "local" --skip-duplicate diff --git a/scripts/update_framework_versions.sh b/scripts/update_framework_versions.sh new file mode 100755 index 0000000000..50cffadcb9 --- /dev/null +++ b/scripts/update_framework_versions.sh @@ -0,0 +1,119 @@ +############################################################### +# Copyright (c) 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +#!/bin/bash + +# Check if the correct number of arguments are provided +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Assign the arguments to variables +version="$1" + +# Define the version update functions +update_major() { + local version="$1" + local updated_version="$(echo "$version" | awk -F. '{$1+=1; $2=0; $3=0; print}' | tr ' ' '.')" + echo "$updated_version" +} + +update_minor() { + local version="$1" + local updated_version="$(echo "$version" | awk -F. '{$2+=1; $3=0; print}' | tr ' ' '.')" + echo "$updated_version" +} + +update_patch() { + local version="$1" + local updated_version="$(echo "$version" | awk -F. '{$3+=1; print}' | tr ' ' '.')" + echo "$updated_version" +} + +update_pre() { + local version="$1" + local current_suffix=$(grep '' "$props_file" | sed -n 's/.*\(.*\)<\/VersionSuffix>.*/\1/p' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr -d '\n') + local current_suffix_version="${current_suffix%%"."*}" + if [ "$current_suffix_version" != "$version" ]; then + updated_suffix="$version" + else + if [[ "$current_suffix" == "alpha" || "$current_suffix" == "beta" ]]; then + updated_suffix="${current_suffix}.1" + else + numeric_part=$(echo "$current_suffix" | sed 's/[^0-9]//g') + new_numeric_part=$((numeric_part + 1)) + updated_suffix="${version}.${new_numeric_part}" + fi + fi + echo "$updated_suffix" +} + +update_version(){ + local directory="$1" + + local props_file=$directory"Directory.Build.props" + # Check if the Directory.Builds.props file exists + if [ -f "$props_file" ]; then + # Extract the current version from the XML file + current_version=$(awk -F'[<>]' '//{print $3}' "$props_file") + current_suffix=$(awk -F'[<>]' '//{print $3}' "$props_file") + + case "$version" in + major) + updated_version=$(update_major "$current_version") + updated_suffix="" + ;; + minor) + updated_version=$(update_minor "$current_version") + updated_suffix="" + ;; + patch) + updated_version=$(update_patch "$current_version") + updated_suffix="" + ;; + alpha|beta|pre|rc) + updated_version="$current_version" + updated_suffix=$(update_pre "$version") + ;; + *) + echo "Invalid version argument. Valid options: major, minor, patch, alpha, beta, pre, rc" + exit 1 + ;; + esac + + # Update the VersionPrefix and VersionSuffix in the file + awk -v new_version="$updated_version" -v new_suffix="$updated_suffix" '//{gsub(/[^<]+<\/VersionPrefix>/, "" new_version "")}//{gsub(/[^<]+<\/VersionSuffix>/, "" new_suffix "")}1' "$props_file" > temp && mv temp "$props_file" + echo "Updated version in $props_file to $updated_version $updated_suffix" + else + echo "Directory.Builds.props file not found in $directory" + fi +} + +# Function to iterate over directories in the Framework directory and update the project version +iterate_directories() { + for dir in ./src/framework/*/; do + if [ -d "$dir" ]; then + update_version "$dir" + fi + done +} + +# Call the iterate_directories function to start the script +iterate_directories diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 6aedd1f21c..d46ae53510 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -20,6 +20,6 @@ 1.8.0 - RC4 + RC5 diff --git a/src/Portal.Backend.sln b/src/Portal.Backend.sln index 9b5651ec1c..0f1f6cfe6b 100644 --- a/src/Portal.Backend.sln +++ b/src/Portal.Backend.sln @@ -6,20 +6,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "administration", "administr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Administration.Service", "administration\Administration.Service\Administration.Service.csproj", "{06418D5E-5963-4D46-8F09-A0E132721C64}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "framework", "framework", "{23500169-FC01-4D2B-A997-E7FAE2169FC0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Cors", "framework\Framework.Cors\Framework.Cors.csproj", "{AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.ErrorHandling.Library", "framework\Framework.ErrorHandling.Library\Framework.ErrorHandling.Library.csproj", "{E6C12BC5-998A-49BD-A737-7C02D14EC5CA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.IO", "framework\Framework.IO\Framework.IO.csproj", "{4157A958-5EC3-4A62-8C50-D20753AEB39B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Models", "framework\Framework.Models\Framework.Models.csproj", "{367EF094-2B47-48F5-BE0B-829FE5CB905C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Swagger", "framework\Framework.Swagger\Framework.Swagger.csproj", "{2B5383E4-9A0D-4B19-B4E1-4715EA747B11}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Web", "framework\Framework.Web\Framework.Web.csproj", "{4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "keycloak", "keycloak", "{46383371-8252-4598-9350-A97692851408}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keycloak.Authentication", "keycloak\Keycloak.Authentication\Keycloak.Authentication.csproj", "{69004CBA-5B0C-42C7-A4DA-4727F14AA20A}" @@ -78,8 +64,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Registration.Service", "reg EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Administration.Service.Tests", "..\tests\administration\Administration.Service.Tests\Administration.Service.Tests.csproj", "{1EFC9D98-C8EE-4399-9B2D-876CDDE8CFD3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.ErrorHandling.Web.Tests", "..\tests\framework\Framework.ErrorHandling.Web.Tests\Framework.ErrorHandling.Web.Tests.csproj", "{FB2E573E-23BD-4111-A3E5-2C75B9920946}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apps.Service.Tests", "..\tests\marketplace\Apps.Service.Tests\Apps.Service.Tests.csproj", "{F0EFB95B-39DD-4FDB-A044-0BB9302DDC41}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Offers.Library.Tests", "..\tests\marketplace\Offers.Library.Tests\Offers.Library.Tests.csproj", "{F995582E-729F-4EA0-831F-6CA5058114EF}" @@ -100,28 +84,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Shared", "..\tests\sh EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{323C198D-A8C6-4EB0-8B79-72624275E35F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Async", "framework\Framework.Async\Framework.Async.csproj", "{A1862697-AB25-4D79-B601-02733A3490B2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.IO.Tests", "..\tests\framework\Framework.IO.Tests\Framework.IO.Tests.csproj", "{2E0BC264-3EB6-4EC2-B332-0F0E50180401}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.BaseDependencies", "framework\Framework.BaseDependencies\Framework.BaseDependencies.csproj", "{CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Provisioning.Migrations", "provisioning\Provisioning.Migrations\Provisioning.Migrations.csproj", "{3F7A02D4-073C-40FE-B228-8E1BA96B1946}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Token", "framework\Framework.Token\Framework.Token.csproj", "{E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Token.Tests", "..\tests\framework\Framework.Token.Tests\Framework.Token.Tests.csproj", "{4316375F-361B-49D6-A310-08CD96D04398}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Provisioning.DBAccess.Tests", "..\tests\provisioning\Provisioning.DBAccess.Tests\Provisioning.DBAccess.Tests.csproj", "{0C039C14-74CA-484C-B8D9-A307C97EC312}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maintenance.App.Tests", "..\tests\maintenance\Maintenance.App.Tests\Maintenance.App.Tests.csproj", "{3828FF08-4CD7-4FF8-B94A-ED5D5FFA0382}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Seeding", "framework\Framework.Seeding\Framework.Seeding.csproj", "{C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.DBAccess", "framework\Framework.DBAccess\Framework.DBAccess.csproj", "{54799CEE-DC66-4B5B-9A2A-3C8732CAB669}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.DBAccess.Tests", "..\tests\framework\Framework.DBAccess.Tests\Framework.DBAccess.Tests.csproj", "{D577BF62-519F-4AF7-B317-47B144186144}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationChecklist.Library.Tests", "..\tests\processes\ApplicationChecklist.Library.Tests\ApplicationChecklist.Library.Tests.csproj", "{8B7D8210-05A4-4C0A-AB19-D695E6E97281}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "processes", "processes", "{282CEF03-292F-4A49-83C6-997567D0FF5F}" @@ -142,10 +110,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Custodian.Library.Tests", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bpdm.Library", "..\tests\externalsystems\Bpdm.Library\Bpdm.Library.csproj", "{79118108-4654-4D71-8B04-C83FCF5C4EBA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Logging", "framework\Framework.Logging\Framework.Logging.csproj", "{DF65D45B-7779-4575-9CE8-0675C84A2495}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.ErrorHandling.Web", "framework\Framework.ErrorHandling.Web\Framework.ErrorHandling.Web.csproj", "{635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Clearinghouse.Library", "externalsystems\Clearinghouse.Library\Clearinghouse.Library.csproj", "{5BA98BC4-941A-4911-9479-EA4ED48D6FF3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Clearinghouse.Library.Tests", "..\tests\externalsystems\Clearinghouse.Library.Tests\Clearinghouse.Library.Tests.csproj", "{4F0E9174-5DB5-42C5-9AA2-4914BDD29AE6}" @@ -158,12 +122,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationActivation.Libra EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationActivation.Library.Tests", "..\tests\registration\ApplicationActivation.Library.Tests\ApplicationActivation.Library.Tests.csproj", "{96D96CA7-35C0-40C6-A8C8-91E0C4456660}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.DateTimeProvider", "framework\Framework.DateTimeProvider\Framework.DateTimeProvider.csproj", "{AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationChecklist.Config", "processes\ApplicationChecklist.Config\ApplicationChecklist.Config.csproj", "{C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.HttpClient", "framework\Framework.HttpClient\Framework.HttpClient.csproj", "{4B13E087-E789-4A8D-BE06-5461FA4900A5}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Processes.Worker.Library", "processes\Processes.Worker.Library\Processes.Worker.Library.csproj", "{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationChecklist.Executor", "processes\ApplicationChecklist.Executor\ApplicationChecklist.Executor.csproj", "{0221E83B-B26B-442F-ACAD-B1043DF9993A}" @@ -172,10 +132,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Processes.Worker.Library.Te EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortalBackend.Migrations.Tests", "..\tests\portalbackend\PortalBackend.Migrations.Tests\PortalBackend.Migrations.Tests.csproj", "{7985B208-CE41-49DA-B749-B94B582612E6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Async.Tests", "..\tests\framework\Framework.Async.Tests\Framework.Async.Tests.csproj", "{98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Web.Tests", "..\tests\framework\Framework.Web.Tests\Framework.Web.Tests.csproj", "{FD7EA0BC-B14C-4315-BDC8-1DD28B717042}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OfferSubscription.Executor", "processes\OfferSubscription.Executor\OfferSubscription.Executor.csproj", "{4C7E9EAC-222B-4C13-B8B1-5987406817A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OfferSubscription.Library", "processes\OfferSubscription.Library\OfferSubscription.Library.csproj", "{15BA8836-E9FE-4F64-AD97-261A524779A5}" @@ -196,18 +152,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Offers.Library.Web", "marke EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Offer.Library.Web.Tests", "..\tests\marketplace\Offer.Library.Web.Tests\Offer.Library.Web.Tests.csproj", "{1694E75F-ABCE-4573-B805-18ED50F148FD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Linq", "framework\Framework.Linq\Framework.Linq.csproj", "{031237BF-7B2A-4B37-9E37-4D4C575FDD22}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Linq.Tests", "..\tests\framework\Framework.Linq.Tests\Framework.Linq.Tests.csproj", "{4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Models.Tests", "..\tests\framework\Framework.Models.Tests\Framework.Models.Tests.csproj", "{EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.ProcessIdentity", "framework\Framework.ProcessIdentity\Framework.ProcessIdentity.csproj", "{4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.PublicInfos", "framework\Framework.PublicInfos\Framework.PublicInfos.csproj", "{47E089E3-E875-4045-9E58-C1223BE899E9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.PublicInfos.Tests", "..\tests\framework\Framework.PublicInfos.Tests\Framework.PublicInfos.Tests.csproj", "{9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keycloak.Seeding", "keycloak\Keycloak.Seeding\Keycloak.Seeding.csproj", "{E1D41A07-F468-4D13-8185-35F127230B17}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keycloak.Seeding.Tests", "..\tests\keycloak\Keycloak.Seeding.Tests\Keycloak.Seeding.Tests.csproj", "{A5BEDD89-7280-466E-8D14-EC5E177AAD07}" @@ -230,13 +174,77 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnboardingServiceProvider.L EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetworkRegistration.Executor.Tests", "..\tests\processes\NetworkRegistration.Executor.Tests\NetworkRegistration.Executor.Tests.csproj", "{F1A5A73C-2B8C-4959-A128-CC5A8DECCB1B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Logging.Tests", "..\tests\framework\Framework.Logging.Tests\Framework.Logging.Tests.csproj", "{146865E5-7DFF-4CC2-8521-9E22CFCEEA20}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Registration.Common", "registration\Registration.Common\Registration.Common.csproj", "{09EF5799-B375-49F1-B78F-0A94D8109F8B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keycloak.Authentication.Tests", "..\tests\keycloak\Keycloak.Authentication.Tests\Keycloak.Authentication.Tests.csproj", "{C7ACF748-DEF4-4646-A791-F1DA437CC965}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.ProcessIdentity.Tests", "..\tests\framework\Framework.ProcessIdentity.Tests\Framework.ProcessIdentity.Tests.csproj", "{996CAB8C-B43A-4E76-B906-034A395C1429}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "web", "web", "{69AF541C-7D45-42CE-BDF4-398EA00ED8A5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web.Identity", "web\Web.Identity\Web.Identity.csproj", "{F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web.PublicInfos", "web\Web.PublicInfos\Web.PublicInfos.csproj", "{03566938-B926-4D8D-9974-3DB9AF0DCC40}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Processes.ProcessIdentity", "processes\Processes.ProcessIdentity\Processes.ProcessIdentity.csproj", "{943EFA0A-E377-4FE8-89E2-A49C4DC04590}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web.PublicInfos.Tests", "..\tests\web\Web.PublicInfos.Tests\Web.PublicInfos.Tests.csproj", "{5B9BC27A-B2D4-4745-8906-0AC4EAC62469}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web.Identity.Tests", "..\tests\web\Web.Identity.Tests\Web.Identity.Tests.csproj", "{BAB5053F-A224-4C30-8B49-0F3F7C777852}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web.Initialization", "web\Web.Initialization\Web.Initialization.csproj", "{48F11819-C031-4AD1-9805-886A40913061}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Tests.Shared", "..\tests\framework\Framework.Tests.Shared\Framework.Tests.Shared.csproj", "{264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "framework", "framework", "{B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Async", "framework\Framework.Async\Framework.Async.csproj", "{D493239E-05AD-4F61-84F0-BB4F713EAF96}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Cors", "framework\Framework.Cors\Framework.Cors.csproj", "{4A7A3E47-D1A4-4889-A05E-483D444450AB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.DateTimeProvider", "framework\Framework.DateTimeProvider\Framework.DateTimeProvider.csproj", "{7AE123CC-44BA-49EC-8410-69AE906EC26F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.DBAccess", "framework\Framework.DBAccess\Framework.DBAccess.csproj", "{7289C9E0-3899-4FE7-8777-E6F3722B9840}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.DependencyInjection", "framework\Framework.DependencyInjection\Framework.DependencyInjection.csproj", "{FE0CD04C-51D5-4734-9EC7-3A10CF628E03}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.ErrorHandling", "framework\Framework.ErrorHandling\Framework.ErrorHandling.csproj", "{54F37552-2429-45B7-B17A-47AD8A2CADA3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.ErrorHandling.Web", "framework\Framework.ErrorHandling.Web\Framework.ErrorHandling.Web.csproj", "{88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.HttpClientExtensions", "framework\Framework.HttpClientExtensions\Framework.HttpClientExtensions.csproj", "{BA9866FA-0166-4A91-94AC-D7CD0243F7CF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.IO", "framework\Framework.IO\Framework.IO.csproj", "{27A94CE1-8293-4486-B56A-8E9F167B6D6B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Linq", "framework\Framework.Linq\Framework.Linq.csproj", "{4A4CD272-E8E9-4BD0-BA09-01093534EEE3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Logging", "framework\Framework.Logging\Framework.Logging.csproj", "{DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Models", "framework\Framework.Models\Framework.Models.csproj", "{951A2647-BEE0-44D6-B789-3B4A21B1CD63}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Seeding", "framework\Framework.Seeding\Framework.Seeding.csproj", "{BD567482-CAFB-403B-AFE5-8D9CFC773DDC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Swagger", "framework\Framework.Swagger\Framework.Swagger.csproj", "{08051253-1AFB-4966-A572-A60363CD1EF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Token", "framework\Framework.Token\Framework.Token.csproj", "{FB548843-42C7-408C-94E9-107AA0F1B891}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Web", "framework\Framework.Web\Framework.Web.csproj", "{55C45163-F141-4B2C-8013-39132B8FDCF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Async.Tests", "..\tests\framework\Framework.Async.Tests\Framework.Async.Tests.csproj", "{60D82034-0160-4283-BBEC-C5AF64FDA585}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.DBAccess.Tests", "..\tests\framework\Framework.DBAccess.Tests\Framework.DBAccess.Tests.csproj", "{408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.ErrorHandling.Web.Tests", "..\tests\framework\Framework.ErrorHandling.Web.Tests\Framework.ErrorHandling.Web.Tests.csproj", "{7DB79D93-AC00-4ECD-854A-E6327C0791CE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.IO.Tests", "..\tests\framework\Framework.IO.Tests\Framework.IO.Tests.csproj", "{BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Linq.Tests", "..\tests\framework\Framework.Linq.Tests\Framework.Linq.Tests.csproj", "{64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Logging.Tests", "..\tests\framework\Framework.Logging.Tests\Framework.Logging.Tests.csproj", "{C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Models.Tests", "..\tests\framework\Framework.Models.Tests\Framework.Models.Tests.csproj", "{B733F449-AE22-4B00-9F33-816B2F809EF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Token.Tests", "..\tests\framework\Framework.Token.Tests\Framework.Token.Tests.csproj", "{562DF697-262E-44DB-B6B5-40395E00D87C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Web.Tests", "..\tests\framework\Framework.Web.Tests\Framework.Web.Tests.csproj", "{7A6C6A10-DC2E-4A16-8758-1115473F3D94}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -260,78 +268,6 @@ Global {06418D5E-5963-4D46-8F09-A0E132721C64}.Release|x64.Build.0 = Release|Any CPU {06418D5E-5963-4D46-8F09-A0E132721C64}.Release|x86.ActiveCfg = Release|Any CPU {06418D5E-5963-4D46-8F09-A0E132721C64}.Release|x86.Build.0 = Release|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Debug|x64.ActiveCfg = Debug|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Debug|x64.Build.0 = Debug|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Debug|x86.ActiveCfg = Debug|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Debug|x86.Build.0 = Debug|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Release|Any CPU.Build.0 = Release|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Release|x64.ActiveCfg = Release|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Release|x64.Build.0 = Release|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Release|x86.ActiveCfg = Release|Any CPU - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173}.Release|x86.Build.0 = Release|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Debug|x64.ActiveCfg = Debug|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Debug|x64.Build.0 = Debug|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Debug|x86.ActiveCfg = Debug|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Debug|x86.Build.0 = Debug|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Release|Any CPU.Build.0 = Release|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Release|x64.ActiveCfg = Release|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Release|x64.Build.0 = Release|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Release|x86.ActiveCfg = Release|Any CPU - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA}.Release|x86.Build.0 = Release|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Debug|x64.ActiveCfg = Debug|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Debug|x64.Build.0 = Debug|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Debug|x86.ActiveCfg = Debug|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Debug|x86.Build.0 = Debug|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Release|Any CPU.Build.0 = Release|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Release|x64.ActiveCfg = Release|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Release|x64.Build.0 = Release|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Release|x86.ActiveCfg = Release|Any CPU - {4157A958-5EC3-4A62-8C50-D20753AEB39B}.Release|x86.Build.0 = Release|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Debug|x64.ActiveCfg = Debug|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Debug|x64.Build.0 = Debug|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Debug|x86.ActiveCfg = Debug|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Debug|x86.Build.0 = Debug|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Release|Any CPU.Build.0 = Release|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Release|x64.ActiveCfg = Release|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Release|x64.Build.0 = Release|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Release|x86.ActiveCfg = Release|Any CPU - {367EF094-2B47-48F5-BE0B-829FE5CB905C}.Release|x86.Build.0 = Release|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Debug|x64.ActiveCfg = Debug|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Debug|x64.Build.0 = Debug|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Debug|x86.ActiveCfg = Debug|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Debug|x86.Build.0 = Debug|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Release|Any CPU.Build.0 = Release|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Release|x64.ActiveCfg = Release|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Release|x64.Build.0 = Release|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Release|x86.ActiveCfg = Release|Any CPU - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11}.Release|x86.Build.0 = Release|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Debug|x64.ActiveCfg = Debug|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Debug|x64.Build.0 = Debug|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Debug|x86.ActiveCfg = Debug|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Debug|x86.Build.0 = Debug|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Release|Any CPU.Build.0 = Release|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Release|x64.ActiveCfg = Release|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Release|x64.Build.0 = Release|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Release|x86.ActiveCfg = Release|Any CPU - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56}.Release|x86.Build.0 = Release|Any CPU {69004CBA-5B0C-42C7-A4DA-4727F14AA20A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {69004CBA-5B0C-42C7-A4DA-4727F14AA20A}.Debug|Any CPU.Build.0 = Debug|Any CPU {69004CBA-5B0C-42C7-A4DA-4727F14AA20A}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -584,18 +520,6 @@ Global {1EFC9D98-C8EE-4399-9B2D-876CDDE8CFD3}.Release|x64.Build.0 = Release|Any CPU {1EFC9D98-C8EE-4399-9B2D-876CDDE8CFD3}.Release|x86.ActiveCfg = Release|Any CPU {1EFC9D98-C8EE-4399-9B2D-876CDDE8CFD3}.Release|x86.Build.0 = Release|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Debug|x64.ActiveCfg = Debug|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Debug|x64.Build.0 = Debug|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Debug|x86.ActiveCfg = Debug|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Debug|x86.Build.0 = Debug|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Release|Any CPU.Build.0 = Release|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Release|x64.ActiveCfg = Release|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Release|x64.Build.0 = Release|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Release|x86.ActiveCfg = Release|Any CPU - {FB2E573E-23BD-4111-A3E5-2C75B9920946}.Release|x86.Build.0 = Release|Any CPU {F0EFB95B-39DD-4FDB-A044-0BB9302DDC41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F0EFB95B-39DD-4FDB-A044-0BB9302DDC41}.Debug|Any CPU.Build.0 = Debug|Any CPU {F0EFB95B-39DD-4FDB-A044-0BB9302DDC41}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -704,42 +628,6 @@ Global {2B1218E4-E1A4-418E-A55F-16B7F30235A7}.Release|x64.Build.0 = Release|Any CPU {2B1218E4-E1A4-418E-A55F-16B7F30235A7}.Release|x86.ActiveCfg = Release|Any CPU {2B1218E4-E1A4-418E-A55F-16B7F30235A7}.Release|x86.Build.0 = Release|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Debug|x64.ActiveCfg = Debug|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Debug|x64.Build.0 = Debug|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Debug|x86.ActiveCfg = Debug|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Debug|x86.Build.0 = Debug|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Release|Any CPU.Build.0 = Release|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Release|x64.ActiveCfg = Release|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Release|x64.Build.0 = Release|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Release|x86.ActiveCfg = Release|Any CPU - {A1862697-AB25-4D79-B601-02733A3490B2}.Release|x86.Build.0 = Release|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Debug|x64.ActiveCfg = Debug|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Debug|x64.Build.0 = Debug|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Debug|x86.Build.0 = Debug|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Release|Any CPU.Build.0 = Release|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Release|x64.ActiveCfg = Release|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Release|x64.Build.0 = Release|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Release|x86.ActiveCfg = Release|Any CPU - {2E0BC264-3EB6-4EC2-B332-0F0E50180401}.Release|x86.Build.0 = Release|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Debug|x64.ActiveCfg = Debug|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Debug|x64.Build.0 = Debug|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Debug|x86.ActiveCfg = Debug|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Debug|x86.Build.0 = Debug|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Release|Any CPU.Build.0 = Release|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Release|x64.ActiveCfg = Release|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Release|x64.Build.0 = Release|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Release|x86.ActiveCfg = Release|Any CPU - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E}.Release|x86.Build.0 = Release|Any CPU {3F7A02D4-073C-40FE-B228-8E1BA96B1946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3F7A02D4-073C-40FE-B228-8E1BA96B1946}.Debug|Any CPU.Build.0 = Debug|Any CPU {3F7A02D4-073C-40FE-B228-8E1BA96B1946}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -752,30 +640,6 @@ Global {3F7A02D4-073C-40FE-B228-8E1BA96B1946}.Release|x64.Build.0 = Release|Any CPU {3F7A02D4-073C-40FE-B228-8E1BA96B1946}.Release|x86.ActiveCfg = Release|Any CPU {3F7A02D4-073C-40FE-B228-8E1BA96B1946}.Release|x86.Build.0 = Release|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Debug|x64.ActiveCfg = Debug|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Debug|x64.Build.0 = Debug|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Debug|x86.ActiveCfg = Debug|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Debug|x86.Build.0 = Debug|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Release|Any CPU.Build.0 = Release|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Release|x64.ActiveCfg = Release|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Release|x64.Build.0 = Release|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Release|x86.ActiveCfg = Release|Any CPU - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F}.Release|x86.Build.0 = Release|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Debug|x64.ActiveCfg = Debug|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Debug|x64.Build.0 = Debug|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Debug|x86.ActiveCfg = Debug|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Debug|x86.Build.0 = Debug|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Release|Any CPU.Build.0 = Release|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Release|x64.ActiveCfg = Release|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Release|x64.Build.0 = Release|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Release|x86.ActiveCfg = Release|Any CPU - {4316375F-361B-49D6-A310-08CD96D04398}.Release|x86.Build.0 = Release|Any CPU {0C039C14-74CA-484C-B8D9-A307C97EC312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0C039C14-74CA-484C-B8D9-A307C97EC312}.Debug|Any CPU.Build.0 = Debug|Any CPU {0C039C14-74CA-484C-B8D9-A307C97EC312}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -800,42 +664,6 @@ Global {3828FF08-4CD7-4FF8-B94A-ED5D5FFA0382}.Release|x64.Build.0 = Release|Any CPU {3828FF08-4CD7-4FF8-B94A-ED5D5FFA0382}.Release|x86.ActiveCfg = Release|Any CPU {3828FF08-4CD7-4FF8-B94A-ED5D5FFA0382}.Release|x86.Build.0 = Release|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Debug|x64.ActiveCfg = Debug|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Debug|x64.Build.0 = Debug|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Debug|x86.ActiveCfg = Debug|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Debug|x86.Build.0 = Debug|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Release|Any CPU.Build.0 = Release|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Release|x64.ActiveCfg = Release|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Release|x64.Build.0 = Release|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Release|x86.ActiveCfg = Release|Any CPU - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A}.Release|x86.Build.0 = Release|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Debug|Any CPU.Build.0 = Debug|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Debug|x64.ActiveCfg = Debug|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Debug|x64.Build.0 = Debug|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Debug|x86.ActiveCfg = Debug|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Debug|x86.Build.0 = Debug|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Release|Any CPU.ActiveCfg = Release|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Release|Any CPU.Build.0 = Release|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Release|x64.ActiveCfg = Release|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Release|x64.Build.0 = Release|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Release|x86.ActiveCfg = Release|Any CPU - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669}.Release|x86.Build.0 = Release|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Debug|x64.ActiveCfg = Debug|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Debug|x64.Build.0 = Debug|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Debug|x86.ActiveCfg = Debug|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Debug|x86.Build.0 = Debug|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Release|Any CPU.Build.0 = Release|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Release|x64.ActiveCfg = Release|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Release|x64.Build.0 = Release|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Release|x86.ActiveCfg = Release|Any CPU - {D577BF62-519F-4AF7-B317-47B144186144}.Release|x86.Build.0 = Release|Any CPU {8B7D8210-05A4-4C0A-AB19-D695E6E97281}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B7D8210-05A4-4C0A-AB19-D695E6E97281}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B7D8210-05A4-4C0A-AB19-D695E6E97281}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -932,30 +760,6 @@ Global {79118108-4654-4D71-8B04-C83FCF5C4EBA}.Release|x64.Build.0 = Release|Any CPU {79118108-4654-4D71-8B04-C83FCF5C4EBA}.Release|x86.ActiveCfg = Release|Any CPU {79118108-4654-4D71-8B04-C83FCF5C4EBA}.Release|x86.Build.0 = Release|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Debug|x64.ActiveCfg = Debug|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Debug|x64.Build.0 = Debug|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Debug|x86.ActiveCfg = Debug|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Debug|x86.Build.0 = Debug|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Release|Any CPU.Build.0 = Release|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Release|x64.ActiveCfg = Release|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Release|x64.Build.0 = Release|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Release|x86.ActiveCfg = Release|Any CPU - {DF65D45B-7779-4575-9CE8-0675C84A2495}.Release|x86.Build.0 = Release|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Debug|x64.ActiveCfg = Debug|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Debug|x64.Build.0 = Debug|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Debug|x86.ActiveCfg = Debug|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Debug|x86.Build.0 = Debug|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Release|Any CPU.Build.0 = Release|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Release|x64.ActiveCfg = Release|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Release|x64.Build.0 = Release|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Release|x86.ActiveCfg = Release|Any CPU - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D}.Release|x86.Build.0 = Release|Any CPU {5BA98BC4-941A-4911-9479-EA4ED48D6FF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5BA98BC4-941A-4911-9479-EA4ED48D6FF3}.Debug|Any CPU.Build.0 = Debug|Any CPU {5BA98BC4-941A-4911-9479-EA4ED48D6FF3}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1028,18 +832,6 @@ Global {96D96CA7-35C0-40C6-A8C8-91E0C4456660}.Release|x64.Build.0 = Release|Any CPU {96D96CA7-35C0-40C6-A8C8-91E0C4456660}.Release|x86.ActiveCfg = Release|Any CPU {96D96CA7-35C0-40C6-A8C8-91E0C4456660}.Release|x86.Build.0 = Release|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Debug|x64.ActiveCfg = Debug|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Debug|x64.Build.0 = Debug|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Debug|x86.ActiveCfg = Debug|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Debug|x86.Build.0 = Debug|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Release|Any CPU.Build.0 = Release|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Release|x64.ActiveCfg = Release|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Release|x64.Build.0 = Release|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Release|x86.ActiveCfg = Release|Any CPU - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73}.Release|x86.Build.0 = Release|Any CPU {C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Debug|Any CPU.Build.0 = Debug|Any CPU {C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1052,18 +844,6 @@ Global {C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Release|x64.Build.0 = Release|Any CPU {C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Release|x86.ActiveCfg = Release|Any CPU {C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Release|x86.Build.0 = Release|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Debug|x64.ActiveCfg = Debug|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Debug|x64.Build.0 = Debug|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Debug|x86.ActiveCfg = Debug|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Debug|x86.Build.0 = Debug|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Release|Any CPU.Build.0 = Release|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Release|x64.ActiveCfg = Release|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Release|x64.Build.0 = Release|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Release|x86.ActiveCfg = Release|Any CPU - {4B13E087-E789-4A8D-BE06-5461FA4900A5}.Release|x86.Build.0 = Release|Any CPU {527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|Any CPU.Build.0 = Debug|Any CPU {527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1124,30 +904,6 @@ Global {7985B208-CE41-49DA-B749-B94B582612E6}.Release|x64.Build.0 = Release|Any CPU {7985B208-CE41-49DA-B749-B94B582612E6}.Release|x86.ActiveCfg = Release|Any CPU {7985B208-CE41-49DA-B749-B94B582612E6}.Release|x86.Build.0 = Release|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Debug|x64.ActiveCfg = Debug|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Debug|x64.Build.0 = Debug|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Debug|x86.ActiveCfg = Debug|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Debug|x86.Build.0 = Debug|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Release|Any CPU.Build.0 = Release|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Release|x64.ActiveCfg = Release|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Release|x64.Build.0 = Release|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Release|x86.ActiveCfg = Release|Any CPU - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C}.Release|x86.Build.0 = Release|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Debug|x64.ActiveCfg = Debug|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Debug|x64.Build.0 = Debug|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Debug|x86.ActiveCfg = Debug|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Debug|x86.Build.0 = Debug|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Release|Any CPU.Build.0 = Release|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Release|x64.ActiveCfg = Release|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Release|x64.Build.0 = Release|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Release|x86.ActiveCfg = Release|Any CPU - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042}.Release|x86.Build.0 = Release|Any CPU {15BA8836-E9FE-4F64-AD97-261A524779A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {15BA8836-E9FE-4F64-AD97-261A524779A5}.Debug|Any CPU.Build.0 = Debug|Any CPU {15BA8836-E9FE-4F64-AD97-261A524779A5}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1256,78 +1012,6 @@ Global {1694E75F-ABCE-4573-B805-18ED50F148FD}.Release|x64.Build.0 = Release|Any CPU {1694E75F-ABCE-4573-B805-18ED50F148FD}.Release|x86.ActiveCfg = Release|Any CPU {1694E75F-ABCE-4573-B805-18ED50F148FD}.Release|x86.Build.0 = Release|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Debug|Any CPU.Build.0 = Debug|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Debug|x64.ActiveCfg = Debug|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Debug|x64.Build.0 = Debug|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Debug|x86.ActiveCfg = Debug|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Debug|x86.Build.0 = Debug|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Release|Any CPU.ActiveCfg = Release|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Release|Any CPU.Build.0 = Release|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Release|x64.ActiveCfg = Release|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Release|x64.Build.0 = Release|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Release|x86.ActiveCfg = Release|Any CPU - {031237BF-7B2A-4B37-9E37-4D4C575FDD22}.Release|x86.Build.0 = Release|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Debug|x64.ActiveCfg = Debug|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Debug|x64.Build.0 = Debug|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Debug|x86.ActiveCfg = Debug|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Debug|x86.Build.0 = Debug|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Release|Any CPU.Build.0 = Release|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Release|x64.ActiveCfg = Release|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Release|x64.Build.0 = Release|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Release|x86.ActiveCfg = Release|Any CPU - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B}.Release|x86.Build.0 = Release|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Debug|x64.ActiveCfg = Debug|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Debug|x64.Build.0 = Debug|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Debug|x86.ActiveCfg = Debug|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Debug|x86.Build.0 = Debug|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Release|Any CPU.Build.0 = Release|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Release|x64.ActiveCfg = Release|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Release|x64.Build.0 = Release|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Release|x86.ActiveCfg = Release|Any CPU - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82}.Release|x86.Build.0 = Release|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Debug|x64.ActiveCfg = Debug|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Debug|x64.Build.0 = Debug|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Debug|x86.ActiveCfg = Debug|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Debug|x86.Build.0 = Debug|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Release|Any CPU.Build.0 = Release|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Release|x64.ActiveCfg = Release|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Release|x64.Build.0 = Release|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Release|x86.ActiveCfg = Release|Any CPU - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A}.Release|x86.Build.0 = Release|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Debug|x64.ActiveCfg = Debug|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Debug|x64.Build.0 = Debug|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Debug|x86.ActiveCfg = Debug|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Debug|x86.Build.0 = Debug|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Release|Any CPU.Build.0 = Release|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Release|x64.ActiveCfg = Release|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Release|x64.Build.0 = Release|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Release|x86.ActiveCfg = Release|Any CPU - {47E089E3-E875-4045-9E58-C1223BE899E9}.Release|x86.Build.0 = Release|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Debug|x64.ActiveCfg = Debug|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Debug|x64.Build.0 = Debug|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Debug|x86.ActiveCfg = Debug|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Debug|x86.Build.0 = Debug|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Release|Any CPU.Build.0 = Release|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Release|x64.ActiveCfg = Release|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Release|x64.Build.0 = Release|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Release|x86.ActiveCfg = Release|Any CPU - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3}.Release|x86.Build.0 = Release|Any CPU {E1D41A07-F468-4D13-8185-35F127230B17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E1D41A07-F468-4D13-8185-35F127230B17}.Debug|Any CPU.Build.0 = Debug|Any CPU {E1D41A07-F468-4D13-8185-35F127230B17}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1460,18 +1144,18 @@ Global {F1A5A73C-2B8C-4959-A128-CC5A8DECCB1B}.Release|x64.Build.0 = Release|Any CPU {F1A5A73C-2B8C-4959-A128-CC5A8DECCB1B}.Release|x86.ActiveCfg = Release|Any CPU {F1A5A73C-2B8C-4959-A128-CC5A8DECCB1B}.Release|x86.Build.0 = Release|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Debug|Any CPU.Build.0 = Debug|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Debug|x64.ActiveCfg = Debug|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Debug|x64.Build.0 = Debug|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Debug|x86.ActiveCfg = Debug|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Debug|x86.Build.0 = Debug|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Release|Any CPU.ActiveCfg = Release|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Release|Any CPU.Build.0 = Release|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Release|x64.ActiveCfg = Release|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Release|x64.Build.0 = Release|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Release|x86.ActiveCfg = Release|Any CPU - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20}.Release|x86.Build.0 = Release|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Debug|x64.ActiveCfg = Debug|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Debug|x64.Build.0 = Debug|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Debug|x86.ActiveCfg = Debug|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Debug|x86.Build.0 = Debug|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Release|Any CPU.Build.0 = Release|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Release|x64.ActiveCfg = Release|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Release|x64.Build.0 = Release|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Release|x86.ActiveCfg = Release|Any CPU + {571DA63A-6B96-4C6C-8D82-D2C1F10BDAE5}.Release|x86.Build.0 = Release|Any CPU {09EF5799-B375-49F1-B78F-0A94D8109F8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {09EF5799-B375-49F1-B78F-0A94D8109F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU {09EF5799-B375-49F1-B78F-0A94D8109F8B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1496,18 +1180,390 @@ Global {C7ACF748-DEF4-4646-A791-F1DA437CC965}.Release|x64.Build.0 = Release|Any CPU {C7ACF748-DEF4-4646-A791-F1DA437CC965}.Release|x86.ActiveCfg = Release|Any CPU {C7ACF748-DEF4-4646-A791-F1DA437CC965}.Release|x86.Build.0 = Release|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Debug|Any CPU.Build.0 = Debug|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Debug|x64.ActiveCfg = Debug|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Debug|x64.Build.0 = Debug|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Debug|x86.ActiveCfg = Debug|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Debug|x86.Build.0 = Debug|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Release|Any CPU.ActiveCfg = Release|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Release|Any CPU.Build.0 = Release|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Release|x64.ActiveCfg = Release|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Release|x64.Build.0 = Release|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Release|x86.ActiveCfg = Release|Any CPU - {996CAB8C-B43A-4E76-B906-034A395C1429}.Release|x86.Build.0 = Release|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Debug|x64.ActiveCfg = Debug|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Debug|x64.Build.0 = Debug|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Debug|x86.ActiveCfg = Debug|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Debug|x86.Build.0 = Debug|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Release|Any CPU.Build.0 = Release|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Release|x64.ActiveCfg = Release|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Release|x64.Build.0 = Release|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Release|x86.ActiveCfg = Release|Any CPU + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723}.Release|x86.Build.0 = Release|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Debug|x64.ActiveCfg = Debug|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Debug|x64.Build.0 = Debug|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Debug|x86.ActiveCfg = Debug|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Debug|x86.Build.0 = Debug|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Release|Any CPU.Build.0 = Release|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Release|x64.ActiveCfg = Release|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Release|x64.Build.0 = Release|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Release|x86.ActiveCfg = Release|Any CPU + {03566938-B926-4D8D-9974-3DB9AF0DCC40}.Release|x86.Build.0 = Release|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Debug|Any CPU.Build.0 = Debug|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Debug|x64.ActiveCfg = Debug|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Debug|x64.Build.0 = Debug|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Debug|x86.ActiveCfg = Debug|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Debug|x86.Build.0 = Debug|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Release|Any CPU.ActiveCfg = Release|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Release|Any CPU.Build.0 = Release|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Release|x64.ActiveCfg = Release|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Release|x64.Build.0 = Release|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Release|x86.ActiveCfg = Release|Any CPU + {943EFA0A-E377-4FE8-89E2-A49C4DC04590}.Release|x86.Build.0 = Release|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Debug|x64.ActiveCfg = Debug|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Debug|x64.Build.0 = Debug|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Debug|x86.ActiveCfg = Debug|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Debug|x86.Build.0 = Debug|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Release|Any CPU.Build.0 = Release|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Release|x64.ActiveCfg = Release|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Release|x64.Build.0 = Release|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Release|x86.ActiveCfg = Release|Any CPU + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469}.Release|x86.Build.0 = Release|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Debug|x64.ActiveCfg = Debug|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Debug|x64.Build.0 = Debug|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Debug|x86.ActiveCfg = Debug|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Debug|x86.Build.0 = Debug|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Release|Any CPU.Build.0 = Release|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Release|x64.ActiveCfg = Release|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Release|x64.Build.0 = Release|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Release|x86.ActiveCfg = Release|Any CPU + {BAB5053F-A224-4C30-8B49-0F3F7C777852}.Release|x86.Build.0 = Release|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Debug|x64.ActiveCfg = Debug|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Debug|x64.Build.0 = Debug|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Debug|x86.ActiveCfg = Debug|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Debug|x86.Build.0 = Debug|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Release|Any CPU.Build.0 = Release|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Release|x64.ActiveCfg = Release|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Release|x64.Build.0 = Release|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Release|x86.ActiveCfg = Release|Any CPU + {48F11819-C031-4AD1-9805-886A40913061}.Release|x86.Build.0 = Release|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Debug|x64.ActiveCfg = Debug|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Debug|x64.Build.0 = Debug|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Debug|x86.ActiveCfg = Debug|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Debug|x86.Build.0 = Debug|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Release|Any CPU.Build.0 = Release|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Release|x64.ActiveCfg = Release|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Release|x64.Build.0 = Release|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Release|x86.ActiveCfg = Release|Any CPU + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B}.Release|x86.Build.0 = Release|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Debug|x64.ActiveCfg = Debug|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Debug|x64.Build.0 = Debug|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Debug|x86.ActiveCfg = Debug|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Debug|x86.Build.0 = Debug|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Release|Any CPU.Build.0 = Release|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Release|x64.ActiveCfg = Release|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Release|x64.Build.0 = Release|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Release|x86.ActiveCfg = Release|Any CPU + {D493239E-05AD-4F61-84F0-BB4F713EAF96}.Release|x86.Build.0 = Release|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Debug|x64.ActiveCfg = Debug|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Debug|x64.Build.0 = Debug|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Debug|x86.ActiveCfg = Debug|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Debug|x86.Build.0 = Debug|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Release|Any CPU.Build.0 = Release|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Release|x64.ActiveCfg = Release|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Release|x64.Build.0 = Release|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Release|x86.ActiveCfg = Release|Any CPU + {4A7A3E47-D1A4-4889-A05E-483D444450AB}.Release|x86.Build.0 = Release|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Debug|x64.ActiveCfg = Debug|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Debug|x64.Build.0 = Debug|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Debug|x86.ActiveCfg = Debug|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Debug|x86.Build.0 = Debug|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Release|Any CPU.Build.0 = Release|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Release|x64.ActiveCfg = Release|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Release|x64.Build.0 = Release|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Release|x86.ActiveCfg = Release|Any CPU + {7AE123CC-44BA-49EC-8410-69AE906EC26F}.Release|x86.Build.0 = Release|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Debug|x64.ActiveCfg = Debug|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Debug|x64.Build.0 = Debug|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Debug|x86.ActiveCfg = Debug|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Debug|x86.Build.0 = Debug|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Release|Any CPU.Build.0 = Release|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Release|x64.ActiveCfg = Release|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Release|x64.Build.0 = Release|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Release|x86.ActiveCfg = Release|Any CPU + {7289C9E0-3899-4FE7-8777-E6F3722B9840}.Release|x86.Build.0 = Release|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Debug|x64.ActiveCfg = Debug|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Debug|x64.Build.0 = Debug|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Debug|x86.ActiveCfg = Debug|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Debug|x86.Build.0 = Debug|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Release|Any CPU.Build.0 = Release|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Release|x64.ActiveCfg = Release|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Release|x64.Build.0 = Release|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Release|x86.ActiveCfg = Release|Any CPU + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03}.Release|x86.Build.0 = Release|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Debug|x64.ActiveCfg = Debug|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Debug|x64.Build.0 = Debug|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Debug|x86.ActiveCfg = Debug|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Debug|x86.Build.0 = Debug|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Release|Any CPU.Build.0 = Release|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Release|x64.ActiveCfg = Release|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Release|x64.Build.0 = Release|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Release|x86.ActiveCfg = Release|Any CPU + {54F37552-2429-45B7-B17A-47AD8A2CADA3}.Release|x86.Build.0 = Release|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Debug|x64.ActiveCfg = Debug|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Debug|x64.Build.0 = Debug|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Debug|x86.ActiveCfg = Debug|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Debug|x86.Build.0 = Debug|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Release|Any CPU.Build.0 = Release|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Release|x64.ActiveCfg = Release|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Release|x64.Build.0 = Release|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Release|x86.ActiveCfg = Release|Any CPU + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0}.Release|x86.Build.0 = Release|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Debug|x64.ActiveCfg = Debug|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Debug|x64.Build.0 = Debug|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Debug|x86.ActiveCfg = Debug|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Debug|x86.Build.0 = Debug|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Release|Any CPU.Build.0 = Release|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Release|x64.ActiveCfg = Release|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Release|x64.Build.0 = Release|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Release|x86.ActiveCfg = Release|Any CPU + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF}.Release|x86.Build.0 = Release|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Debug|x64.ActiveCfg = Debug|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Debug|x64.Build.0 = Debug|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Debug|x86.ActiveCfg = Debug|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Debug|x86.Build.0 = Debug|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Release|Any CPU.Build.0 = Release|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Release|x64.ActiveCfg = Release|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Release|x64.Build.0 = Release|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Release|x86.ActiveCfg = Release|Any CPU + {27A94CE1-8293-4486-B56A-8E9F167B6D6B}.Release|x86.Build.0 = Release|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Debug|x64.ActiveCfg = Debug|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Debug|x64.Build.0 = Debug|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Debug|x86.ActiveCfg = Debug|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Debug|x86.Build.0 = Debug|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Release|Any CPU.Build.0 = Release|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Release|x64.ActiveCfg = Release|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Release|x64.Build.0 = Release|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Release|x86.ActiveCfg = Release|Any CPU + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3}.Release|x86.Build.0 = Release|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Debug|x64.ActiveCfg = Debug|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Debug|x64.Build.0 = Debug|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Debug|x86.ActiveCfg = Debug|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Debug|x86.Build.0 = Debug|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Release|Any CPU.Build.0 = Release|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Release|x64.ActiveCfg = Release|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Release|x64.Build.0 = Release|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Release|x86.ActiveCfg = Release|Any CPU + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6}.Release|x86.Build.0 = Release|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Debug|x64.ActiveCfg = Debug|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Debug|x64.Build.0 = Debug|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Debug|x86.ActiveCfg = Debug|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Debug|x86.Build.0 = Debug|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Release|Any CPU.Build.0 = Release|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Release|x64.ActiveCfg = Release|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Release|x64.Build.0 = Release|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Release|x86.ActiveCfg = Release|Any CPU + {951A2647-BEE0-44D6-B789-3B4A21B1CD63}.Release|x86.Build.0 = Release|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Debug|x64.ActiveCfg = Debug|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Debug|x64.Build.0 = Debug|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Debug|x86.ActiveCfg = Debug|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Debug|x86.Build.0 = Debug|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Release|Any CPU.Build.0 = Release|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Release|x64.ActiveCfg = Release|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Release|x64.Build.0 = Release|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Release|x86.ActiveCfg = Release|Any CPU + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC}.Release|x86.Build.0 = Release|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Debug|x64.ActiveCfg = Debug|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Debug|x64.Build.0 = Debug|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Debug|x86.ActiveCfg = Debug|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Debug|x86.Build.0 = Debug|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Release|Any CPU.Build.0 = Release|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Release|x64.ActiveCfg = Release|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Release|x64.Build.0 = Release|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Release|x86.ActiveCfg = Release|Any CPU + {08051253-1AFB-4966-A572-A60363CD1EF1}.Release|x86.Build.0 = Release|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Debug|x64.ActiveCfg = Debug|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Debug|x64.Build.0 = Debug|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Debug|x86.ActiveCfg = Debug|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Debug|x86.Build.0 = Debug|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Release|Any CPU.Build.0 = Release|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Release|x64.ActiveCfg = Release|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Release|x64.Build.0 = Release|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Release|x86.ActiveCfg = Release|Any CPU + {FB548843-42C7-408C-94E9-107AA0F1B891}.Release|x86.Build.0 = Release|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Debug|x64.ActiveCfg = Debug|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Debug|x64.Build.0 = Debug|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Debug|x86.ActiveCfg = Debug|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Debug|x86.Build.0 = Debug|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Release|Any CPU.Build.0 = Release|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Release|x64.ActiveCfg = Release|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Release|x64.Build.0 = Release|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Release|x86.ActiveCfg = Release|Any CPU + {55C45163-F141-4B2C-8013-39132B8FDCF1}.Release|x86.Build.0 = Release|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Debug|x64.ActiveCfg = Debug|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Debug|x64.Build.0 = Debug|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Debug|x86.ActiveCfg = Debug|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Debug|x86.Build.0 = Debug|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Release|Any CPU.Build.0 = Release|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Release|x64.ActiveCfg = Release|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Release|x64.Build.0 = Release|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Release|x86.ActiveCfg = Release|Any CPU + {60D82034-0160-4283-BBEC-C5AF64FDA585}.Release|x86.Build.0 = Release|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Debug|x64.ActiveCfg = Debug|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Debug|x64.Build.0 = Debug|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Debug|x86.ActiveCfg = Debug|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Debug|x86.Build.0 = Debug|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Release|Any CPU.Build.0 = Release|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Release|x64.ActiveCfg = Release|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Release|x64.Build.0 = Release|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Release|x86.ActiveCfg = Release|Any CPU + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5}.Release|x86.Build.0 = Release|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Debug|x64.ActiveCfg = Debug|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Debug|x64.Build.0 = Debug|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Debug|x86.ActiveCfg = Debug|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Debug|x86.Build.0 = Debug|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Release|Any CPU.Build.0 = Release|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Release|x64.ActiveCfg = Release|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Release|x64.Build.0 = Release|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Release|x86.ActiveCfg = Release|Any CPU + {7DB79D93-AC00-4ECD-854A-E6327C0791CE}.Release|x86.Build.0 = Release|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Debug|x64.ActiveCfg = Debug|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Debug|x64.Build.0 = Debug|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Debug|x86.ActiveCfg = Debug|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Debug|x86.Build.0 = Debug|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Release|Any CPU.Build.0 = Release|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Release|x64.ActiveCfg = Release|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Release|x64.Build.0 = Release|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Release|x86.ActiveCfg = Release|Any CPU + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD}.Release|x86.Build.0 = Release|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Debug|x64.ActiveCfg = Debug|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Debug|x64.Build.0 = Debug|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Debug|x86.ActiveCfg = Debug|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Debug|x86.Build.0 = Debug|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Release|Any CPU.Build.0 = Release|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Release|x64.ActiveCfg = Release|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Release|x64.Build.0 = Release|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Release|x86.ActiveCfg = Release|Any CPU + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3}.Release|x86.Build.0 = Release|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Debug|x64.ActiveCfg = Debug|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Debug|x64.Build.0 = Debug|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Debug|x86.ActiveCfg = Debug|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Debug|x86.Build.0 = Debug|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Release|Any CPU.Build.0 = Release|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Release|x64.ActiveCfg = Release|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Release|x64.Build.0 = Release|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Release|x86.ActiveCfg = Release|Any CPU + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291}.Release|x86.Build.0 = Release|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Debug|x64.ActiveCfg = Debug|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Debug|x64.Build.0 = Debug|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Debug|x86.ActiveCfg = Debug|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Debug|x86.Build.0 = Debug|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Release|Any CPU.Build.0 = Release|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Release|x64.ActiveCfg = Release|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Release|x64.Build.0 = Release|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Release|x86.ActiveCfg = Release|Any CPU + {B733F449-AE22-4B00-9F33-816B2F809EF1}.Release|x86.Build.0 = Release|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Debug|x64.ActiveCfg = Debug|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Debug|x64.Build.0 = Debug|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Debug|x86.ActiveCfg = Debug|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Debug|x86.Build.0 = Debug|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Release|Any CPU.Build.0 = Release|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Release|x64.ActiveCfg = Release|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Release|x64.Build.0 = Release|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Release|x86.ActiveCfg = Release|Any CPU + {562DF697-262E-44DB-B6B5-40395E00D87C}.Release|x86.Build.0 = Release|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Debug|x64.ActiveCfg = Debug|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Debug|x64.Build.0 = Debug|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Debug|x86.ActiveCfg = Debug|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Debug|x86.Build.0 = Debug|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Release|Any CPU.Build.0 = Release|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Release|x64.ActiveCfg = Release|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Release|x64.Build.0 = Release|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Release|x86.ActiveCfg = Release|Any CPU + {7A6C6A10-DC2E-4A16-8758-1115473F3D94}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1516,20 +1572,12 @@ Global SolutionGuid = {2EB6265F-323A-4BF3-969E-003D64A14B64} EndGlobalSection GlobalSection(NestedProjects) = preSolution - {996CAB8C-B43A-4E76-B906-034A395C1429} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {146865E5-7DFF-4CC2-8521-9E22CFCEEA20} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {A43B5ACA-1209-46E9-84DB-A48553ED623E} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {1EAF34DA-6D16-4F5E-86F4-344185F53942} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {A5BEDD89-7280-466E-8D14-EC5E177AAD07} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {EA9BA26E-83F6-47C4-BA3B-880AF1AD6A82} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {4B40193E-2C67-4DC4-8EF4-3286DAA01D8B} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {5E80DEEA-B254-425C-8220-27EEF47C10BD} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {FD7EA0BC-B14C-4315-BDC8-1DD28B717042} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {98BA45B9-30DE-4CB0-BFAB-3FED4B764E1C} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {B787DF92-23F7-410A-B592-95701E4B423D} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {D577BF62-519F-4AF7-B317-47B144186144} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {0C039C14-74CA-484C-B8D9-A307C97EC312} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {2E0BC264-3EB6-4EC2-B332-0F0E50180401} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {2B1218E4-E1A4-418E-A55F-16B7F30235A7} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {6C2F85D7-0443-4711-96DF-66EC46CA1A98} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {217FE6D7-0DE3-43CF-AFC4-7FA12700F447} = {323C198D-A8C6-4EB0-8B79-72624275E35F} @@ -1538,17 +1586,9 @@ Global {F995582E-729F-4EA0-831F-6CA5058114EF} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {12F16E1B-0275-4F41-8353-C2C9A79BA4E9} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {B6DE0855-385D-4A8C-BC22-04BE2105A2F4} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {FB2E573E-23BD-4111-A3E5-2C75B9920946} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {F0EFB95B-39DD-4FDB-A044-0BB9302DDC41} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {1EFC9D98-C8EE-4399-9B2D-876CDDE8CFD3} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {4316375F-361B-49D6-A310-08CD96D04398} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {06418D5E-5963-4D46-8F09-A0E132721C64} = {E0B99F7E-D108-4054-92C2-31304C5060DE} - {AB6C26B2-2EA8-4E19-9A76-EBE0BF097173} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {E6C12BC5-998A-49BD-A737-7C02D14EC5CA} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {4157A958-5EC3-4A62-8C50-D20753AEB39B} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {367EF094-2B47-48F5-BE0B-829FE5CB905C} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {2B5383E4-9A0D-4B19-B4E1-4715EA747B11} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {4E4EC120-2BA0-4D42-AA03-5F9C52CA3C56} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} {69004CBA-5B0C-42C7-A4DA-4727F14AA20A} = {46383371-8252-4598-9350-A97692851408} {C482693F-A8D8-40FA-AD93-00B03CA6DC31} = {46383371-8252-4598-9350-A97692851408} {E293EC06-2DEF-41B1-BC96-43918F7BDF59} = {46383371-8252-4598-9350-A97692851408} @@ -1569,13 +1609,8 @@ Global {9E9770D8-D2C8-496C-AB86-3A41CDBAEA47} = {AE4A5C54-72F3-4B55-BB86-09DFA3AA3D7B} {22DEE4A2-15ED-4176-B912-B357D474D2AC} = {AE4A5C54-72F3-4B55-BB86-09DFA3AA3D7B} {FBEA925C-EE3C-4D81-A492-0B2D386C161E} = {AB9C5AA2-DD5D-4A38-97C0-674A995C0AE0} - {A1862697-AB25-4D79-B601-02733A3490B2} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {CF221BA2-1CC2-4E7A-9F8E-4D14975E572E} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} {3F7A02D4-073C-40FE-B228-8E1BA96B1946} = {AE4A5C54-72F3-4B55-BB86-09DFA3AA3D7B} - {E45BD4EC-69DD-4890-96E7-E1F3FEFE625F} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} {3828FF08-4CD7-4FF8-B94A-ED5D5FFA0382} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {C42A3C0F-21CD-4498-A48F-C1D6BBEAD00A} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {54799CEE-DC66-4B5B-9A2A-3C8732CAB669} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} {8B7D8210-05A4-4C0A-AB19-D695E6E97281} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {CF80BBB1-C07D-425C-9A5B-54C5E2890CC4} = {282CEF03-292F-4A49-83C6-997567D0FF5F} {D248909F-DFDF-4001-B9F1-8F3DDB0B7D39} = {282CEF03-292F-4A49-83C6-997567D0FF5F} @@ -1584,17 +1619,13 @@ Global {2192F508-D28A-4E96-A6E8-2565FBDDFD9E} = {C8957230-4203-452C-A085-34091C5E370B} {8AD0B125-C67A-4182-B93B-66BC724A3EE3} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {79118108-4654-4D71-8B04-C83FCF5C4EBA} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {DF65D45B-7779-4575-9CE8-0675C84A2495} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {635FB0C5-3A2F-4A34-AB7A-30FFE3EAF77D} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} {5BA98BC4-941A-4911-9479-EA4ED48D6FF3} = {C8957230-4203-452C-A085-34091C5E370B} {4F0E9174-5DB5-42C5-9AA2-4914BDD29AE6} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {7D3D6277-6E91-4F66-AB07-5049A66B5B3D} = {C8957230-4203-452C-A085-34091C5E370B} {A4BF3A98-BE55-4816-991F-086DC3B9E5FB} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {0BFA8C5B-3F15-4381-9621-AD7A3EC0315F} = {AB9C5AA2-DD5D-4A38-97C0-674A995C0AE0} {96D96CA7-35C0-40C6-A8C8-91E0C4456660} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {AB9FC684-E08A-4EEC-9F3A-C256CB2E4D73} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} {C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0} = {282CEF03-292F-4A49-83C6-997567D0FF5F} - {4B13E087-E789-4A8D-BE06-5461FA4900A5} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} {527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E} = {282CEF03-292F-4A49-83C6-997567D0FF5F} {0221E83B-B26B-442F-ACAD-B1043DF9993A} = {282CEF03-292F-4A49-83C6-997567D0FF5F} {4C7E9EAC-222B-4C13-B8B1-5987406817A0} = {282CEF03-292F-4A49-83C6-997567D0FF5F} @@ -1607,10 +1638,6 @@ Global {58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1} = {282CEF03-292F-4A49-83C6-997567D0FF5F} {EC493B36-9E14-4CAF-973F-FB96FDAF546F} = {A878BDF1-6DB6-4BA5-A724-92885A710856} {1694E75F-ABCE-4573-B805-18ED50F148FD} = {323C198D-A8C6-4EB0-8B79-72624275E35F} - {031237BF-7B2A-4B37-9E37-4D4C575FDD22} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {4CA307AB-A0F8-4AA5-A09D-91F47DA3054A} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {47E089E3-E875-4045-9E58-C1223BE899E9} = {23500169-FC01-4D2B-A997-E7FAE2169FC0} - {9D574E57-75A6-4965-AF23-ACE0BB9CD0B3} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {E1D41A07-F468-4D13-8185-35F127230B17} = {46383371-8252-4598-9350-A97692851408} {6113B579-C995-47F8-9AC1-4CC6EFDDD883} = {68D43DB1-DFC5-4F15-A2B4-6BA18B875F9E} {19639645-A115-4824-865F-5559DA8B892A} = {282CEF03-292F-4A49-83C6-997567D0FF5F} @@ -1621,5 +1648,37 @@ Global {F1A5A73C-2B8C-4959-A128-CC5A8DECCB1B} = {323C198D-A8C6-4EB0-8B79-72624275E35F} {09EF5799-B375-49F1-B78F-0A94D8109F8B} = {AB9C5AA2-DD5D-4A38-97C0-674A995C0AE0} {C7ACF748-DEF4-4646-A791-F1DA437CC965} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {F9AD08D6-8BC8-46B4-9DB0-4C9D3082F723} = {69AF541C-7D45-42CE-BDF4-398EA00ED8A5} + {03566938-B926-4D8D-9974-3DB9AF0DCC40} = {69AF541C-7D45-42CE-BDF4-398EA00ED8A5} + {943EFA0A-E377-4FE8-89E2-A49C4DC04590} = {282CEF03-292F-4A49-83C6-997567D0FF5F} + {5B9BC27A-B2D4-4745-8906-0AC4EAC62469} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {BAB5053F-A224-4C30-8B49-0F3F7C777852} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {48F11819-C031-4AD1-9805-886A40913061} = {69AF541C-7D45-42CE-BDF4-398EA00ED8A5} + {264D03E8-5DA2-49B5-8D2E-A3BF9CCA126B} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {D493239E-05AD-4F61-84F0-BB4F713EAF96} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {4A7A3E47-D1A4-4889-A05E-483D444450AB} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {7AE123CC-44BA-49EC-8410-69AE906EC26F} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {7289C9E0-3899-4FE7-8777-E6F3722B9840} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {FE0CD04C-51D5-4734-9EC7-3A10CF628E03} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {54F37552-2429-45B7-B17A-47AD8A2CADA3} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {88CC87F0-D828-4094-ACD1-6FF2EFBB10B0} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {BA9866FA-0166-4A91-94AC-D7CD0243F7CF} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {27A94CE1-8293-4486-B56A-8E9F167B6D6B} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {4A4CD272-E8E9-4BD0-BA09-01093534EEE3} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {DDEDB340-2C34-4C45-B4F1-CFD2135BD6A6} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {951A2647-BEE0-44D6-B789-3B4A21B1CD63} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {BD567482-CAFB-403B-AFE5-8D9CFC773DDC} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {08051253-1AFB-4966-A572-A60363CD1EF1} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {FB548843-42C7-408C-94E9-107AA0F1B891} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {55C45163-F141-4B2C-8013-39132B8FDCF1} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B} + {60D82034-0160-4283-BBEC-C5AF64FDA585} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {408D1FA2-4C95-47F4-9C01-2CDFFE7BE5A5} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {7DB79D93-AC00-4ECD-854A-E6327C0791CE} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {BB34F6A2-1298-40EF-8216-ADB14B3AEEDD} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {64F69E1F-EDC7-44DA-A178-182C5B3B8DB3} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {C91AB7ED-8BC9-4010-B1B6-5EA6EA5B8291} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {B733F449-AE22-4B00-9F33-816B2F809EF1} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {562DF697-262E-44DB-B6B5-40395E00D87C} = {323C198D-A8C6-4EB0-8B79-72624275E35F} + {7A6C6A10-DC2E-4A16-8758-1115473F3D94} = {323C198D-A8C6-4EB0-8B79-72624275E35F} EndGlobalSection EndGlobal diff --git a/src/administration/Administration.Service/Administration.Service.csproj b/src/administration/Administration.Service/Administration.Service.csproj index b30882330e..793b3a6284 100644 --- a/src/administration/Administration.Service/Administration.Service.csproj +++ b/src/administration/Administration.Service/Administration.Service.csproj @@ -1,85 +1,89 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Administration.Service - Org.Eclipse.TractusX.Portal.Backend.Administration.Service - net7.0 - enable - enable - ad1c79a3-a042-4d59-8924-475f8ff4c37a - Linux - ..\..\.. - True - CS1591 - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - Program.cs - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Administration.Service + Org.Eclipse.TractusX.Portal.Backend.Administration.Service + net7.0 + enable + enable + ad1c79a3-a042-4d59-8924-475f8ff4c37a + Linux + ..\..\.. + True + CS1591 + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + Program.cs + + + + diff --git a/src/administration/Administration.Service/BusinessLogic/IdentityProviderBusinessLogic.cs b/src/administration/Administration.Service/BusinessLogic/IdentityProviderBusinessLogic.cs index f5f6d03592..e9218e7dd0 100644 --- a/src/administration/Administration.Service/BusinessLogic/IdentityProviderBusinessLogic.cs +++ b/src/administration/Administration.Service/BusinessLogic/IdentityProviderBusinessLogic.cs @@ -20,7 +20,7 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.IO; using Org.Eclipse.TractusX.Portal.Backend.Framework.Linq; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Configuration; @@ -81,7 +81,7 @@ public async IAsyncEnumerable GetOwnCompanyIdentityProv { yield return identityProviderData.CategoryId switch { - IdentityProviderCategoryId.KEYCLOAK_OIDC => await GetIdentityProviderDetailsOidc(identityProviderData.IdentityProviderId, identityProviderData.Alias, identityProviderData.CategoryId, identityProviderData.TypeId).ConfigureAwait(false), + IdentityProviderCategoryId.KEYCLOAK_OIDC => await GetIdentityProviderDetailsOidc(identityProviderData.IdentityProviderId, identityProviderData.Alias, identityProviderData.CategoryId, identityProviderData.TypeId, identityProviderData.MetadataUrl).ConfigureAwait(false), IdentityProviderCategoryId.KEYCLOAK_SAML => await GetIdentityProviderDetailsSaml(identityProviderData.IdentityProviderId, identityProviderData.Alias, identityProviderData.TypeId), _ => throw new ControllerArgumentException($"unexpected value for category '{identityProviderData.CategoryId}'") }; @@ -148,7 +148,7 @@ private async ValueTask CreateOwnCompanyIdentityProvide return protocol switch { - IamIdentityProviderProtocol.OIDC => await GetIdentityProviderDetailsOidc(identityProviderId, alias, IdentityProviderCategoryId.KEYCLOAK_OIDC, typeId).ConfigureAwait(false), + IamIdentityProviderProtocol.OIDC => await GetIdentityProviderDetailsOidc(identityProviderId, alias, IdentityProviderCategoryId.KEYCLOAK_OIDC, typeId, null).ConfigureAwait(false), IamIdentityProviderProtocol.SAML => await GetIdentityProviderDetailsSaml(identityProviderId, alias, typeId).ConfigureAwait(false), _ => throw new UnexpectedConditionException($"unexpected value of protocol: '{protocol.ToString()}'") }; @@ -156,20 +156,20 @@ private async ValueTask CreateOwnCompanyIdentityProvide public async ValueTask GetOwnCompanyIdentityProviderAsync(Guid identityProviderId) { - var (alias, category, typeId) = await ValidateGetOwnCompanyIdentityProviderArguments(identityProviderId).ConfigureAwait(false); + var (alias, category, typeId, metadataUrl) = await ValidateGetOwnCompanyIdentityProviderArguments(identityProviderId).ConfigureAwait(false); return category switch { - IdentityProviderCategoryId.KEYCLOAK_OIDC => await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId).ConfigureAwait(false), + IdentityProviderCategoryId.KEYCLOAK_OIDC => await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId, metadataUrl).ConfigureAwait(false), IdentityProviderCategoryId.KEYCLOAK_SAML => await GetIdentityProviderDetailsSaml(identityProviderId, alias, typeId).ConfigureAwait(false), _ => throw new ControllerArgumentException($"unexpected value for category '{category}' of identityProvider '{identityProviderId}'") }; } - private async ValueTask<(string Alias, IdentityProviderCategoryId Category, IdentityProviderTypeId TypeId)> ValidateGetOwnCompanyIdentityProviderArguments(Guid identityProviderId) + private async ValueTask<(string Alias, IdentityProviderCategoryId Category, IdentityProviderTypeId TypeId, string? MetadataUrl)> ValidateGetOwnCompanyIdentityProviderArguments(Guid identityProviderId) { var companyId = _identityData.CompanyId; - var (alias, category, isOwnOrOwnerCompany, typeId) = await _portalRepositories.GetInstance().GetOwnCompanyIdentityProviderAliasUntrackedAsync(identityProviderId, companyId).ConfigureAwait(false); + var (alias, category, isOwnOrOwnerCompany, typeId, metadataUrl) = await _portalRepositories.GetInstance().GetOwnCompanyIdentityProviderAliasUntrackedAsync(identityProviderId, companyId).ConfigureAwait(false); if (!isOwnOrOwnerCompany) { throw new ConflictException($"identityProvider {identityProviderId} is not associated with company {companyId}"); @@ -185,25 +185,25 @@ public async ValueTask GetOwnCompanyIdentityProviderAsy throw new ConflictException("Shared Idps must not use SAML"); } - return new ValueTuple(alias, category, typeId); + return (alias, category, typeId, metadataUrl); } public async ValueTask SetOwnCompanyIdentityProviderStatusAsync(Guid identityProviderId, bool enabled) { - var (category, alias, typeId, companyUsersLinked, ownerCompanyName) = await ValidateSetOwnCompanyIdentityProviderStatusArguments(identityProviderId, enabled).ConfigureAwait(false); + var (category, alias, typeId, companyUsersLinked, ownerCompanyName, metadataUrl) = await ValidateSetOwnCompanyIdentityProviderStatusArguments(identityProviderId, enabled).ConfigureAwait(false); switch (category) { case IdentityProviderCategoryId.KEYCLOAK_OIDC when typeId is IdentityProviderTypeId.SHARED: await _provisioningManager.SetSharedIdentityProviderStatusAsync(alias, enabled).ConfigureAwait(false); - return await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId).ConfigureAwait(false); + return await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId, null).ConfigureAwait(false); case IdentityProviderCategoryId.KEYCLOAK_OIDC: await _provisioningManager.SetCentralIdentityProviderStatusAsync(alias, enabled).ConfigureAwait(false); if (typeId == IdentityProviderTypeId.MANAGED && !enabled && companyUsersLinked) { await SendIdpMail(identityProviderId, alias, ownerCompanyName, _settings.DeactivateIdpRoles).ConfigureAwait(false); } - return await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId).ConfigureAwait(false); + return await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId, metadataUrl).ConfigureAwait(false); case IdentityProviderCategoryId.KEYCLOAK_SAML: await _provisioningManager.SetCentralIdentityProviderStatusAsync(alias, enabled).ConfigureAwait(false); if (typeId == IdentityProviderTypeId.MANAGED && !enabled && companyUsersLinked) @@ -224,15 +224,15 @@ private Task SendIdpMail(Guid identityProviderId, string? alias, string ownerCom new[] { "DeactivateManagedIdp" }, identityProviderId); - private async ValueTask<(IdentityProviderCategoryId Category, string Alias, IdentityProviderTypeId TypeId, bool CompanyUsersLinked, string OwnerCompanyName)> ValidateSetOwnCompanyIdentityProviderStatusArguments(Guid identityProviderId, bool enabled) + private async ValueTask<(IdentityProviderCategoryId Category, string Alias, IdentityProviderTypeId TypeId, bool CompanyUsersLinked, string OwnerCompanyName, string? MetadataUrl)> ValidateSetOwnCompanyIdentityProviderStatusArguments(Guid identityProviderId, bool enabled) { var companyId = _identityData.CompanyId; - var result = await _portalRepositories.GetInstance().GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, companyId, true).ConfigureAwait(false); + var result = await _portalRepositories.GetInstance().GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, companyId, !enabled).ConfigureAwait(false); if (result == default) { throw new NotFoundException($"identityProvider {identityProviderId} does not exist"); } - var (isOwner, alias, identityProviderCategory, identityProviderTypeId, companyIdAliase, companyUsersLinked, ownerCompanyName) = result; + var (isOwner, (alias, identityProviderCategory, identityProviderTypeId, metadataUrl), companyIdAliase, companyUsersLinked, ownerCompanyName) = result; if (!isOwner) { throw new ForbiddenException($"company {companyId} is not the owner of identityProvider {identityProviderId}"); @@ -249,21 +249,21 @@ private Task SendIdpMail(Guid identityProviderId, string? alias, string ownerCom { throw new ControllerArgumentException($"cannot disable indentityProvider {identityProviderId} as no other active identityProvider exists for this company"); } - return new ValueTuple(identityProviderCategory, alias, identityProviderTypeId, companyUsersLinked, ownerCompanyName); + return (identityProviderCategory, alias, identityProviderTypeId, companyUsersLinked, ownerCompanyName, metadataUrl); } public async ValueTask UpdateOwnCompanyIdentityProviderAsync(Guid identityProviderId, IdentityProviderEditableDetails details) { - var (category, alias, typeId) = await ValidateUpdateOwnCompanyIdentityProviderArguments(identityProviderId, details).ConfigureAwait(false); + var (category, alias, typeId, metadataUrl) = await ValidateUpdateOwnCompanyIdentityProviderArguments(identityProviderId, details).ConfigureAwait(false); switch (category) { case IdentityProviderCategoryId.KEYCLOAK_OIDC when typeId is IdentityProviderTypeId.SHARED: await UpdateIdentityProviderShared(alias, details).ConfigureAwait(false); - return await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId).ConfigureAwait(false); + return await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId, null).ConfigureAwait(false); case IdentityProviderCategoryId.KEYCLOAK_OIDC: - await UpdateIdentityProviderOidc(alias, details).ConfigureAwait(false); - return await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId).ConfigureAwait(false); + await UpdateIdentityProviderOidc(alias, metadataUrl, details).ConfigureAwait(false); + return await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId, details.Oidc?.MetadataUrl).ConfigureAwait(false); case IdentityProviderCategoryId.KEYCLOAK_SAML: await UpdateIdentityProviderSaml(alias, details).ConfigureAwait(false); return await GetIdentityProviderDetailsSaml(identityProviderId, alias, typeId).ConfigureAwait(false); @@ -272,80 +272,85 @@ public async ValueTask UpdateOwnCompanyIdentityProvider } } - private async ValueTask<(IdentityProviderCategoryId Category, string Alias, IdentityProviderTypeId TypeId)> ValidateUpdateOwnCompanyIdentityProviderArguments(Guid identityProviderId, IdentityProviderEditableDetails details) + private async ValueTask<(IdentityProviderCategoryId Category, string Alias, IdentityProviderTypeId TypeId, string? MetadataUrl)> ValidateUpdateOwnCompanyIdentityProviderArguments(Guid identityProviderId, IdentityProviderEditableDetails details) { var companyId = _identityData.CompanyId; - ValidateDisplayName(details.displayName); + ValidateDisplayName(details.DisplayName); - var result = await _portalRepositories.GetInstance().GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, companyId, false).ConfigureAwait(false); + var result = await _portalRepositories.GetInstance().GetOwnCompanyIdentityProviderUpdateData(identityProviderId, companyId).ConfigureAwait(false); if (result == default) { throw new NotFoundException($"identityProvider {identityProviderId} does not exist"); } - - if (!result.IsOwner) + var (isOwner, alias, identityProviderCategory, identityProviderTypeId, metadataUrl) = result; + if (!isOwner) { throw new ForbiddenException($"User not allowed to run the change for identity provider {identityProviderId}"); } - if (result.Alias == null) + if (alias == null) { throw new ConflictException($"identityprovider {identityProviderId} does not have an iamIdentityProvider.alias"); } - return new ValueTuple(result.IdentityProviderCategory, result.Alias, result.IdentityProviderTypeId); + return (identityProviderCategory, alias, identityProviderTypeId, metadataUrl); } - private async ValueTask UpdateIdentityProviderOidc(string alias, IdentityProviderEditableDetails details) + private async ValueTask UpdateIdentityProviderOidc(string alias, string? metadataUrl, IdentityProviderEditableDetails details) { - if (details.oidc == null) + if (details.Oidc == null) { - throw new ControllerArgumentException("property 'oidc' must not be null", nameof(details.oidc)); + throw new ControllerArgumentException("property 'oidc' must not be null", nameof(details.Oidc)); } - if (details.saml != null) + if (details.Saml != null) { - throw new ControllerArgumentException("property 'saml' must be null", nameof(details.saml)); + throw new ControllerArgumentException("property 'saml' must be null", nameof(details.Saml)); } await _provisioningManager.UpdateCentralIdentityProviderDataOIDCAsync( new IdentityProviderEditableConfigOidc( alias, - details.displayName, - details.oidc.metadataUrl, - details.oidc.clientAuthMethod, - details.oidc.clientId, - details.oidc.secret, - details.oidc.signatureAlgorithm)) + details.DisplayName, + details.Oidc.MetadataUrl, + details.Oidc.ClientAuthMethod, + details.Oidc.ClientId, + details.Oidc.Secret, + details.Oidc.SignatureAlgorithm)) .ConfigureAwait(false); + _portalRepositories.GetInstance() + .AttachAndModifyIamIdentityProvider( + alias, + iamIdentityProvider => iamIdentityProvider.MetadataUrl = metadataUrl, + iamIdentityProvider => iamIdentityProvider.MetadataUrl = details.Oidc.MetadataUrl); } private async ValueTask UpdateIdentityProviderSaml(string alias, IdentityProviderEditableDetails details) { - if (details.saml == null) + if (details.Saml == null) { - throw new ControllerArgumentException("property 'saml' must not be null", nameof(details.saml)); + throw new ControllerArgumentException("property 'saml' must not be null", nameof(details.Saml)); } - if (details.oidc != null) + if (details.Oidc != null) { - throw new ControllerArgumentException("property 'oidc' must be null", nameof(details.oidc)); + throw new ControllerArgumentException("property 'oidc' must be null", nameof(details.Oidc)); } await _provisioningManager.UpdateCentralIdentityProviderDataSAMLAsync( new IdentityProviderEditableConfigSaml( alias, - details.displayName, - details.saml.serviceProviderEntityId, - details.saml.singleSignOnServiceUrl)) + details.DisplayName, + details.Saml.ServiceProviderEntityId, + details.Saml.SingleSignOnServiceUrl)) .ConfigureAwait(false); } private async ValueTask UpdateIdentityProviderShared(string alias, IdentityProviderEditableDetails details) { - if (details.oidc != null) + if (details.Oidc != null) { - throw new ControllerArgumentException("property 'oidc' must be null", nameof(details.oidc)); + throw new ControllerArgumentException("property 'oidc' must be null", nameof(details.Oidc)); } - if (details.saml != null) + if (details.Saml != null) { - throw new ControllerArgumentException("property 'saml' must be null", nameof(details.saml)); + throw new ControllerArgumentException("property 'saml' must be null", nameof(details.Saml)); } - await _provisioningManager.UpdateSharedIdentityProviderAsync(alias, details.displayName).ConfigureAwait(false); + await _provisioningManager.UpdateSharedIdentityProviderAsync(alias, details.DisplayName).ConfigureAwait(false); } private async ValueTask ValidateOtherActiveIdentityProvider(string? alias, IEnumerable<(Guid CompanyId, IEnumerable Aliase)> companyIdAliase) @@ -411,7 +416,7 @@ private async Task DeleteManagedIdpLinks(Guid identityProviderId, string? alias, c => { c.CompanyStatusId = data.CompanyStatusId; }, c => { c.CompanyStatusId = CompanyStatusId.INACTIVE; }); userRepository.AttachAndModifyIdentities(data.Identities.Select(x => new ValueTuple?, Action>(x.IdentityId, null, identity => { identity.UserStatusId = UserStatusId.INACTIVE; }))); - userRolesRepository.DeleteCompanyUserAssignedRoles(data.Identities.SelectMany(i => i.UserRoleIds.Select(ur => new ValueTuple(i.IdentityId, ur)))); + userRolesRepository.DeleteCompanyUserAssignedRoles(data.Identities.SelectMany(i => i.UserRoleIds.Select(ur => (i.IdentityId, ur)))); await DeleteKeycloakUsers(data.Identities.Select(i => i.IdentityId)); } identityProviderRepository.DeleteCompanyIdentityProvider(data.CompanyId, identityProviderId); @@ -454,13 +459,13 @@ private async Task DeleteKeycloakUsers(IEnumerable identityIds) private async ValueTask<(string? Alias, IdentityProviderTypeId TypeId, string OwnerCompanyName)> ValidateDeleteOwnCompanyIdentityProviderArguments(Guid identityProviderId, IIdentityProviderRepository identityProviderRepository) { var companyId = _identityData.CompanyId; - var result = await identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, companyId, true).ConfigureAwait(false); + var result = await identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(identityProviderId, companyId).ConfigureAwait(false); if (result == default) { throw new NotFoundException($"identityProvider {identityProviderId} does not exist"); } - var (isOwner, alias, _, typeId, aliase, _, ownerCompanyName) = result; + var (isOwner, alias, typeId, aliase, ownerCompanyName) = result; if (!isOwner) { throw new ForbiddenException($"company {companyId} is not the owner of identityProvider {identityProviderId}"); @@ -478,7 +483,7 @@ private async Task DeleteKeycloakUsers(IEnumerable identityIds) if (!await ValidateOtherActiveIdentityProvider( alias, - aliase ?? throw new UnexpectedConditionException("CompanyIdAliase should never be null here")).ConfigureAwait(false)) + aliase).ConfigureAwait(false)) { throw new ControllerArgumentException($"cannot delete indentityProvider {identityProviderId} as no other active identityProvider exists for this company"); } @@ -486,7 +491,7 @@ private async Task DeleteKeycloakUsers(IEnumerable identityIds) return (alias, typeId, ownerCompanyName); } - private async ValueTask GetIdentityProviderDetailsOidc(Guid identityProviderId, string? alias, IdentityProviderCategoryId categoryId, IdentityProviderTypeId typeId) + private async ValueTask GetIdentityProviderDetailsOidc(Guid identityProviderId, string? alias, IdentityProviderCategoryId categoryId, IdentityProviderTypeId typeId, string? metadataUrl) { IdentityProviderConfigOidc? identityProviderDataOidc = null; IEnumerable? identityProviderMapper = null; @@ -502,7 +507,7 @@ private async ValueTask GetIdentityProviderDetailsOidc( } catch (KeycloakEntityNotFoundException ex) { - _logger.LogInformation("Can't receive saml data for {Alias} with following exception {Exception}", alias, ex.Message); + _logger.LogInformation("Can't receive oidc data for {Alias} with following exception {Exception}", alias, ex.Message); aliasExisting = false; } @@ -522,14 +527,18 @@ private async ValueTask GetIdentityProviderDetailsOidc( identityProviderDataOidc?.Enabled, identityProviderMapper) { - oidc = identityProviderDataOidc == null ? + Oidc = identityProviderDataOidc == null ? null : new IdentityProviderDetailsOidc( + metadataUrl, identityProviderDataOidc.AuthorizationUrl, + identityProviderDataOidc.TokenUrl, + identityProviderDataOidc.LogoutUrl, identityProviderDataOidc.ClientId, + !string.IsNullOrEmpty(identityProviderDataOidc.ClientSecret), identityProviderDataOidc.ClientAuthMethod) { - signatureAlgorithm = identityProviderDataOidc.SignatureAlgorithm + SignatureAlgorithm = identityProviderDataOidc.SignatureAlgorithm } }; } @@ -570,7 +579,7 @@ private async ValueTask GetIdentityProviderDetailsSaml( identityProviderDataSaml?.Enabled, identityProviderMapper) { - saml = identityProviderDataSaml == null ? + Saml = identityProviderDataSaml == null ? null : new IdentityProviderDetailsSaml( identityProviderDataSaml.EntityId, @@ -667,7 +676,7 @@ public async ValueTask GetOwnIden { var companyId = _identityData.CompanyId; - var (alias, category, isOwnerCompany, typeId, connectedCompanies) = await _portalRepositories.GetInstance().GetOwnIdentityProviderWithConnectedCompanies(identityProviderId, companyId).ConfigureAwait(false); + var (alias, category, isOwnerCompany, typeId, metadataUrl, connectedCompanies) = await _portalRepositories.GetInstance().GetOwnIdentityProviderWithConnectedCompanies(identityProviderId, companyId).ConfigureAwait(false); if (!isOwnerCompany) { throw new ConflictException($"identityProvider {identityProviderId} is not associated with company {companyId}"); @@ -685,12 +694,12 @@ public async ValueTask GetOwnIden var details = category switch { - IdentityProviderCategoryId.KEYCLOAK_OIDC => await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId).ConfigureAwait(false), + IdentityProviderCategoryId.KEYCLOAK_OIDC => await GetIdentityProviderDetailsOidc(identityProviderId, alias, category, typeId, metadataUrl).ConfigureAwait(false), IdentityProviderCategoryId.KEYCLOAK_SAML => await GetIdentityProviderDetailsSaml(identityProviderId, alias, typeId).ConfigureAwait(false), _ => throw new UnexpectedConditionException($"unexpected value for category '{category}' of identityProvider '{identityProviderId}'") }; - return new(details.identityProviderId, details.alias, details.identityProviderCategoryId, details.IdentityProviderTypeId, details.displayName, details.redirectUrl, details.enabled, connectedCompanies); + return new(details.IdentityProviderId, details.Alias, details.IdentityProviderCategoryId, details.IdentityProviderTypeId, details.DisplayName, details.RedirectUrl, details.Enabled, connectedCompanies); } public async IAsyncEnumerable GetOwnCompanyUsersIdentityProviderDataAsync(IEnumerable identityProviderIds, bool unlinkedUsersOnly) @@ -1135,9 +1144,7 @@ private async IAsyncEnumerable GetOwnCompanyUsersIdentityProviderDataLin { throw new UnexpectedConditionException($"companyUserId {companyUserId} is not linked to keycloak"); } - return new ValueTuple( - iamUserId, - alias); + return (iamUserId, alias); } private sealed record UserProfile(string? FirstName, string? LastName, string? Email); diff --git a/src/administration/Administration.Service/BusinessLogic/UserUploadBusinessLogic.cs b/src/administration/Administration.Service/BusinessLogic/UserUploadBusinessLogic.cs index b4eef9e86a..5d88a3d5ac 100644 --- a/src/administration/Administration.Service/BusinessLogic/UserUploadBusinessLogic.cs +++ b/src/administration/Administration.Service/BusinessLogic/UserUploadBusinessLogic.cs @@ -20,7 +20,7 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.IO; using Org.Eclipse.TractusX.Portal.Backend.Framework.Linq; using Org.Eclipse.TractusX.Portal.Backend.Mailing.SendMail; diff --git a/src/administration/Administration.Service/Controllers/CompanyDataController.cs b/src/administration/Administration.Service/Controllers/CompanyDataController.cs index 96e8ab418e..5bea9c452b 100644 --- a/src/administration/Administration.Service/Controllers/CompanyDataController.cs +++ b/src/administration/Administration.Service/Controllers/CompanyDataController.cs @@ -22,10 +22,11 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; using System.Net; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/ConnectorsController.cs b/src/administration/Administration.Service/Controllers/ConnectorsController.cs index 08141f2eee..4628aaddb8 100644 --- a/src/administration/Administration.Service/Controllers/ConnectorsController.cs +++ b/src/administration/Administration.Service/Controllers/ConnectorsController.cs @@ -22,12 +22,13 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library.Models; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/DocumentsController.cs b/src/administration/Administration.Service/Controllers/DocumentsController.cs index 4cc5c4559b..5d103088ef 100644 --- a/src/administration/Administration.Service/Controllers/DocumentsController.cs +++ b/src/administration/Administration.Service/Controllers/DocumentsController.cs @@ -21,11 +21,11 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/IdentityProviderController.cs b/src/administration/Administration.Service/Controllers/IdentityProviderController.cs index f4e254c41a..8b871ecadc 100644 --- a/src/administration/Administration.Service/Controllers/IdentityProviderController.cs +++ b/src/administration/Administration.Service/Controllers/IdentityProviderController.cs @@ -22,10 +22,10 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; @@ -88,7 +88,7 @@ public ValueTask> GetOwnCompanyIdentityProviderDet public async ValueTask> CreateOwnCompanyIdentityProvider([FromQuery] IamIdentityProviderProtocol protocol, [FromQuery] IdentityProviderTypeId typeId, [FromQuery] string? displayName = null) { var details = await _businessLogic.CreateOwnCompanyIdentityProviderAsync(protocol, typeId, displayName).ConfigureAwait(false); - return (ActionResult)CreatedAtRoute(nameof(GetOwnCompanyIdentityProvider), new { identityProviderId = details.identityProviderId }, details); + return (ActionResult)CreatedAtRoute(nameof(GetOwnCompanyIdentityProvider), new { identityProviderId = details.IdentityProviderId }, details); } /// diff --git a/src/administration/Administration.Service/Controllers/InvitationController.cs b/src/administration/Administration.Service/Controllers/InvitationController.cs index e776a39072..fe5999eddc 100644 --- a/src/administration/Administration.Service/Controllers/InvitationController.cs +++ b/src/administration/Administration.Service/Controllers/InvitationController.cs @@ -22,8 +22,8 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/NetworkController.cs b/src/administration/Administration.Service/Controllers/NetworkController.cs index 927c5596e9..b66b6afbba 100644 --- a/src/administration/Administration.Service/Controllers/NetworkController.cs +++ b/src/administration/Administration.Service/Controllers/NetworkController.cs @@ -21,9 +21,9 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/PartnerNetworkController.cs b/src/administration/Administration.Service/Controllers/PartnerNetworkController.cs index 2b4401abab..c77174edc2 100644 --- a/src/administration/Administration.Service/Controllers/PartnerNetworkController.cs +++ b/src/administration/Administration.Service/Controllers/PartnerNetworkController.cs @@ -21,8 +21,8 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; -using Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/RegistrationController.cs b/src/administration/Administration.Service/Controllers/RegistrationController.cs index c207cbc016..25eb699f7c 100644 --- a/src/administration/Administration.Service/Controllers/RegistrationController.cs +++ b/src/administration/Administration.Service/Controllers/RegistrationController.cs @@ -23,11 +23,12 @@ using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; using Org.Eclipse.TractusX.Portal.Backend.Clearinghouse.Library.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library.Models; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/RegistrationStatusController.cs b/src/administration/Administration.Service/Controllers/RegistrationStatusController.cs index 6cee82cb16..6df5092bcf 100644 --- a/src/administration/Administration.Service/Controllers/RegistrationStatusController.cs +++ b/src/administration/Administration.Service/Controllers/RegistrationStatusController.cs @@ -21,9 +21,9 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/ServiceAccountController.cs b/src/administration/Administration.Service/Controllers/ServiceAccountController.cs index 968ff63355..a99e9aed0e 100644 --- a/src/administration/Administration.Service/Controllers/ServiceAccountController.cs +++ b/src/administration/Administration.Service/Controllers/ServiceAccountController.cs @@ -22,10 +22,11 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Models; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/SubscriptionConfigurationController.cs b/src/administration/Administration.Service/Controllers/SubscriptionConfigurationController.cs index 05c1b90a55..0b98b7ec51 100644 --- a/src/administration/Administration.Service/Controllers/SubscriptionConfigurationController.cs +++ b/src/administration/Administration.Service/Controllers/SubscriptionConfigurationController.cs @@ -21,11 +21,11 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/Controllers/UserController.cs b/src/administration/Administration.Service/Controllers/UserController.cs index 97fd04db41..e2c45c3996 100644 --- a/src/administration/Administration.Service/Controllers/UserController.cs +++ b/src/administration/Administration.Service/Controllers/UserController.cs @@ -21,10 +21,11 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Models; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers; diff --git a/src/administration/Administration.Service/ErrorHandling/AdministrationConnectorErrorMessageContainer.cs b/src/administration/Administration.Service/ErrorHandling/AdministrationConnectorErrorMessageContainer.cs index 35f3b1a1fd..2fb16c97d4 100644 --- a/src/administration/Administration.Service/ErrorHandling/AdministrationConnectorErrorMessageContainer.cs +++ b/src/administration/Administration.Service/ErrorHandling/AdministrationConnectorErrorMessageContainer.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using System.Collections.Immutable; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.ErrorHandling; diff --git a/src/administration/Administration.Service/ErrorHandling/AdministrationRegistrationErrorMessageContainer.cs b/src/administration/Administration.Service/ErrorHandling/AdministrationRegistrationErrorMessageContainer.cs index 04427b0ce2..28c9578624 100644 --- a/src/administration/Administration.Service/ErrorHandling/AdministrationRegistrationErrorMessageContainer.cs +++ b/src/administration/Administration.Service/ErrorHandling/AdministrationRegistrationErrorMessageContainer.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using System.Collections.Immutable; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.ErrorHandling; diff --git a/src/administration/Administration.Service/ErrorHandling/AdministrationServiceAccountErrorMessageContainer.cs b/src/administration/Administration.Service/ErrorHandling/AdministrationServiceAccountErrorMessageContainer.cs index 8be0025145..7f43b1efaf 100644 --- a/src/administration/Administration.Service/ErrorHandling/AdministrationServiceAccountErrorMessageContainer.cs +++ b/src/administration/Administration.Service/ErrorHandling/AdministrationServiceAccountErrorMessageContainer.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using System.Collections.Immutable; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.ErrorHandling; diff --git a/src/administration/Administration.Service/Models/IdentityProviderDetails.cs b/src/administration/Administration.Service/Models/IdentityProviderDetails.cs index 5842f77140..3ef1fe9c23 100644 --- a/src/administration/Administration.Service/Models/IdentityProviderDetails.cs +++ b/src/administration/Administration.Service/Models/IdentityProviderDetails.cs @@ -25,19 +25,19 @@ namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -public record IdentityProviderDetails(Guid identityProviderId, string? alias, IdentityProviderCategoryId identityProviderCategoryId, IdentityProviderTypeId IdentityProviderTypeId, string? displayName, string? redirectUrl, bool? enabled, IEnumerable? mappers) +public record IdentityProviderDetails(Guid IdentityProviderId, string? Alias, IdentityProviderCategoryId IdentityProviderCategoryId, IdentityProviderTypeId IdentityProviderTypeId, string? DisplayName, string? RedirectUrl, bool? Enabled, IEnumerable? Mappers) { [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public IdentityProviderDetailsOidc? oidc { get; init; } = null; + public IdentityProviderDetailsOidc? Oidc { get; init; } = null; [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public IdentityProviderDetailsSaml? saml { get; init; } = null; + public IdentityProviderDetailsSaml? Saml { get; init; } = null; } -public record IdentityProviderDetailsOidc(string authorizationUrl, string clientId, IamIdentityProviderClientAuthMethod clientAuthMethod) +public record IdentityProviderDetailsOidc(string? MetadataUrl, string AuthorizationUrl, string TokenUrl, string? LogoutUrl, string ClientId, bool HasClientSecret, IamIdentityProviderClientAuthMethod ClientAuthMethod) { [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public IamIdentityProviderSignatureAlgorithm? signatureAlgorithm { get; init; } = null; + public IamIdentityProviderSignatureAlgorithm? SignatureAlgorithm { get; init; } = null; } -public record IdentityProviderDetailsSaml(string serviceProviderEntityId, string singleSignOnServiceUrl); +public record IdentityProviderDetailsSaml(string ServiceProviderEntityId, string SingleSignOnServiceUrl); diff --git a/src/administration/Administration.Service/Models/IdentityProviderEditableDetails.cs b/src/administration/Administration.Service/Models/IdentityProviderEditableDetails.cs index 5a219fe0c4..166598f1ad 100644 --- a/src/administration/Administration.Service/Models/IdentityProviderEditableDetails.cs +++ b/src/administration/Administration.Service/Models/IdentityProviderEditableDetails.cs @@ -23,22 +23,22 @@ namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; -public record IdentityProviderEditableDetails(string displayName) +public record IdentityProviderEditableDetails(string DisplayName) { [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public IdentityProviderEditableDetailsOidc? oidc { get; init; } = null; + public IdentityProviderEditableDetailsOidc? Oidc { get; init; } = null; [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public IdentityProviderEditableDetailsSaml? saml { get; init; } = null; + public IdentityProviderEditableDetailsSaml? Saml { get; init; } = null; } -public record IdentityProviderEditableDetailsOidc(string metadataUrl, IamIdentityProviderClientAuthMethod clientAuthMethod, string clientId) +public record IdentityProviderEditableDetailsOidc(string MetadataUrl, IamIdentityProviderClientAuthMethod ClientAuthMethod, string ClientId) { [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public string? secret { get; init; } = null; + public string? Secret { get; init; } = null; [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public IamIdentityProviderSignatureAlgorithm? signatureAlgorithm { get; init; } = null; + public IamIdentityProviderSignatureAlgorithm? SignatureAlgorithm { get; init; } = null; } -public record IdentityProviderEditableDetailsSaml(string serviceProviderEntityId, string singleSignOnServiceUrl); +public record IdentityProviderEditableDetailsSaml(string ServiceProviderEntityId, string SingleSignOnServiceUrl); diff --git a/src/administration/Administration.Service/Program.cs b/src/administration/Administration.Service/Program.cs index 960e1f8465..e09d67b6fb 100644 --- a/src/administration/Administration.Service/Program.cs +++ b/src/administration/Administration.Service/Program.cs @@ -21,8 +21,7 @@ using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Web; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Mailing.SendMail; using Org.Eclipse.TractusX.Portal.Backend.Mailing.Service.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Notifications.Library; @@ -34,12 +33,17 @@ using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.ErrorHandling; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Service; +using Org.Eclipse.TractusX.Portal.Backend.Web.Initialization; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.DependencyInjection; var VERSION = "v2"; -WebApplicationBuildRunner +WebAppHelper .BuildAndRunWebApplication(args, "administration", VERSION, builder => { + builder.Services + .AddPublicInfos(); + builder.Services .AddMailingAndTemplateManager(builder.Configuration) .AddMailingService() diff --git a/src/administration/Administration.Service/appsettings.json b/src/administration/Administration.Service/appsettings.json index 47c6302efe..623710590f 100644 --- a/src/administration/Administration.Service/appsettings.json +++ b/src/administration/Administration.Service/appsettings.json @@ -40,6 +40,13 @@ "ClientSecret": "", "AuthRealm": "", "UseAuthTrail": false + }, + "shareddelete": { + "ConnectionString": "", + "ClientId": "", + "ClientSecret": "", + "AuthRealm": "", + "UseAuthTrail": false } }, "ConnectionStrings": { @@ -388,7 +395,8 @@ "SmtpHost": "", "SmtpPort": 587, "SmtpUser": "", - "SmtpPassword": "" + "SmtpPassword": "", + "SenderEmail": "" } }, "IdentityProviderAdmin": { diff --git a/src/externalsystems/Bpdm.Library/Bpdm.Library.csproj b/src/externalsystems/Bpdm.Library/Bpdm.Library.csproj index fe2d1e2f71..4beffd35fb 100644 --- a/src/externalsystems/Bpdm.Library/Bpdm.Library.csproj +++ b/src/externalsystems/Bpdm.Library/Bpdm.Library.csproj @@ -1,44 +1,41 @@ - - - - - - net7.0 - enable - enable - Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library - Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library - - - - - - - - - - - - - - - - + + + + + + net7.0 + enable + enable + Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library + Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library + + + + + + + + + + + + + diff --git a/src/externalsystems/Bpdm.Library/BpdmService.cs b/src/externalsystems/Bpdm.Library/BpdmService.cs index 55f4d1c9fd..3d89ae91d8 100644 --- a/src/externalsystems/Bpdm.Library/BpdmService.cs +++ b/src/externalsystems/Bpdm.Library/BpdmService.cs @@ -39,7 +39,8 @@ public class BpdmService : IBpdmService Converters = { new JsonStringEnumConverter(allowIntegerValues: false), - } + }, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; public BpdmService(ITokenService tokenService, IOptions options) @@ -66,7 +67,7 @@ public async Task PutInputLegalEntity(BpdmTransferData data, CancellationT x.BpdmIdentifierId, // Type x.Value, // Value null)), // IssuingBody - Enumerable.Empty(), // Status + Enumerable.Empty(), // Status Enumerable.Empty(), // Roles new BpdmLegalEntity( null, @@ -111,17 +112,27 @@ public async Task PutInputLegalEntity(BpdmTransferData data, CancellationT ) }; - await httpClient.PutAsJsonAsync("/companies/test-company/api/catena/input/legal-entities", requestData, Options, cancellationToken) + await httpClient.PutAsJsonAsync("/companies/test-company/api/catena/input/business-partners", requestData, Options, cancellationToken) .CatchingIntoServiceExceptionFor("bpdm-put-legal-entities", HttpAsyncResponseMessageExtension.RecoverOptions.INFRASTRUCTURE).ConfigureAwait(false); return true; } + public async Task SetSharingStateToReady(string externalId, CancellationToken cancellationToken) + { + var httpClient = await _tokenService.GetAuthorizedClient(_settings, cancellationToken).ConfigureAwait(false); + + var content = new { externalIds = Enumerable.Repeat(externalId, 1) }; + await httpClient.PutAsJsonAsync("/companies/test-company/api/catena/sharing-state/ready", content, Options, cancellationToken) + .CatchingIntoServiceExceptionFor("bpdm-put-sharing-state-ready", HttpAsyncResponseMessageExtension.RecoverOptions.INFRASTRUCTURE).ConfigureAwait(false); + return true; + } + public async Task FetchInputLegalEntity(string externalId, CancellationToken cancellationToken) { var httpClient = await _tokenService.GetAuthorizedClient(_settings, cancellationToken).ConfigureAwait(false); var data = Enumerable.Repeat(externalId, 1); - var result = await httpClient.PostAsJsonAsync("/companies/test-company/api/catena/output/legal-entities/search", data, Options, cancellationToken) + var result = await httpClient.PostAsJsonAsync("/companies/test-company/api/catena/output/business-partners/search", data, Options, cancellationToken) .CatchingIntoServiceExceptionFor("bpdm-search-legal-entities", HttpAsyncResponseMessageExtension.RecoverOptions.INFRASTRUCTURE).ConfigureAwait(false); try { @@ -145,7 +156,7 @@ public async Task GetSharingState(Guid applicationId, Cancella { var httpClient = await _tokenService.GetAuthorizedClient(_settings, cancellationToken).ConfigureAwait(false); - var url = $"/companies/test-company/api/catena/sharing-state?externalIds={applicationId}&businessPartnerType={BpdmSharingStateBusinessPartnerType.LEGAL_ENTITY}"; + var url = $"/companies/test-company/api/catena/sharing-state?externalIds={applicationId}"; var result = await httpClient.GetAsync(url, cancellationToken) .CatchingIntoServiceExceptionFor("bpdm-sharing-state", HttpAsyncResponseMessageExtension.RecoverOptions.INFRASTRUCTURE).ConfigureAwait(false); try diff --git a/src/externalsystems/Bpdm.Library/BpdmServiceSettings.cs b/src/externalsystems/Bpdm.Library/BpdmServiceSettings.cs index 8bd3c28041..c053efb77c 100644 --- a/src/externalsystems/Bpdm.Library/BpdmServiceSettings.cs +++ b/src/externalsystems/Bpdm.Library/BpdmServiceSettings.cs @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using System.ComponentModel.DataAnnotations; namespace Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library; diff --git a/src/externalsystems/Bpdm.Library/BusinessLogic/BpdmBusinessLogic.cs b/src/externalsystems/Bpdm.Library/BusinessLogic/BpdmBusinessLogic.cs index e0ce7487c1..a0759a69ea 100644 --- a/src/externalsystems/Bpdm.Library/BusinessLogic/BpdmBusinessLogic.cs +++ b/src/externalsystems/Bpdm.Library/BusinessLogic/BpdmBusinessLogic.cs @@ -87,6 +87,7 @@ public BpdmBusinessLogic(IPortalRepositories portalRepositories, IBpdmService bp data.Identifiers); await _bpdmService.PutInputLegalEntity(bpdmTransferData, cancellationToken).ConfigureAwait(false); + await _bpdmService.SetSharingStateToReady(context.ApplicationId.ToString(), cancellationToken).ConfigureAwait(false); return new IApplicationChecklistService.WorkerChecklistProcessStepExecutionResult( ProcessStepStatusId.DONE, @@ -132,7 +133,7 @@ await HandlePullLegalEntityInternal(context, result.CompanyId, result.BpdmData, var legalEntity = await _bpdmService.FetchInputLegalEntity(context.ApplicationId.ToString(), cancellationToken) .ConfigureAwait(false); - if (string.IsNullOrEmpty(legalEntity.Bpn)) + if (string.IsNullOrEmpty(legalEntity.LegalEntity?.Bpnl)) { return new IApplicationChecklistService.WorkerChecklistProcessStepExecutionResult(ProcessStepStatusId.TODO, null, null, null, false, null); } @@ -148,7 +149,7 @@ await HandlePullLegalEntityInternal(context, result.CompanyId, result.BpdmData, }, company => { - company.BusinessPartnerNumber = legalEntity.Bpn; + company.BusinessPartnerNumber = legalEntity.LegalEntity?.Bpnl; }); var registrationValidationFailed = context.Checklist[ApplicationChecklistEntryTypeId.REGISTRATION_VERIFICATION] == ApplicationChecklistEntryStatusId.FAILED; diff --git a/src/externalsystems/Bpdm.Library/DependencyInjection/BpdmServiceCollectionExtension.cs b/src/externalsystems/Bpdm.Library/DependencyInjection/BpdmServiceCollectionExtension.cs index c364267d40..ff58dbd844 100644 --- a/src/externalsystems/Bpdm.Library/DependencyInjection/BpdmServiceCollectionExtension.cs +++ b/src/externalsystems/Bpdm.Library/DependencyInjection/BpdmServiceCollectionExtension.cs @@ -23,7 +23,6 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; namespace Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library.DependencyInjection; @@ -39,7 +38,7 @@ public static IServiceCollection AddBpdmService(this IServiceCollection services var sp = services.BuildServiceProvider(); var settings = sp.GetRequiredService>(); services - .AddCustomHttpClientWithAuthentication(settings.Value.BaseAddress, settings.Value.KeycloakTokenAddress) + .AddCustomHttpClientWithAuthentication(settings.Value.BaseAddress) .AddTransient() .AddTransient(); diff --git a/src/externalsystems/Bpdm.Library/DependencyInjection/BpnAccessCollectionExtension.cs b/src/externalsystems/Bpdm.Library/DependencyInjection/BpnAccessCollectionExtension.cs index b474de05db..db168ef8ea 100644 --- a/src/externalsystems/Bpdm.Library/DependencyInjection/BpnAccessCollectionExtension.cs +++ b/src/externalsystems/Bpdm.Library/DependencyInjection/BpnAccessCollectionExtension.cs @@ -19,7 +19,7 @@ ********************************************************************************/ using Microsoft.Extensions.DependencyInjection; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; +using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; namespace Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library.DependencyInjection; diff --git a/src/externalsystems/Bpdm.Library/IBpdmService.cs b/src/externalsystems/Bpdm.Library/IBpdmService.cs index b79ae9028a..7515504354 100644 --- a/src/externalsystems/Bpdm.Library/IBpdmService.cs +++ b/src/externalsystems/Bpdm.Library/IBpdmService.cs @@ -34,6 +34,14 @@ public interface IBpdmService /// Cancellation Token /// Returns true if the service call was successful, otherwise false Task PutInputLegalEntity(BpdmTransferData data, CancellationToken cancellationToken); + + /// + /// Sets the sharing state for the external id to ready + /// + /// The external id + /// Cancellation Token + /// bool if successful + Task SetSharingStateToReady(string externalId, CancellationToken cancellationToken); Task FetchInputLegalEntity(string externalId, CancellationToken cancellationToken); Task GetSharingState(Guid applicationId, CancellationToken cancellationToken); } diff --git a/src/externalsystems/Bpdm.Library/Models/BpdmLegalEntityOutputData.cs b/src/externalsystems/Bpdm.Library/Models/BpdmLegalEntityOutputData.cs index d31185d26e..4084ca9aa2 100644 --- a/src/externalsystems/Bpdm.Library/Models/BpdmLegalEntityOutputData.cs +++ b/src/externalsystems/Bpdm.Library/Models/BpdmLegalEntityOutputData.cs @@ -29,28 +29,30 @@ public record PageOutputResponseBpdmLegalEntityData( public record BpdmLegalEntityOutputData( [property: JsonPropertyName("externalId")] string? ExternalId, - [property: JsonPropertyName("bpnl")] string? Bpn, - [property: JsonPropertyName("legalShortName")] string? LegalShortName, - [property: JsonPropertyName("legalForm")] string? LegalForm, + [property: JsonPropertyName("nameParts")] IEnumerable NameParts, [property: JsonPropertyName("identifiers")] IEnumerable Identifiers, [property: JsonPropertyName("states")] IEnumerable States, - [property: JsonPropertyName("classifications")] IEnumerable Classifications, - [property: JsonPropertyName("legalNameParts")] IEnumerable LegalNameParts, [property: JsonPropertyName("roles")] IEnumerable Roles, - [property: JsonPropertyName("legalAddress")] BpdmLegalAddressResponse LegalAddress + [property: JsonPropertyName("isOwnCompanyData")] bool IsOwnCompanyData, + [property: JsonPropertyName("legalEntity")] BpdmLegelEntityData? LegalEntity, + [property: JsonPropertyName("site")] BpdmSite? Site, + [property: JsonPropertyName("address")] BpdmLegalAddressResponse Address +); + +public record BpdmLegelEntityData( + [property: JsonPropertyName("legalEntityBpn")] string? Bpnl, + [property: JsonPropertyName("legalName")] string? LegalName, + [property: JsonPropertyName("shortName")] string? ShortName, + [property: JsonPropertyName("legalForm")] string? LegalForm, + [property: JsonPropertyName("classifications")] IEnumerable Classifications ); public record BpdmLegalAddressResponse( - [property: JsonPropertyName("externalId")] string ExternalId, - [property: JsonPropertyName("legalEntityExternalId")] string LegalEntityExternalId, - [property: JsonPropertyName("siteExternalId")] string SiteExternalId, - [property: JsonPropertyName("bpna")] string Bpn, - [property: JsonPropertyName("nameParts")] IEnumerable NameParts, - [property: JsonPropertyName("states")] IEnumerable States, - [property: JsonPropertyName("identifiers")] IEnumerable Identifiers, + [property: JsonPropertyName("addressBpn")] string? Bpna, + [property: JsonPropertyName("name")] string? Name, + [property: JsonPropertyName("addressType")] string? AddressType, [property: JsonPropertyName("physicalPostalAddress")] BpdmAddressPhysicalPostalAddress? PhysicalPostalAddress, - [property: JsonPropertyName("alternativePostalAddress")] BpdmAddressAlternativePostalAddress? AlternativePostalAddress, - [property: JsonPropertyName("roles")] IEnumerable Roles + [property: JsonPropertyName("alternativePostalAddress")] BpdmAddressAlternativePostalAddress? AlternativePostalAddress ); public record BpdmStatus( diff --git a/src/externalsystems/Clearinghouse.Library/Clearinghouse.Library.csproj b/src/externalsystems/Clearinghouse.Library/Clearinghouse.Library.csproj index f2e57ab883..62fc338e42 100644 --- a/src/externalsystems/Clearinghouse.Library/Clearinghouse.Library.csproj +++ b/src/externalsystems/Clearinghouse.Library/Clearinghouse.Library.csproj @@ -29,15 +29,9 @@ - - - - - - diff --git a/src/externalsystems/Clearinghouse.Library/ClearinghouseServiceCollectionExtension.cs b/src/externalsystems/Clearinghouse.Library/ClearinghouseServiceCollectionExtension.cs index e78ed2b1d3..ce3b7e91d9 100644 --- a/src/externalsystems/Clearinghouse.Library/ClearinghouseServiceCollectionExtension.cs +++ b/src/externalsystems/Clearinghouse.Library/ClearinghouseServiceCollectionExtension.cs @@ -23,7 +23,6 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Clearinghouse.Library.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; namespace Org.Eclipse.TractusX.Portal.Backend.Clearinghouse.Library; @@ -39,7 +38,7 @@ public static IServiceCollection AddClearinghouseService(this IServiceCollection var sp = services.BuildServiceProvider(); var settings = sp.GetRequiredService>(); services - .AddCustomHttpClientWithAuthentication(settings.Value.BaseAddress, settings.Value.KeycloakTokenAddress) + .AddCustomHttpClientWithAuthentication(settings.Value.BaseAddress) .AddTransient() .AddTransient(); diff --git a/src/externalsystems/Clearinghouse.Library/ClearinghouseSettings.cs b/src/externalsystems/Clearinghouse.Library/ClearinghouseSettings.cs index 534b88f71b..5eb8ad27e7 100644 --- a/src/externalsystems/Clearinghouse.Library/ClearinghouseSettings.cs +++ b/src/externalsystems/Clearinghouse.Library/ClearinghouseSettings.cs @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using System.ComponentModel.DataAnnotations; namespace Org.Eclipse.TractusX.Portal.Backend.Clearinghouse.Library; diff --git a/src/externalsystems/Custodian.Library/Custodian.Library.csproj b/src/externalsystems/Custodian.Library/Custodian.Library.csproj index 8e1622fcb7..fe974f470d 100644 --- a/src/externalsystems/Custodian.Library/Custodian.Library.csproj +++ b/src/externalsystems/Custodian.Library/Custodian.Library.csproj @@ -1,44 +1,41 @@ - - - - - - net7.0 - enable - enable - Org.Eclipse.TractusX.Portal.Backend.Custodian.Library - Org.Eclipse.TractusX.Portal.Backend.Custodian.Library - - - - - - - - - - - - - - - - - + + + + + + net7.0 + enable + enable + Org.Eclipse.TractusX.Portal.Backend.Custodian.Library + Org.Eclipse.TractusX.Portal.Backend.Custodian.Library + + + + + + + + + + + + + + diff --git a/src/externalsystems/Custodian.Library/CustodianServiceCollectionExtension.cs b/src/externalsystems/Custodian.Library/CustodianServiceCollectionExtension.cs index 1e443809c3..b163ad2275 100644 --- a/src/externalsystems/Custodian.Library/CustodianServiceCollectionExtension.cs +++ b/src/externalsystems/Custodian.Library/CustodianServiceCollectionExtension.cs @@ -23,7 +23,6 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Custodian.Library.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; namespace Org.Eclipse.TractusX.Portal.Backend.Custodian.Library; @@ -38,7 +37,7 @@ public static IServiceCollection AddCustodianService(this IServiceCollection ser var sp = services.BuildServiceProvider(); var settings = sp.GetRequiredService>(); - services.AddCustomHttpClientWithAuthentication(settings.Value.BaseAddress, settings.Value.KeycloakTokenAddress); + services.AddCustomHttpClientWithAuthentication(settings.Value.BaseAddress); services .AddTransient() .AddTransient(); diff --git a/src/externalsystems/Custodian.Library/CustodianSettings.cs b/src/externalsystems/Custodian.Library/CustodianSettings.cs index a82b78d1dd..1236745539 100644 --- a/src/externalsystems/Custodian.Library/CustodianSettings.cs +++ b/src/externalsystems/Custodian.Library/CustodianSettings.cs @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using System.ComponentModel.DataAnnotations; namespace Org.Eclipse.TractusX.Portal.Backend.Custodian.Library diff --git a/src/externalsystems/OfferProvider.Library/DependencyInjection/OfferProviderServiceCollectionExtension.cs b/src/externalsystems/OfferProvider.Library/DependencyInjection/OfferProviderServiceCollectionExtension.cs index 8ba57f2fdc..6decb56609 100644 --- a/src/externalsystems/OfferProvider.Library/DependencyInjection/OfferProviderServiceCollectionExtension.cs +++ b/src/externalsystems/OfferProvider.Library/DependencyInjection/OfferProviderServiceCollectionExtension.cs @@ -20,9 +20,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Validation; using Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library.BusinessLogic; @@ -39,10 +37,8 @@ public static IServiceCollection AddOfferProviderService(this IServiceCollection .ValidateOnStart(); services.AddTransient>(); - var sp = services.BuildServiceProvider(); - var settings = sp.GetRequiredService>(); return services - .AddCustomHttpClientWithAuthentication(null, settings.Value.KeycloakTokenAddress) + .AddCustomHttpClientWithAuthentication(null) .AddTransient() .AddTransient(); } diff --git a/src/externalsystems/OfferProvider.Library/DependencyInjection/OfferProviderSettings.cs b/src/externalsystems/OfferProvider.Library/DependencyInjection/OfferProviderSettings.cs index 4c18bea064..1f83471a41 100644 --- a/src/externalsystems/OfferProvider.Library/DependencyInjection/OfferProviderSettings.cs +++ b/src/externalsystems/OfferProvider.Library/DependencyInjection/OfferProviderSettings.cs @@ -18,9 +18,9 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Configuration; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Validation; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using System.ComponentModel.DataAnnotations; namespace Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library.DependencyInjection; diff --git a/src/externalsystems/OfferProvider.Library/OfferProvider.Library.csproj b/src/externalsystems/OfferProvider.Library/OfferProvider.Library.csproj index 28a88517b4..2c5cb0546c 100644 --- a/src/externalsystems/OfferProvider.Library/OfferProvider.Library.csproj +++ b/src/externalsystems/OfferProvider.Library/OfferProvider.Library.csproj @@ -1,39 +1,36 @@ - - - - - - net7.0 - enable - enable - Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library - Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library - - - - - - - - - - - + + + + + + net7.0 + enable + enable + Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library + Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library + + + + + + + + diff --git a/src/externalsystems/OnboardingServiceProvider.Library/DependencyInjection/OnboardingServiceProviderServiceCollectionExtension.cs b/src/externalsystems/OnboardingServiceProvider.Library/DependencyInjection/OnboardingServiceProviderServiceCollectionExtension.cs index 5830b8f832..f388a087f5 100644 --- a/src/externalsystems/OnboardingServiceProvider.Library/DependencyInjection/OnboardingServiceProviderServiceCollectionExtension.cs +++ b/src/externalsystems/OnboardingServiceProvider.Library/DependencyInjection/OnboardingServiceProviderServiceCollectionExtension.cs @@ -21,7 +21,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Validation; namespace Org.Eclipse.TractusX.Portal.Backend.OnboardingServiceProvider.Library.DependencyInjection; @@ -38,7 +37,7 @@ public static IServiceCollection AddOnboardingServiceProviderService(this IServi services.AddTransient>(); _ = services.BuildServiceProvider(); return services - .AddCustomHttpClientWithAuthentication(null, null) + .AddCustomHttpClientWithAuthentication(null) .AddTransient() .AddTransient(); } diff --git a/src/externalsystems/OnboardingServiceProvider.Library/OnboardingServiceProvider.Library.csproj b/src/externalsystems/OnboardingServiceProvider.Library/OnboardingServiceProvider.Library.csproj index 5209f070a8..3ca431dc14 100644 --- a/src/externalsystems/OnboardingServiceProvider.Library/OnboardingServiceProvider.Library.csproj +++ b/src/externalsystems/OnboardingServiceProvider.Library/OnboardingServiceProvider.Library.csproj @@ -1,38 +1,35 @@ - - - - - - net7.0 - enable - enable - Org.Eclipse.TractusX.Portal.Backend.OnboardingServiceProvider.Library - Org.Eclipse.TractusX.Portal.Backend.OnboardingServiceProvider.Library - - - - - - - - - - + + + + + + net7.0 + enable + enable + Org.Eclipse.TractusX.Portal.Backend.OnboardingServiceProvider.Library + Org.Eclipse.TractusX.Portal.Backend.OnboardingServiceProvider.Library + + + + + + + diff --git a/src/externalsystems/OnboardingServiceProvider.Library/OnboardingServiceProviderService.cs b/src/externalsystems/OnboardingServiceProvider.Library/OnboardingServiceProviderService.cs index 831b90a825..cb2735ffe6 100644 --- a/src/externalsystems/OnboardingServiceProvider.Library/OnboardingServiceProviderService.cs +++ b/src/externalsystems/OnboardingServiceProvider.Library/OnboardingServiceProviderService.cs @@ -19,7 +19,6 @@ ********************************************************************************/ using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using Org.Eclipse.TractusX.Portal.Backend.OnboardingServiceProvider.Library.Models; using System.Net.Http.Json; @@ -43,7 +42,7 @@ public async Task TriggerProviderCallback(OspTriggerDetails ospDetails, On { var settings = new KeyVaultAuthSettings { - KeycloakTokenAddress = ospDetails.AuthUrl, + TokenAddress = ospDetails.AuthUrl, ClientId = ospDetails.ClientId, ClientSecret = ospDetails.ClientSecret }; diff --git a/src/externalsystems/SdFactory.Library/SdFactory.Library.csproj b/src/externalsystems/SdFactory.Library/SdFactory.Library.csproj index cb58ba2de3..39fb103b81 100644 --- a/src/externalsystems/SdFactory.Library/SdFactory.Library.csproj +++ b/src/externalsystems/SdFactory.Library/SdFactory.Library.csproj @@ -1,43 +1,37 @@ - - - - - - net7.0 - enable - enable - Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library - Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library - - - - - - - - - - - - - - - + + + + + + net7.0 + enable + enable + Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library + Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library + + + + + + + + + diff --git a/src/externalsystems/SdFactory.Library/SdFactorySettings.cs b/src/externalsystems/SdFactory.Library/SdFactorySettings.cs index 1dd69f9272..d6919bb7fa 100644 --- a/src/externalsystems/SdFactory.Library/SdFactorySettings.cs +++ b/src/externalsystems/SdFactory.Library/SdFactorySettings.cs @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using System.ComponentModel.DataAnnotations; namespace Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library; diff --git a/src/externalsystems/SdFactory.Library/SdServiceCollectionExtension.cs b/src/externalsystems/SdFactory.Library/SdServiceCollectionExtension.cs index d76e43802d..5c493b6ad3 100644 --- a/src/externalsystems/SdFactory.Library/SdServiceCollectionExtension.cs +++ b/src/externalsystems/SdFactory.Library/SdServiceCollectionExtension.cs @@ -22,7 +22,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; using Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library.BusinessLogic; namespace Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library; @@ -39,7 +38,7 @@ public static IServiceCollection AddSdFactoryService(this IServiceCollection ser var sp = services.BuildServiceProvider(); var settings = sp.GetRequiredService>(); services - .AddCustomHttpClientWithAuthentication(settings.Value.SdFactoryUrl, settings.Value.KeycloakTokenAddress) + .AddCustomHttpClientWithAuthentication(settings.Value.SdFactoryUrl) .AddTransient() .AddTransient(); diff --git a/src/framework/Framework.BaseDependencies/Framework.BaseDependencies.csproj b/src/framework/Framework.Async/Directory.Build.props similarity index 60% rename from src/framework/Framework.BaseDependencies/Framework.BaseDependencies.csproj rename to src/framework/Framework.Async/Directory.Build.props index f163b9abe8..3f35c3e9a7 100644 --- a/src/framework/Framework.BaseDependencies/Framework.BaseDependencies.csproj +++ b/src/framework/Framework.Async/Directory.Build.props @@ -1,6 +1,5 @@ - - + - Org.Eclipse.TractusX.Portal.Backend.Framework.BaseDependencies - net7.0 - enable - enable + 1.0.0 + - - - - - diff --git a/src/framework/Framework.Async/Framework.Async.csproj b/src/framework/Framework.Async/Framework.Async.csproj index 4c0bfdd935..06c99ecad2 100644 --- a/src/framework/Framework.Async/Framework.Async.csproj +++ b/src/framework/Framework.Async/Framework.Async.csproj @@ -1,28 +1,60 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.Async - net7.0 - enable - enable - - + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Async + Org.Eclipse.TractusX.Portal.Backend.Framework.Async + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Async + Org.Eclipse.TractusX.Portal.Backend.Framework.Async + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + + true + + + true + + + + + + + + + + diff --git a/src/framework/Framework.Async/README.md b/src/framework/Framework.Async/README.md new file mode 100644 index 0000000000..268f9cc4d3 --- /dev/null +++ b/src/framework/Framework.Async/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework Async + +The Catena-X Portal Backend Framework Async library provides a set of useful tools for asynchronous handling. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Async + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.Cors/Directory.Build.props b/src/framework/Framework.Cors/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.Cors/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.Cors/Framework.Cors.csproj b/src/framework/Framework.Cors/Framework.Cors.csproj index 90ac3ad69e..fb717897e9 100644 --- a/src/framework/Framework.Cors/Framework.Cors.csproj +++ b/src/framework/Framework.Cors/Framework.Cors.csproj @@ -1,37 +1,71 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.Cors - Org.Eclipse.TractusX.Portal.Backend.Framework.Cors - net7.0 - enable - enable - - - - - - - - - - + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Cors + Org.Eclipse.TractusX.Portal.Backend.Framework.Cors + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Cors + Org.Eclipse.TractusX.Portal.Backend.Framework.Cors + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.Cors/README.md b/src/framework/Framework.Cors/README.md new file mode 100644 index 0000000000..1f64d0abcb --- /dev/null +++ b/src/framework/Framework.Cors/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework Cors + +The Catena-X Portal Backend Framework Cors library provides some extensions to setup Cors. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Cors + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.DBAccess/Directory.Build.props b/src/framework/Framework.DBAccess/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.DBAccess/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.DBAccess/Framework.DBAccess.csproj b/src/framework/Framework.DBAccess/Framework.DBAccess.csproj index 7f3b022694..c30e1a39d0 100644 --- a/src/framework/Framework.DBAccess/Framework.DBAccess.csproj +++ b/src/framework/Framework.DBAccess/Framework.DBAccess.csproj @@ -1,31 +1,66 @@ - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess - Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess - net7.0 - enable - enable - - - - - + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess + Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess + Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + diff --git a/src/framework/Framework.DBAccess/README.md b/src/framework/Framework.DBAccess/README.md new file mode 100644 index 0000000000..fca7ba2b75 --- /dev/null +++ b/src/framework/Framework.DBAccess/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework DBAccess + +The Catena-X Portal Backend Framework DBAccess library provides a useful set of extensions for database interactions. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.DateTimeProvider/Directory.Build.props b/src/framework/Framework.DateTimeProvider/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.DateTimeProvider/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.DateTimeProvider/Framework.DateTimeProvider.csproj b/src/framework/Framework.DateTimeProvider/Framework.DateTimeProvider.csproj index a672a18ab6..6b511db7f3 100644 --- a/src/framework/Framework.DateTimeProvider/Framework.DateTimeProvider.csproj +++ b/src/framework/Framework.DateTimeProvider/Framework.DateTimeProvider.csproj @@ -1,32 +1,67 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider - Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider - net7.0 - enable - enable - - - - - + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider + Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider + Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + diff --git a/src/framework/Framework.DateTimeProvider/README.md b/src/framework/Framework.DateTimeProvider/README.md new file mode 100644 index 0000000000..a3407be4a7 --- /dev/null +++ b/src/framework/Framework.DateTimeProvider/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework DateTimeProvider + +The Catena-X Portal Backend Framework DateTimeProvider library provides a DateTimeProvider for your .NET application. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.DependencyInjection/Directory.Build.props b/src/framework/Framework.DependencyInjection/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.DependencyInjection/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.DependencyInjection/Framework.DependencyInjection.csproj b/src/framework/Framework.DependencyInjection/Framework.DependencyInjection.csproj new file mode 100644 index 0000000000..4c76a8d02e --- /dev/null +++ b/src/framework/Framework.DependencyInjection/Framework.DependencyInjection.csproj @@ -0,0 +1,69 @@ + + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection + Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection + Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.DependencyInjection/IScoped.cs b/src/framework/Framework.DependencyInjection/IScoped.cs new file mode 100644 index 0000000000..3305a2ccaf --- /dev/null +++ b/src/framework/Framework.DependencyInjection/IScoped.cs @@ -0,0 +1,27 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection; + +/// +/// This is just a marker interface to auto register interfaces +/// +public interface IScoped +{ +} diff --git a/src/framework/Framework.DependencyInjection/ISingleton.cs b/src/framework/Framework.DependencyInjection/ISingleton.cs new file mode 100644 index 0000000000..3dce23f8d8 --- /dev/null +++ b/src/framework/Framework.DependencyInjection/ISingleton.cs @@ -0,0 +1,27 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection; + +/// +/// This is just a marker interface to auto register interfaces +/// +public interface ISingleton +{ +} diff --git a/src/framework/Framework.DependencyInjection/ITransient.cs b/src/framework/Framework.DependencyInjection/ITransient.cs new file mode 100644 index 0000000000..7e8ac0b04e --- /dev/null +++ b/src/framework/Framework.DependencyInjection/ITransient.cs @@ -0,0 +1,27 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection; + +/// +/// This is just a marker interface to auto register interfaces +/// +public interface ITransient +{ +} diff --git a/src/framework/Framework.DependencyInjection/README.md b/src/framework/Framework.DependencyInjection/README.md new file mode 100644 index 0000000000..f7e2a69daf --- /dev/null +++ b/src/framework/Framework.DependencyInjection/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework DependencyInjection + +The Catena-X Portal Backend Framework DependencyInjection library provides a useful set of extensions to easily setup automatic dependency injection. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.DependencyInjection/RegistrationHelper.cs b/src/framework/Framework.DependencyInjection/RegistrationHelper.cs new file mode 100644 index 0000000000..e84f709957 --- /dev/null +++ b/src/framework/Framework.DependencyInjection/RegistrationHelper.cs @@ -0,0 +1,78 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Microsoft.Extensions.DependencyInjection; + +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection; + +public static class RegistrationHelper +{ + public static IServiceCollection AutoRegister(this IServiceCollection services) => + services.AutoRegister(typeof(ITransient), ServiceLifetime.Transient) + .AutoRegister(typeof(IScoped), ServiceLifetime.Scoped) + .AutoRegister(typeof(ISingleton), ServiceLifetime.Singleton); + + private static IServiceCollection AutoRegister(this IServiceCollection services, Type interfaceType, ServiceLifetime lifetime) + { + var interfaces = AppDomain.CurrentDomain.GetAssemblies() + .SelectMany(s => s.GetTypes()) + .Where(t => t.IsInterface && t != interfaceType && interfaceType.IsAssignableFrom(t)) + .Distinct(); + foreach (var type in interfaces) + { + services.AddRegistration(type, lifetime); + } + + return services; + } + + public static IServiceCollection AddRegistration(this IServiceCollection services, Type interfaceType, ServiceLifetime lifetime) + { + var interfaceTypes = AppDomain.CurrentDomain.GetAssemblies() + .SelectMany(s => s.GetTypes()) + .Where(t => interfaceType.IsAssignableFrom(t) && t is { IsClass: true, IsAbstract: false }) + .Select(t => new + { + Service = t.GetInterfaces().FirstOrDefault(), + Implementation = t + }) + .Where(t => t.Service is not null && interfaceType.IsAssignableFrom(t.Service)) + .Select(t => new + { + Service = t.Service!, + t.Implementation + }); + + foreach (var type in interfaceTypes) + { + services.AddService(type.Service, type.Implementation, lifetime); + } + + return services; + } + + private static IServiceCollection AddService(this IServiceCollection services, Type serviceType, Type implementationType, ServiceLifetime lifetime) => + lifetime switch + { + ServiceLifetime.Transient => services.AddTransient(serviceType, implementationType), + ServiceLifetime.Scoped => services.AddScoped(serviceType, implementationType), + ServiceLifetime.Singleton => services.AddSingleton(serviceType, implementationType), + _ => throw new ArgumentException("Invalid lifeTime", nameof(lifetime)) + }; +} diff --git a/src/framework/Framework.ErrorHandling.Web/Directory.Build.props b/src/framework/Framework.ErrorHandling.Web/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.ErrorHandling.Web/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.ErrorHandling.Web/Framework.ErrorHandling.Web.csproj b/src/framework/Framework.ErrorHandling.Web/Framework.ErrorHandling.Web.csproj index 1461c070fe..9696d70cda 100644 --- a/src/framework/Framework.ErrorHandling.Web/Framework.ErrorHandling.Web.csproj +++ b/src/framework/Framework.ErrorHandling.Web/Framework.ErrorHandling.Web.csproj @@ -1,43 +1,78 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web - Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web - net7.0 - enable - enable - - - - - - - - - - - - - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web + Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web + Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.ErrorHandling.Web/GeneralHttpErrorHandler.cs b/src/framework/Framework.ErrorHandling.Web/GeneralHttpErrorHandler.cs index 43bdc2fbce..e4bb639686 100644 --- a/src/framework/Framework.ErrorHandling.Web/GeneralHttpErrorHandler.cs +++ b/src/framework/Framework.ErrorHandling.Web/GeneralHttpErrorHandler.cs @@ -19,7 +19,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Serilog.Context; using System.Collections.Immutable; using System.Net; @@ -85,6 +85,7 @@ private static (HttpStatusCode StatusCode, Func (argumentException.ParamName, Enumerable.Repeat(argumentException.Message, 1)); } + else if (error is ControllerArgumentException caException) { statusCode = HttpStatusCode.BadRequest; diff --git a/src/framework/Framework.ErrorHandling.Web/README.md b/src/framework/Framework.ErrorHandling.Web/README.md new file mode 100644 index 0000000000..05e8dab9e0 --- /dev/null +++ b/src/framework/Framework.ErrorHandling.Web/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework ErrorHandling Web + +The Catena-X Portal Backend Framework ErrorHandling Web library provides a general error handler for your asp net core application. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.ErrorHandling.Library/ConfigurationException.cs b/src/framework/Framework.ErrorHandling/ConfigurationException.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/ConfigurationException.cs rename to src/framework/Framework.ErrorHandling/ConfigurationException.cs diff --git a/src/framework/Framework.ErrorHandling.Library/ConfigurationValidation.cs b/src/framework/Framework.ErrorHandling/ConfigurationValidation.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/ConfigurationValidation.cs rename to src/framework/Framework.ErrorHandling/ConfigurationValidation.cs diff --git a/src/framework/Framework.ErrorHandling.Library/ConflictException.cs b/src/framework/Framework.ErrorHandling/ConflictException.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/ConflictException.cs rename to src/framework/Framework.ErrorHandling/ConflictException.cs diff --git a/src/framework/Framework.ErrorHandling.Library/ControllerArgumentException.cs b/src/framework/Framework.ErrorHandling/ControllerArgumentException.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/ControllerArgumentException.cs rename to src/framework/Framework.ErrorHandling/ControllerArgumentException.cs diff --git a/src/framework/Framework.ErrorHandling.Library/DetailException.cs b/src/framework/Framework.ErrorHandling/DetailException.cs similarity index 99% rename from src/framework/Framework.ErrorHandling.Library/DetailException.cs rename to src/framework/Framework.ErrorHandling/DetailException.cs index 79051f7336..126e6f3a5f 100644 --- a/src/framework/Framework.ErrorHandling.Library/DetailException.cs +++ b/src/framework/Framework.ErrorHandling/DetailException.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using System.Text.RegularExpressions; namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; diff --git a/src/framework/Framework.ErrorHandling/Directory.Build.props b/src/framework/Framework.ErrorHandling/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.ErrorHandling/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.ErrorHandling.Library/ErrorDetails.cs b/src/framework/Framework.ErrorHandling/ErrorDetails.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/ErrorDetails.cs rename to src/framework/Framework.ErrorHandling/ErrorDetails.cs diff --git a/src/framework/Framework.ErrorHandling.Library/ForbiddenException.cs b/src/framework/Framework.ErrorHandling/ForbiddenException.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/ForbiddenException.cs rename to src/framework/Framework.ErrorHandling/ForbiddenException.cs diff --git a/src/framework/Framework.ErrorHandling/Framework.ErrorHandling.csproj b/src/framework/Framework.ErrorHandling/Framework.ErrorHandling.csproj new file mode 100644 index 0000000000..f5e2e8c5f4 --- /dev/null +++ b/src/framework/Framework.ErrorHandling/Framework.ErrorHandling.csproj @@ -0,0 +1,69 @@ + + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling + Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling + Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.ErrorHandling.Library/NotFoundException.cs b/src/framework/Framework.ErrorHandling/NotFoundException.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/NotFoundException.cs rename to src/framework/Framework.ErrorHandling/NotFoundException.cs diff --git a/src/framework/Framework.ErrorHandling/README.md b/src/framework/Framework.ErrorHandling/README.md new file mode 100644 index 0000000000..a56cd1f0b5 --- /dev/null +++ b/src/framework/Framework.ErrorHandling/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework ErrorHandling Library + +The Catena-X Portal Backend Framework ErrorHandling Library library provides a useful set of custom exceptions and extensions for error handling. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.ErrorHandling.Library/Library/ErrorMessageService.cs b/src/framework/Framework.ErrorHandling/Service/ErrorMessageService.cs similarity index 99% rename from src/framework/Framework.ErrorHandling.Library/Library/ErrorMessageService.cs rename to src/framework/Framework.ErrorHandling/Service/ErrorMessageService.cs index d1152949a4..6cffed3a2b 100644 --- a/src/framework/Framework.ErrorHandling.Library/Library/ErrorMessageService.cs +++ b/src/framework/Framework.ErrorHandling/Service/ErrorMessageService.cs @@ -19,7 +19,7 @@ using System.Collections.Immutable; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; public sealed class ErrorMessageService : IErrorMessageService { diff --git a/src/framework/Framework.ErrorHandling.Library/Library/ErrorResponse.cs b/src/framework/Framework.ErrorHandling/Service/ErrorResponse.cs similarity index 98% rename from src/framework/Framework.ErrorHandling.Library/Library/ErrorResponse.cs rename to src/framework/Framework.ErrorHandling/Service/ErrorResponse.cs index 7c8e6f782c..d01026605f 100644 --- a/src/framework/Framework.ErrorHandling.Library/Library/ErrorResponse.cs +++ b/src/framework/Framework.ErrorHandling/Service/ErrorResponse.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; public record ErrorResponse( string Type, diff --git a/src/framework/Framework.ErrorHandling.Library/Library/IErrorMessageContainer.cs b/src/framework/Framework.ErrorHandling/Service/IErrorMessageContainer.cs similarity index 98% rename from src/framework/Framework.ErrorHandling.Library/Library/IErrorMessageContainer.cs rename to src/framework/Framework.ErrorHandling/Service/IErrorMessageContainer.cs index b99f56a09f..ef5e1c1786 100644 --- a/src/framework/Framework.ErrorHandling.Library/Library/IErrorMessageContainer.cs +++ b/src/framework/Framework.ErrorHandling/Service/IErrorMessageContainer.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; public interface IErrorMessageContainer { diff --git a/src/framework/Framework.ErrorHandling.Library/Library/IErrorMessageService.cs b/src/framework/Framework.ErrorHandling/Service/IErrorMessageService.cs similarity index 98% rename from src/framework/Framework.ErrorHandling.Library/Library/IErrorMessageService.cs rename to src/framework/Framework.ErrorHandling/Service/IErrorMessageService.cs index e37c437df5..7077df263e 100644 --- a/src/framework/Framework.ErrorHandling.Library/Library/IErrorMessageService.cs +++ b/src/framework/Framework.ErrorHandling/Service/IErrorMessageService.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; public interface IErrorMessageService { diff --git a/src/framework/Framework.ErrorHandling.Library/ServiceException.cs b/src/framework/Framework.ErrorHandling/ServiceException.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/ServiceException.cs rename to src/framework/Framework.ErrorHandling/ServiceException.cs diff --git a/src/framework/Framework.ErrorHandling.Library/UnexpectedConditionException.cs b/src/framework/Framework.ErrorHandling/UnexpectedConditionException.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/UnexpectedConditionException.cs rename to src/framework/Framework.ErrorHandling/UnexpectedConditionException.cs diff --git a/src/framework/Framework.ErrorHandling.Library/UnsupportedMediaTypeException.cs b/src/framework/Framework.ErrorHandling/UnsupportedMediaTypeException.cs similarity index 100% rename from src/framework/Framework.ErrorHandling.Library/UnsupportedMediaTypeException.cs rename to src/framework/Framework.ErrorHandling/UnsupportedMediaTypeException.cs diff --git a/src/framework/Framework.HttpClientExtensions/Directory.Build.props b/src/framework/Framework.HttpClientExtensions/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.HttpClientExtensions/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.HttpClientExtensions/Framework.HttpClientExtensions.csproj b/src/framework/Framework.HttpClientExtensions/Framework.HttpClientExtensions.csproj new file mode 100644 index 0000000000..ac34851320 --- /dev/null +++ b/src/framework/Framework.HttpClientExtensions/Framework.HttpClientExtensions.csproj @@ -0,0 +1,74 @@ + + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions + Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions + Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.HttpClient/HttpAsyncResponseMessageExtension.cs b/src/framework/Framework.HttpClientExtensions/HttpAsyncResponseMessageExtension.cs similarity index 100% rename from src/framework/Framework.HttpClient/HttpAsyncResponseMessageExtension.cs rename to src/framework/Framework.HttpClientExtensions/HttpAsyncResponseMessageExtension.cs diff --git a/src/framework/Framework.HttpClient/HttpClientExtensions.cs b/src/framework/Framework.HttpClientExtensions/HttpClientExtensions.cs similarity index 81% rename from src/framework/Framework.HttpClient/HttpClientExtensions.cs rename to src/framework/Framework.HttpClientExtensions/HttpClientExtensions.cs index 2d09f54c29..e0b19719e1 100644 --- a/src/framework/Framework.HttpClient/HttpClientExtensions.cs +++ b/src/framework/Framework.HttpClientExtensions/HttpClientExtensions.cs @@ -19,13 +19,12 @@ ********************************************************************************/ using Microsoft.Extensions.DependencyInjection; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; namespace Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; public static class HttpClientExtensions { - public static IServiceCollection AddCustomHttpClientWithAuthentication(this IServiceCollection services, string? baseAddress, string? authAddress) where T : class + public static IServiceCollection AddCustomHttpClientWithAuthentication(this IServiceCollection services, string? baseAddress) where T : class { services.AddHttpClient(typeof(T).Name, c => { @@ -35,13 +34,7 @@ public static IServiceCollection AddCustomHttpClientWithAuthentication(this I } }).AddHttpMessageHandler>(); - services.AddHttpClient($"{typeof(T).Name}Auth", c => - { - if (authAddress != null) - { - c.BaseAddress = new Uri(authAddress); - } - }).AddHttpMessageHandler>(); + services.AddHttpClient($"{typeof(T).Name}Auth").AddHttpMessageHandler>(); return services; } } diff --git a/src/framework/Framework.Logging/LoggingHandler.cs b/src/framework/Framework.HttpClientExtensions/LoggingHandler.cs similarity index 96% rename from src/framework/Framework.Logging/LoggingHandler.cs rename to src/framework/Framework.HttpClientExtensions/LoggingHandler.cs index 3008401552..36a1b37c85 100644 --- a/src/framework/Framework.Logging/LoggingHandler.cs +++ b/src/framework/Framework.HttpClientExtensions/LoggingHandler.cs @@ -20,7 +20,7 @@ using Microsoft.Extensions.Logging; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; public class LoggingHandler : DelegatingHandler where TLogger : class diff --git a/src/framework/Framework.HttpClientExtensions/README.md b/src/framework/Framework.HttpClientExtensions/README.md new file mode 100644 index 0000000000..735840e95c --- /dev/null +++ b/src/framework/Framework.HttpClientExtensions/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework + +The Catena-X Portal Backend Framework HttpClientExtensions library provides a set of useful extensions for the use of HttpClients. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.IO/Directory.Build.props b/src/framework/Framework.IO/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.IO/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.IO/Framework.IO.csproj b/src/framework/Framework.IO/Framework.IO.csproj index 0aa9b386a7..761893b6df 100644 --- a/src/framework/Framework.IO/Framework.IO.csproj +++ b/src/framework/Framework.IO/Framework.IO.csproj @@ -1,34 +1,72 @@ - - - - - - - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.IO - net7.0 - enable - enable - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.IO + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.IO + Org.Eclipse.TractusX.Portal.Backend.Framework.IO + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.IO/README.md b/src/framework/Framework.IO/README.md new file mode 100644 index 0000000000..f5e04eab8e --- /dev/null +++ b/src/framework/Framework.IO/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework IO + +The Catena-X Portal Backend Framework IO library provides a useful set of extensions and functionality for file I/O handling. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.IO + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.IO/UrlHelper.cs b/src/framework/Framework.IO/UrlHelper.cs index 4f64847ece..5309de783c 100644 --- a/src/framework/Framework.IO/UrlHelper.cs +++ b/src/framework/Framework.IO/UrlHelper.cs @@ -18,12 +18,12 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.IO; - using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; using System.Collections.Immutable; using System.Web; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.IO; + public static class UrlHelper { private static readonly IEnumerable ValidUriSchemes = ImmutableArray.Create("http", "https"); diff --git a/src/framework/Framework.Linq/Directory.Build.props b/src/framework/Framework.Linq/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.Linq/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.Linq/Framework.Linq.csproj b/src/framework/Framework.Linq/Framework.Linq.csproj index 9bb144e676..7d9a4a27a1 100644 --- a/src/framework/Framework.Linq/Framework.Linq.csproj +++ b/src/framework/Framework.Linq/Framework.Linq.csproj @@ -1,35 +1,72 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.Linq - Org.Eclipse.TractusX.Portal.Backend.Framework.Linq - net7.0 - enable - enable - - - - - - - - - + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Linq + Org.Eclipse.TractusX.Portal.Backend.Framework.Linq + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Linq + Org.Eclipse.TractusX.Portal.Backend.Framework.Linq + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.Linq/README.md b/src/framework/Framework.Linq/README.md new file mode 100644 index 0000000000..9baac3d067 --- /dev/null +++ b/src/framework/Framework.Linq/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework Linq + +The Catena-X Portal Backend Framework Linq library provides a useful set of extensions to work with Linq. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Linq + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.Logging/Directory.Build.props b/src/framework/Framework.Logging/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.Logging/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.Logging/Framework.Logging.csproj b/src/framework/Framework.Logging/Framework.Logging.csproj index 0504174a44..6e10f270ef 100644 --- a/src/framework/Framework.Logging/Framework.Logging.csproj +++ b/src/framework/Framework.Logging/Framework.Logging.csproj @@ -1,6 +1,5 @@ + + Org.Eclipse.TractusX.Portal.Backend.Framework.Logging + Org.Eclipse.TractusX.Portal.Backend.Framework.Logging + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.Logging/README.md b/src/framework/Framework.Logging/README.md new file mode 100644 index 0000000000..57148e1c8f --- /dev/null +++ b/src/framework/Framework.Logging/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework Logging + +The Catena-X Portal Backend Framework Logging library provides a useful set of extensions for the logging with Serilog. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Logging + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.Models/Directory.Build.props b/src/framework/Framework.Models/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.Models/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.Models/Framework.Models.csproj b/src/framework/Framework.Models/Framework.Models.csproj index 797bf3acf8..2faaf77964 100644 --- a/src/framework/Framework.Models/Framework.Models.csproj +++ b/src/framework/Framework.Models/Framework.Models.csproj @@ -1,42 +1,77 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.Models - Org.Eclipse.TractusX.Portal.Backend.Framework.Models - net7.0 - enable - enable - - - - - - - - - - - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Models + Org.Eclipse.TractusX.Portal.Backend.Framework.Models + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Models + Org.Eclipse.TractusX.Portal.Backend.Framework.Models + TractusX + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.Models/README.md b/src/framework/Framework.Models/README.md new file mode 100644 index 0000000000..7780f70f85 --- /dev/null +++ b/src/framework/Framework.Models/README.md @@ -0,0 +1,22 @@ +# Catena-X Portal Backend Framework Models + +The Catena-X Portal Backend Framework Models library provides some base models. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Models + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.Seeding/Directory.Build.props b/src/framework/Framework.Seeding/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.Seeding/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.Seeding/Framework.Seeding.csproj b/src/framework/Framework.Seeding/Framework.Seeding.csproj index 6a882c48af..8f3daf10d2 100644 --- a/src/framework/Framework.Seeding/Framework.Seeding.csproj +++ b/src/framework/Framework.Seeding/Framework.Seeding.csproj @@ -1,49 +1,83 @@ - - - - - - net7.0 - enable - enable - Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding - Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding - cb89657c-d60e-4f48-aa84-fb03d69dfa78 - - true - - - - - - - - - - - - - - - - - - + + + + + + net7.0 + enable + enable + Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding + Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding + + true + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding + Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.Seeding/README.md b/src/framework/Framework.Seeding/README.md new file mode 100644 index 0000000000..94ebd6136a --- /dev/null +++ b/src/framework/Framework.Seeding/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework Seeding + +The Catena-X Portal Backend Framework Seeding library provides a useful set of extensions and functionality to setup a json seeding for the use with entity framework. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.Seeding/SeederSettings.cs b/src/framework/Framework.Seeding/SeederSettings.cs index 8b5b8c1770..6d43ee114d 100644 --- a/src/framework/Framework.Seeding/SeederSettings.cs +++ b/src/framework/Framework.Seeding/SeederSettings.cs @@ -20,7 +20,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Validation; using System.ComponentModel.DataAnnotations; namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding; @@ -48,8 +47,6 @@ public static IServiceCollection ConfigureSeederSettings( services.AddOptions() .Bind(section) .ValidateDataAnnotations() - .ValidateEnumEnumeration(section) - .ValidateDistinctValues(section) .ValidateOnStart(); return services; } diff --git a/src/framework/Framework.Swagger/Directory.Build.props b/src/framework/Framework.Swagger/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.Swagger/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.Swagger/Framework.Swagger.csproj b/src/framework/Framework.Swagger/Framework.Swagger.csproj index a962b85e75..ae8ec48102 100644 --- a/src/framework/Framework.Swagger/Framework.Swagger.csproj +++ b/src/framework/Framework.Swagger/Framework.Swagger.csproj @@ -1,38 +1,72 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger - net7.0 - enable - enable - - - - - - - - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger + Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.Swagger/README.md b/src/framework/Framework.Swagger/README.md new file mode 100644 index 0000000000..8402abe999 --- /dev/null +++ b/src/framework/Framework.Swagger/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework Swagger + +The Catena-X Portal Backend Framework Swagger library provides a useful set of extensions for the use of Swagger. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.Token/Directory.Build.props b/src/framework/Framework.Token/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.Token/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.Token/Framework.Token.csproj b/src/framework/Framework.Token/Framework.Token.csproj index dc90fc31f0..5ef49e4e85 100644 --- a/src/framework/Framework.Token/Framework.Token.csproj +++ b/src/framework/Framework.Token/Framework.Token.csproj @@ -1,39 +1,72 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.Token - Org.Eclipse.TractusX.Portal.Backend.Framework.Token - net7.0 - enable - enable - - - - - - - - - - - - + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Token + Org.Eclipse.TractusX.Portal.Backend.Framework.Token + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Token + Org.Eclipse.TractusX.Portal.Backend.Framework.Token + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.Token/GetTokenSettings.cs b/src/framework/Framework.Token/GetTokenSettings.cs index 800c6ad586..528deba20e 100644 --- a/src/framework/Framework.Token/GetTokenSettings.cs +++ b/src/framework/Framework.Token/GetTokenSettings.cs @@ -19,4 +19,12 @@ namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Token; -public record GetTokenSettings(string HttpClientName, string Username, string Password, string ClientId, string GrantType, string ClientSecret, string Scope); +public record GetTokenSettings( + string HttpClientName, + string Username, + string Password, + string ClientId, + string GrantType, + string ClientSecret, + string Scope, + string TokenUrl); diff --git a/src/framework/Framework.Token/ITokenService.cs b/src/framework/Framework.Token/ITokenService.cs index 9a467e2b63..da0481f5f7 100644 --- a/src/framework/Framework.Token/ITokenService.cs +++ b/src/framework/Framework.Token/ITokenService.cs @@ -18,11 +18,9 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; - namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Token; public interface ITokenService { - Task GetAuthorizedClient(KeyVaultAuthSettings settings, CancellationToken cancellationToken); + Task GetAuthorizedClient(KeyVaultAuthSettings settings, CancellationToken cancellationToken); } diff --git a/src/framework/Framework.Models/KeyVaultAuthSettings.cs b/src/framework/Framework.Token/KeyVaultAuthSettings.cs similarity index 92% rename from src/framework/Framework.Models/KeyVaultAuthSettings.cs rename to src/framework/Framework.Token/KeyVaultAuthSettings.cs index c734cc1746..34ba0353fe 100644 --- a/src/framework/Framework.Models/KeyVaultAuthSettings.cs +++ b/src/framework/Framework.Token/KeyVaultAuthSettings.cs @@ -20,7 +20,7 @@ using System.ComponentModel.DataAnnotations; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Token; public class KeyVaultAuthSettings { @@ -43,5 +43,5 @@ public class KeyVaultAuthSettings public string Scope { get; set; } = null!; [Required(AllowEmptyStrings = false)] - public string KeycloakTokenAddress { get; set; } = null!; + public string TokenAddress { get; set; } = null!; } diff --git a/src/framework/Framework.Token/README.md b/src/framework/Framework.Token/README.md new file mode 100644 index 0000000000..a109714e17 --- /dev/null +++ b/src/framework/Framework.Token/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework Token + +The Catena-X Portal Backend Framework Token library provides a useful set of extensions and functionality to easily get a authorized HttpClient. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Token + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.Token/TokenService.cs b/src/framework/Framework.Token/TokenService.cs index f984e420a8..bda9355159 100644 --- a/src/framework/Framework.Token/TokenService.cs +++ b/src/framework/Framework.Token/TokenService.cs @@ -19,7 +19,6 @@ ********************************************************************************/ using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using System.Net.Http.Headers; using System.Text.Json; @@ -43,7 +42,8 @@ public async Task GetAuthorizedClient(KeyVaultAuthSettings settin settings.ClientId, settings.GrantType, settings.ClientSecret, - settings.Scope); + settings.Scope, + settings.TokenAddress); var token = await this.GetTokenAsync(tokenParameters, cancellationToken).ConfigureAwait(false); @@ -64,7 +64,7 @@ public async Task GetAuthorizedClient(KeyVaultAuthSettings settin {"scope", settings.Scope} }; var content = new FormUrlEncodedContent(formParameters); - var response = await _httpClientFactory.CreateClient(settings.HttpClientName).PostAsync("", content, cancellationToken) + var response = await _httpClientFactory.CreateClient(settings.HttpClientName).PostAsync(settings.TokenUrl, content, cancellationToken) .CatchingIntoServiceExceptionFor("token-post", HttpAsyncResponseMessageExtension.RecoverOptions.INFRASTRUCTURE).ConfigureAwait(false); using var responseStream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); diff --git a/src/framework/Framework.Web/Directory.Build.props b/src/framework/Framework.Web/Directory.Build.props new file mode 100644 index 0000000000..3f35c3e9a7 --- /dev/null +++ b/src/framework/Framework.Web/Directory.Build.props @@ -0,0 +1,25 @@ + + + + + 1.0.0 + + + diff --git a/src/framework/Framework.Web/Framework.Web.csproj b/src/framework/Framework.Web/Framework.Web.csproj index 42d499da6a..1f1b251098 100644 --- a/src/framework/Framework.Web/Framework.Web.csproj +++ b/src/framework/Framework.Web/Framework.Web.csproj @@ -1,44 +1,81 @@ - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.Web - Org.Eclipse.TractusX.Portal.Backend.Framework.Web - net7.0 - enable - enable - - - - - - - - - - - - - - - - - - + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Web + Org.Eclipse.TractusX.Portal.Backend.Framework.Web + net7.0 + enable + enable + true + + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Web + Org.Eclipse.TractusX.Portal.Backend.Framework.Web + Eclipse Tractus-X + All content is the property of the respective authors or their employers. For more information regarding authorship of content, please consult the listed source code repository logs. + + The Catena-X Portal Backend Framework library is a versatile .NET library that provides a set of powerful tools and utilities for common development tasks. + This package simplifies various aspects of your application, including database interactions, asynchronous programming, file I/O, LINQ operations, logging, and database seeding. + + README.md + LICENSE + https://github.com/eclipse-tractusx/portal-backend + https://github.com/eclipse-tractusx/portal-backend + git + + true + + + true + + + true + snupkg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/framework/Framework.Web/MandatoryIdentityClaimHandler.cs b/src/framework/Framework.Web/MandatoryIdentityClaimHandler.cs deleted file mode 100644 index eb15bd92a7..0000000000 --- a/src/framework/Framework.Web/MandatoryIdentityClaimHandler.cs +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -using Microsoft.AspNetCore.Authorization; -using Microsoft.Extensions.Logging; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; -using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; -using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; -using System.Security.Claims; - -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web -{ - public class MandatoryIdentityClaimRequirement : IAuthorizationRequirement - { - public MandatoryIdentityClaimRequirement(PolicyTypeId policyTypeId) - { - PolicyTypeId = policyTypeId; - } - - public PolicyTypeId PolicyTypeId { get; } - } - - public class MandatoryIdentityClaimHandler : AuthorizationHandler - { - private readonly IIdentityRepository _identityRepository; - private readonly IServiceAccountRepository _serviceAccountRepository; - private readonly IClaimsIdentityDataBuilder _identityDataBuilder; - private readonly ILogger _logger; - - public MandatoryIdentityClaimHandler(IClaimsIdentityDataBuilder claimsIdentityDataBuilder, IPortalRepositories portalRepositories, ILogger logger) - { - _identityDataBuilder = claimsIdentityDataBuilder; - _identityRepository = portalRepositories.GetInstance(); - _serviceAccountRepository = portalRepositories.GetInstance(); - _logger = logger; - } - - protected override async Task HandleRequirementAsync(AuthorizationHandlerContext context, MandatoryIdentityClaimRequirement requirement) - { - if (_identityDataBuilder.Status == IClaimsIdentityDataBuilderStatus.Initial) - { - await InitializeClaims(context.User).ConfigureAwait(false); - } - if (_identityDataBuilder.Status == IClaimsIdentityDataBuilderStatus.Empty) - { - context.Fail(); - return; - } - if (requirement.PolicyTypeId switch - { - PolicyTypeId.ValidIdentity => _identityDataBuilder.IdentityId != Guid.Empty, - PolicyTypeId.ValidCompany => (await GetCompanyId().ConfigureAwait(false)) != Guid.Empty, - PolicyTypeId.CompanyUser => _identityDataBuilder.IdentityTypeId == IdentityTypeId.COMPANY_USER, - PolicyTypeId.ServiceAccount => _identityDataBuilder.IdentityTypeId == IdentityTypeId.COMPANY_SERVICE_ACCOUNT, - _ => throw new UnexpectedConditionException($"unexpected PolicyTypeId {requirement.PolicyTypeId}") - }) - { - context.Succeed(requirement); - } - else - { - context.Fail(); - } - } - - private async ValueTask InitializeClaims(ClaimsPrincipal principal) - { - var preferredUserName = principal.Claims.SingleOrDefault(x => x.Type == PortalClaimTypes.PreferredUserName)?.Value; - if (Guid.TryParse(preferredUserName, out var identityId)) - { - _identityDataBuilder.AddIdentityId(identityId); - _identityDataBuilder.AddIdentityTypeId(IdentityTypeId.COMPANY_USER); - _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Initialized; - return; - } - - (Guid IdentityId, Guid CompanyId) serviceAccountData; - var clientId = principal.Claims.SingleOrDefault(x => x.Type == PortalClaimTypes.ClientId)?.Value; - if (!string.IsNullOrWhiteSpace(clientId) && (serviceAccountData = await _serviceAccountRepository.GetServiceAccountDataByClientId(clientId).ConfigureAwait(false)) != default) - { - _identityDataBuilder.AddIdentityId(serviceAccountData.IdentityId); - _identityDataBuilder.AddIdentityTypeId(IdentityTypeId.COMPANY_SERVICE_ACCOUNT); - _identityDataBuilder.AddCompanyId(serviceAccountData.CompanyId); - _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Complete; - return; - } - - var sub = principal.Claims.SingleOrDefault(x => x.Type == PortalClaimTypes.Sub)?.Value; - _logger.LogInformation("Preferred user name {PreferredUserName} couldn't be parsed to uuid for sub {Sub}", preferredUserName, sub); - - (Guid IdentityId, IdentityTypeId IdentityTypeId, Guid CompanyId) identityData; - if (!string.IsNullOrWhiteSpace(sub) && (identityData = await _identityRepository.GetActiveIdentityDataByUserEntityId(sub).ConfigureAwait(false)) != default) - { - _identityDataBuilder.AddIdentityId(identityData.IdentityId); - _identityDataBuilder.AddIdentityTypeId(identityData.IdentityTypeId); - _identityDataBuilder.AddCompanyId(identityData.CompanyId); - _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Complete; - return; - } - - _logger.LogWarning("No identity found for userEntityId {Sub}", sub); - _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Empty; - } - - private async ValueTask GetCompanyId() - { - if (_identityDataBuilder.Status == IClaimsIdentityDataBuilderStatus.Initialized) - { - _identityDataBuilder.AddCompanyId(await _identityRepository.GetActiveCompanyIdByIdentityId(_identityDataBuilder.IdentityId).ConfigureAwait(false)); - _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Complete; - } - return _identityDataBuilder.CompanyId; - } - } -} diff --git a/src/framework/Framework.Web/README.md b/src/framework/Framework.Web/README.md new file mode 100644 index 0000000000..45f7ba75b6 --- /dev/null +++ b/src/framework/Framework.Web/README.md @@ -0,0 +1,21 @@ +# Catena-X Portal Backend Framework Web + +The Catena-X Portal Backend Framework Web library provides a useful set of extensions and functionality to setup a asp net core application. + +This content is produced and maintained by the Eclipse Tractus-X project. + +* Project home: https://projects.eclipse.org/projects/automotive.tractusx + +## Installation + +dotnet add package Org.Eclipse.TractusX.Portal.Backend.Framework.Web + +## Source Code + +The project maintains the following source code repositories in the GitHub organization https://github.com/eclipse-tractusx: + +- https://github.com/eclipse-tractusx/portal-backend + +## License + +Distributed under the Apache 2.0 License. diff --git a/src/framework/Framework.Web/StartupServiceExtensions.cs b/src/framework/Framework.Web/StartupServiceExtensions.cs index 7b159eb9ab..37aea1d0e5 100644 --- a/src/framework/Framework.Web/StartupServiceExtensions.cs +++ b/src/framework/Framework.Web/StartupServiceExtensions.cs @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -17,17 +17,13 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Framework.Cors; using Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider.DependencyInjection; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos.DependencyInjection; +using Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger; -using Org.Eclipse.TractusX.Portal.Backend.Keycloak.Authentication; using System.IdentityModel.Tokens.Jwt; using System.Text.Json.Serialization; @@ -35,14 +31,14 @@ namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web; public static class StartupServiceExtensions { - public static IServiceCollection AddDefaultServices(this IServiceCollection services, IConfigurationRoot configuration, string version) + public static IServiceCollection AddDefaultServices(this IServiceCollection services, IConfigurationRoot configuration, string version, string cookieName) { services.AddCors(options => options.SetupCors(configuration)); services.AddDistributedMemoryCache(); services.AddSession(options => { - options.Cookie.Name = ".Portal"; + options.Cookie.Name = cookieName; options.IdleTimeout = TimeSpan.FromMinutes(10); }); @@ -69,18 +65,9 @@ public static IServiceCollection AddDefaultServices(this IServiceColle }; } }); - services.AddTransient(); - services.AddAuthorization(options => - { - options.AddPolicy(PolicyTypes.ValidIdentity, policy => policy.Requirements.Add(new MandatoryIdentityClaimRequirement(PolicyTypeId.ValidIdentity))); - options.AddPolicy(PolicyTypes.ValidCompany, policy => policy.Requirements.Add(new MandatoryIdentityClaimRequirement(PolicyTypeId.ValidCompany))); - options.AddPolicy(PolicyTypes.CompanyUser, policy => policy.Requirements.Add(new MandatoryIdentityClaimRequirement(PolicyTypeId.CompanyUser))); - options.AddPolicy(PolicyTypes.ServiceAccount, policy => policy.Requirements.Add(new MandatoryIdentityClaimRequirement(PolicyTypeId.ServiceAccount))); - }); - JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); - services.AddTransient() + services .AddOptions() .Bind(configuration.GetSection("JwtBearerOptions")) .ValidateOnStart(); @@ -89,10 +76,9 @@ public static IServiceCollection AddDefaultServices(this IServiceColle .AddCheck("JwtBearerConfiguration", tags: new[] { "keycloak" }); services.AddHttpContextAccessor(); - services.AddClaimsIdentityService(); services.AddDateTimeProvider(); - services.AddPublicInfos(); + services.AutoRegister(); return services; } } diff --git a/src/framework/Framework.Web/StartupServiceWebApplicationExtensions.cs b/src/framework/Framework.Web/StartupServiceWebApplicationExtensions.cs index 3492e00b55..30558fb412 100644 --- a/src/framework/Framework.Web/StartupServiceWebApplicationExtensions.cs +++ b/src/framework/Framework.Web/StartupServiceWebApplicationExtensions.cs @@ -20,43 +20,22 @@ using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; using Org.Eclipse.TractusX.Portal.Backend.Framework.Cors; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web; -using Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Keycloak.Factory; using Serilog; namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web; public static class StartupServiceWebApplicationExtensions { - public static WebApplication CreateApp(this WebApplication app, string apiPath, string version, IHostEnvironment environment) + public static WebApplication CreateApp(this WebApplication app, string apiPath, string version) { app.UseSerilogRequestLogging(); - if (environment.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - var urlsToTrust = app.Configuration.GetSection("Keycloak").Get()?.Values - .Where(config => config.ConnectionString.StartsWith("https://")) - .Select(config => config.ConnectionString) - .Distinct(); - if (urlsToTrust != null) - { - FlurlUntrustedCertExceptionHandler.ConfigureExceptions(urlsToTrust); - } - } - - var assemblyName = typeof(TProgram).Assembly.FullName?.Split(',')[0]; - - FlurlErrorHandler.ConfigureErrorHandler(app.Services.GetRequiredService>(), environment.IsDevelopment()); - if (app.Configuration.GetValue("SwaggerEnabled") != null && app.Configuration.GetValue("SwaggerEnabled")) { + var assemblyName = typeof(TProgram).Assembly.FullName?.Split(',')[0]; app.UseSwagger(c => c.RouteTemplate = $"/api/{apiPath}/swagger/{{documentName}}/swagger.{{json|yaml}}"); app.UseSwaggerUI(c => diff --git a/src/framework/Framework.Web/WebApplicationBuildRunner.cs b/src/framework/Framework.Web/WebApplicationBuildRunner.cs index b35b3e2dde..21afbc2c90 100644 --- a/src/framework/Framework.Web/WebApplicationBuildRunner.cs +++ b/src/framework/Framework.Web/WebApplicationBuildRunner.cs @@ -21,6 +21,7 @@ using Flurl.Util; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; using Serilog; @@ -32,7 +33,9 @@ public static void BuildAndRunWebApplication( string[] args, string path, string version, - Action configureBuilder) + string cookieName, + Action? configureBuilder, + Action? configureApp) { LoggingExtensions.EnsureInitialized(); Log.Information("Starting the application"); @@ -54,15 +57,17 @@ public static void BuildAndRunWebApplication( } }); builder.Services - .AddDefaultServices(builder.Configuration, version); + .AddDefaultServices(builder.Configuration, version, cookieName); - configureBuilder(builder); + configureBuilder?.Invoke(builder); - builder.Build().CreateApp(path, version, builder.Environment).Run(); + var app = builder.Build().CreateApp(path, version); + configureApp?.Invoke(app, builder.Environment); + app.Run(); } catch (Exception ex) when (!ex.GetType().Name.Equals("StopTheHostException", StringComparison.Ordinal)) { - Log.Fatal("Unhandled exception {Exception}", ex); + Log.Fatal(ex, "Start failed due to unhandled exception"); } finally { diff --git a/src/framework/README.md b/src/framework/README.md new file mode 100644 index 0000000000..2799d3ef9b --- /dev/null +++ b/src/framework/README.md @@ -0,0 +1,36 @@ +# Framework Packages + +All projects within the framework directory are built and provided as NuGet packages. + +Please do not add direct references to any framework project which is not in the framework directory + +## Package Configuration + +Each package's configuration is defined in its .csproj file. You can refer to a package's .csproj file or consult the [Microsoft Documentation](https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices#package-metadata) for guidance. + +**Important** + +- Every package should have its own README file with a brief description of what the package includes. +- Include the following files from the root of the project in your package: + - [LICENSE]("../../../LICENSE") + - [NOTICE.md]("../../../NOTICE.md") + - [DEPENDENCIES]("../../../DEPENDENCIES") + - [CONTRIBUTING.md]("../../../CONTRIBUTING.md") + +Exceptions: For package versions, we use the `Directory.Build.props`, which sets the PackageVersion during the build process. To update package versions, please refer to [how to build nuget packages](./../../scripts/update-nuget-packages.md) + +## Linking Framework Packages + +You can link one framework package to another by adding a project reference. Here's an example: + +``` C# + + + +``` + +When linking a NuGet package in this manner, the referencing package will use the current version of the linked package. For example, if the current version of the package `Framework.ErrorHandling.Library` is 1.1.0 and you reference it in `Framework.ErrorHandling.Library.Web` using the example above, `Framework.ErrorHandling.Library.Web` will reference this specific version when building the NuGet package. + +## Build + +Please make sure to update the version as soon as a package was updated with the [update_framework_versions](./../../scripts/update_framework_versions.sh) script. \ No newline at end of file diff --git a/src/keycloak/Keycloak.Authentication/ControllerExtensions.cs b/src/keycloak/Keycloak.Authentication/ControllerExtensions.cs index 81bcaa79b8..65bca096b0 100644 --- a/src/keycloak/Keycloak.Authentication/ControllerExtensions.cs +++ b/src/keycloak/Keycloak.Authentication/ControllerExtensions.cs @@ -19,8 +19,6 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using System.Security.Claims; namespace Org.Eclipse.TractusX.Portal.Backend.Keycloak.Authentication; diff --git a/src/keycloak/Keycloak.Authentication/Keycloak.Authentication.csproj b/src/keycloak/Keycloak.Authentication/Keycloak.Authentication.csproj index 2d91e75b94..51284b6c39 100644 --- a/src/keycloak/Keycloak.Authentication/Keycloak.Authentication.csproj +++ b/src/keycloak/Keycloak.Authentication/Keycloak.Authentication.csproj @@ -1,5 +1,5 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling - net7.0 - enable - enable - - - - - - - - - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling + Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling + net7.0 + enable + enable + + + + + + + + + + + + + diff --git a/src/keycloak/Keycloak.Factory/Keycloak.Factory.csproj b/src/keycloak/Keycloak.Factory/Keycloak.Factory.csproj index b111e32bbd..bae2fcf602 100644 --- a/src/keycloak/Keycloak.Factory/Keycloak.Factory.csproj +++ b/src/keycloak/Keycloak.Factory/Keycloak.Factory.csproj @@ -1,40 +1,40 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Keycloak.Factory - net7.0 - enable - enable - - - - - - - - - - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Keycloak.Factory + net7.0 + enable + enable + + + + + + + + + + + + + diff --git a/src/keycloak/Keycloak.Seeding/BusinessLogic/ClientsUpdater.cs b/src/keycloak/Keycloak.Seeding/BusinessLogic/ClientsUpdater.cs index b2d1e6adab..862d81e163 100644 --- a/src/keycloak/Keycloak.Seeding/BusinessLogic/ClientsUpdater.cs +++ b/src/keycloak/Keycloak.Seeding/BusinessLogic/ClientsUpdater.cs @@ -1,6 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. diff --git a/src/keycloak/Keycloak.Seeding/Keycloak.Seeding.csproj b/src/keycloak/Keycloak.Seeding/Keycloak.Seeding.csproj index c9f60875cf..c55b0b596c 100644 --- a/src/keycloak/Keycloak.Seeding/Keycloak.Seeding.csproj +++ b/src/keycloak/Keycloak.Seeding/Keycloak.Seeding.csproj @@ -1,74 +1,71 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Keycloak.Seeding - Org.Eclipse.TractusX.Portal.Backend.Keycloak.Seeding - net7.0 - enable - enable - b9d59db4-40b8-4722-8263-a61a1ef3155c - Linux - ..\..\.. - True - CS1591 - Exe - - - - - - - - - - - - - - - - - - - - - - - - Always - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Keycloak.Seeding + Org.Eclipse.TractusX.Portal.Backend.Keycloak.Seeding + net7.0 + enable + enable + b9d59db4-40b8-4722-8263-a61a1ef3155c + Linux + ..\..\.. + True + CS1591 + Exe + + + + + + + + + + + + + + + + + + + + + + Always + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + diff --git a/src/mailing/Mailing.SendMail/MailSettings.cs b/src/mailing/Mailing.SendMail/MailSettings.cs index 0af2d13846..8c6be9c45c 100644 --- a/src/mailing/Mailing.SendMail/MailSettings.cs +++ b/src/mailing/Mailing.SendMail/MailSettings.cs @@ -20,6 +20,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using MimeKit; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; namespace Org.Eclipse.TractusX.Portal.Backend.Mailing.SendMail @@ -33,13 +34,16 @@ public class MailSettings public int SmtpPort { get; set; } = 0; public string? HttpProxy { get; set; } public int HttpProxyPort { get; set; } + public string SenderEmail { get; set; } = null!; public bool Validate() { var validation = new ConfigurationValidation() .NotNullOrWhiteSpace(SmtpHost, () => nameof(SmtpHost)) .NotNullOrWhiteSpace(SmtpUser, () => nameof(SmtpUser)) - .NotNullOrWhiteSpace(SmtpPassword, () => nameof(SmtpPassword)); + .NotNullOrWhiteSpace(SmtpPassword, () => nameof(SmtpPassword)) + .NotNullOrWhiteSpace(SenderEmail, () => nameof(SenderEmail)); + if (HttpProxy != null) { validation.NotNullOrWhiteSpace(HttpProxy, () => nameof(HttpProxy)); @@ -48,7 +52,7 @@ public bool Validate() } } - public static class MailSettingsExtention + public static class MailSettingsExtension { public static IServiceCollection ConfigureMailSettings( this IServiceCollection services, diff --git a/src/mailing/Mailing.SendMail/Mailing.SendMail.csproj b/src/mailing/Mailing.SendMail/Mailing.SendMail.csproj index d5c8bbc549..a050c1eb9e 100644 --- a/src/mailing/Mailing.SendMail/Mailing.SendMail.csproj +++ b/src/mailing/Mailing.SendMail/Mailing.SendMail.csproj @@ -1,6 +1,5 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.Mailing.Template - net7.0 - enable - enable - - - - - - - - - - - - - - - - - - - - - EmailTemplates/**/* - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Mailing.Template + net7.0 + enable + enable + + + + + + + + + + + + + + + EmailTemplates/**/* + + + + + + + + diff --git a/src/maintenance/Maintenance.App/Maintenance.App.csproj b/src/maintenance/Maintenance.App/Maintenance.App.csproj index a537e09369..7a5b77c1be 100644 --- a/src/maintenance/Maintenance.App/Maintenance.App.csproj +++ b/src/maintenance/Maintenance.App/Maintenance.App.csproj @@ -1,74 +1,74 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Maintenance.App - Org.Eclipse.TractusX.Portal.Backend.Maintenance.App - net7.0 - enable - enable - 032003D5-FBCF-48CE-AE7C-F8F5F43DCCC1 - Linux - ..\..\.. - True - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - Program.cs - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Maintenance.App + Org.Eclipse.TractusX.Portal.Backend.Maintenance.App + net7.0 + enable + enable + 032003D5-FBCF-48CE-AE7C-F8F5F43DCCC1 + Linux + ..\..\.. + True + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + Program.cs + + + + diff --git a/src/maintenance/Maintenance.App/Program.cs b/src/maintenance/Maintenance.App/Program.cs index 80c85aca48..48ca9385b4 100644 --- a/src/maintenance/Maintenance.App/Program.cs +++ b/src/maintenance/Maintenance.App/Program.cs @@ -21,10 +21,10 @@ using Laraue.EfCoreTriggers.PostgreSql.Extensions; using Microsoft.EntityFrameworkCore; using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Maintenance.App; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Auditing; +using Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity.DependencyInjection; using Serilog; LoggingExtensions.EnsureInitialized(); diff --git a/src/marketplace/Apps.Service/Apps.Service.csproj b/src/marketplace/Apps.Service/Apps.Service.csproj index 4687bc0571..c120f46c8c 100644 --- a/src/marketplace/Apps.Service/Apps.Service.csproj +++ b/src/marketplace/Apps.Service/Apps.Service.csproj @@ -20,6 +20,7 @@ Org.Eclipse.TractusX.Portal.Backend.Apps.Service + Org.Eclipse.TractusX.Portal.Backend.Apps.Service net7.0 enable enable @@ -36,14 +37,16 @@ - + + + + - diff --git a/src/marketplace/Apps.Service/Controllers/AppChangeController.cs b/src/marketplace/Apps.Service/Controllers/AppChangeController.cs index ff208ae2b8..34d6d0cbe3 100644 --- a/src/marketplace/Apps.Service/Controllers/AppChangeController.cs +++ b/src/marketplace/Apps.Service/Controllers/AppChangeController.cs @@ -22,10 +22,10 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Apps.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Apps.Service.ViewModels; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Apps.Service.Controllers; diff --git a/src/marketplace/Apps.Service/Controllers/AppReleaseProcessController.cs b/src/marketplace/Apps.Service/Controllers/AppReleaseProcessController.cs index 4ba2962955..cdfcf899b2 100644 --- a/src/marketplace/Apps.Service/Controllers/AppReleaseProcessController.cs +++ b/src/marketplace/Apps.Service/Controllers/AppReleaseProcessController.cs @@ -22,11 +22,12 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Apps.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Apps.Service.ViewModels; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Apps.Service.Controllers; diff --git a/src/marketplace/Apps.Service/Controllers/AppsController.cs b/src/marketplace/Apps.Service/Controllers/AppsController.cs index b710f0f5e4..ce072056b1 100644 --- a/src/marketplace/Apps.Service/Controllers/AppsController.cs +++ b/src/marketplace/Apps.Service/Controllers/AppsController.cs @@ -22,12 +22,13 @@ using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Apps.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Apps.Service.ViewModels; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; using Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; namespace Org.Eclipse.TractusX.Portal.Backend.Apps.Service.Controllers; diff --git a/src/marketplace/Apps.Service/Program.cs b/src/marketplace/Apps.Service/Program.cs index c19512de6a..c188e7ae32 100644 --- a/src/marketplace/Apps.Service/Program.cs +++ b/src/marketplace/Apps.Service/Program.cs @@ -19,7 +19,6 @@ ********************************************************************************/ using Org.Eclipse.TractusX.Portal.Backend.Apps.Service.BusinessLogic; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Web; using Org.Eclipse.TractusX.Portal.Backend.Mailing.SendMail; using Org.Eclipse.TractusX.Portal.Backend.Notifications.Library; using Org.Eclipse.TractusX.Portal.Backend.Offers.Library.DependencyInjection; @@ -28,12 +27,17 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library; +using Org.Eclipse.TractusX.Portal.Backend.Web.Initialization; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.DependencyInjection; var VERSION = "v2"; -WebApplicationBuildRunner +WebAppHelper .BuildAndRunWebApplication(args, "apps", VERSION, builder => { + builder.Services + .AddPublicInfos(); + builder.Services .AddMailingAndTemplateManager(builder.Configuration) .AddPortalRepositories(builder.Configuration) diff --git a/src/marketplace/Apps.Service/appsettings.json b/src/marketplace/Apps.Service/appsettings.json index 9829f23e18..9d053cb9aa 100644 --- a/src/marketplace/Apps.Service/appsettings.json +++ b/src/marketplace/Apps.Service/appsettings.json @@ -113,7 +113,8 @@ "SmtpHost": "", "SmtpPort": 587, "SmtpUser": "", - "SmtpPassword": "" + "SmtpPassword": "", + "SenderEmail": "" } }, "Provisioning": { diff --git a/src/marketplace/Offers.Library.Web/OfferDocumentService.cs b/src/marketplace/Offers.Library.Web/OfferDocumentService.cs index 918c5596d2..cd72a13516 100644 --- a/src/marketplace/Offers.Library.Web/OfferDocumentService.cs +++ b/src/marketplace/Offers.Library.Web/OfferDocumentService.cs @@ -94,9 +94,9 @@ public async Task UploadDocumentAsync(Guid id, DocumentTypeId documentTypeId, IF throw new ForbiddenException($"Company {_identityData.CompanyId} is not the provider company of {offerTypeId} {id}"); } - var (content, hash) = await document.GetContentAndHash(cancellationToken).ConfigureAwait(false); + var documentData = await document.GetContentAndHash(cancellationToken).ConfigureAwait(false); - var doc = _portalRepositories.GetInstance().CreateDocument(document.FileName, content, hash, mediaTypeId, documentTypeId, x => + var doc = _portalRepositories.GetInstance().CreateDocument(document.FileName, documentData.Content, documentData.Hash, mediaTypeId, documentTypeId, x => { x.CompanyUserId = _identityData.IdentityId; }); diff --git a/src/marketplace/Offers.Library.Web/Offers.Library.Web.csproj b/src/marketplace/Offers.Library.Web/Offers.Library.Web.csproj index abc6686621..e61787b479 100644 --- a/src/marketplace/Offers.Library.Web/Offers.Library.Web.csproj +++ b/src/marketplace/Offers.Library.Web/Offers.Library.Web.csproj @@ -1,37 +1,42 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Web - net7.0 - enable - enable - - - - - - - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Web + Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Web + net7.0 + enable + enable + + + + + + + + + + + + + + diff --git a/src/marketplace/Offers.Library/DependencyInjection/OfferSetupServiceExtensions.cs b/src/marketplace/Offers.Library/DependencyInjection/OfferSetupServiceExtensions.cs index d605fa3597..d2a7b1b7d0 100644 --- a/src/marketplace/Offers.Library/DependencyInjection/OfferSetupServiceExtensions.cs +++ b/src/marketplace/Offers.Library/DependencyInjection/OfferSetupServiceExtensions.cs @@ -19,8 +19,7 @@ ********************************************************************************/ using Microsoft.Extensions.DependencyInjection; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; -using Org.Eclipse.TractusX.Portal.Backend.Mailing.Service; +using Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; using Org.Eclipse.TractusX.Portal.Backend.Mailing.Service.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Service; using Org.Eclipse.TractusX.Portal.Backend.Processes.OfferSubscription.Library.DependencyInjection; diff --git a/src/marketplace/Offers.Library/Offers.Library.csproj b/src/marketplace/Offers.Library/Offers.Library.csproj index ee6a01ad8b..f53abba71a 100644 --- a/src/marketplace/Offers.Library/Offers.Library.csproj +++ b/src/marketplace/Offers.Library/Offers.Library.csproj @@ -1,42 +1,47 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Offers.Library - net7.0 - enable - enable - - - - - - - - - - - - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Offers.Library + Org.Eclipse.TractusX.Portal.Backend.Offers.Library + net7.0 + enable + enable + + + + + + + + + + + + + + + + + + + diff --git a/src/marketplace/Services.Service/Controllers/ServiceChangeController.cs b/src/marketplace/Services.Service/Controllers/ServiceChangeController.cs index c1cd6badb2..ed0052d7f1 100644 --- a/src/marketplace/Services.Service/Controllers/ServiceChangeController.cs +++ b/src/marketplace/Services.Service/Controllers/ServiceChangeController.cs @@ -20,9 +20,9 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Services.Service.BusinessLogic; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Services.Service.Controllers; diff --git a/src/marketplace/Services.Service/Controllers/ServiceReleaseController.cs b/src/marketplace/Services.Service/Controllers/ServiceReleaseController.cs index 22b01dadb5..200e2f84b9 100644 --- a/src/marketplace/Services.Service/Controllers/ServiceReleaseController.cs +++ b/src/marketplace/Services.Service/Controllers/ServiceReleaseController.cs @@ -20,13 +20,14 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.Services.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Services.Service.ViewModels; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Services.Service.Controllers; diff --git a/src/marketplace/Services.Service/Controllers/ServicesController.cs b/src/marketplace/Services.Service/Controllers/ServicesController.cs index 372337d55c..8fdd47de31 100644 --- a/src/marketplace/Services.Service/Controllers/ServicesController.cs +++ b/src/marketplace/Services.Service/Controllers/ServicesController.cs @@ -1,6 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -20,14 +19,15 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; using Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.Services.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Services.Service.ViewModels; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; namespace Org.Eclipse.TractusX.Portal.Backend.Services.Service.Controllers; diff --git a/src/marketplace/Services.Service/Program.cs b/src/marketplace/Services.Service/Program.cs index fc11e2d56c..d3eef783e3 100644 --- a/src/marketplace/Services.Service/Program.cs +++ b/src/marketplace/Services.Service/Program.cs @@ -18,7 +18,6 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.Web; using Org.Eclipse.TractusX.Portal.Backend.Mailing.SendMail; using Org.Eclipse.TractusX.Portal.Backend.Notifications.Library; using Org.Eclipse.TractusX.Portal.Backend.Offers.Library.DependencyInjection; @@ -28,12 +27,17 @@ using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library; using Org.Eclipse.TractusX.Portal.Backend.Services.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Services.Service.DependencyInjection; +using Org.Eclipse.TractusX.Portal.Backend.Web.Initialization; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.DependencyInjection; var VERSION = "v2"; -WebApplicationBuildRunner +WebAppHelper .BuildAndRunWebApplication(args, "services", VERSION, builder => { + builder.Services + .AddPublicInfos(); + builder.Services .AddMailingAndTemplateManager(builder.Configuration) .AddPortalRepositories(builder.Configuration) diff --git a/src/marketplace/Services.Service/Services.Service.csproj b/src/marketplace/Services.Service/Services.Service.csproj index da5ca428fb..c99434c91d 100644 --- a/src/marketplace/Services.Service/Services.Service.csproj +++ b/src/marketplace/Services.Service/Services.Service.csproj @@ -22,6 +22,7 @@ Org.Eclipse.TractusX.Portal.Backend.Services.Service + Org.Eclipse.TractusX.Portal.Backend.Services.Service net7.0 enable enable @@ -33,12 +34,13 @@ - - + + + + - diff --git a/src/marketplace/Services.Service/appsettings.json b/src/marketplace/Services.Service/appsettings.json index 10e292f808..643fa17725 100644 --- a/src/marketplace/Services.Service/appsettings.json +++ b/src/marketplace/Services.Service/appsettings.json @@ -107,7 +107,8 @@ "SmtpHost": "", "SmtpPort": 587, "SmtpUser": "", - "SmtpPassword": "" + "SmtpPassword": "", + "SenderEmail": "" } }, "Provisioning": { diff --git a/src/notifications/Notifications.Service/Controllers/NotificationController.cs b/src/notifications/Notifications.Service/Controllers/NotificationController.cs index 325c883854..52078db957 100644 --- a/src/notifications/Notifications.Service/Controllers/NotificationController.cs +++ b/src/notifications/Notifications.Service/Controllers/NotificationController.cs @@ -20,12 +20,13 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.Notifications.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Notifications.Service.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Notifications.Service.Controllers; diff --git a/src/notifications/Notifications.Service/Notifications.Service.csproj b/src/notifications/Notifications.Service/Notifications.Service.csproj index ec38e18f75..85e24888e2 100644 --- a/src/notifications/Notifications.Service/Notifications.Service.csproj +++ b/src/notifications/Notifications.Service/Notifications.Service.csproj @@ -33,12 +33,13 @@ - - - - + + + - + + + diff --git a/src/notifications/Notifications.Service/Program.cs b/src/notifications/Notifications.Service/Program.cs index 6a1cb785f6..530296ca27 100644 --- a/src/notifications/Notifications.Service/Program.cs +++ b/src/notifications/Notifications.Service/Program.cs @@ -18,15 +18,19 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.Web; using Org.Eclipse.TractusX.Portal.Backend.Notifications.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; +using Org.Eclipse.TractusX.Portal.Backend.Web.Initialization; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.DependencyInjection; var VERSION = "v2"; -WebApplicationBuildRunner +WebAppHelper .BuildAndRunWebApplication(args, "notification", VERSION, builder => { + builder.Services + .AddPublicInfos(); + builder.Services .AddPortalRepositories(builder.Configuration); diff --git a/src/portalbackend/PortalBackend.DBAccess/Models/CompanyApplicationWithStatus.cs b/src/portalbackend/PortalBackend.DBAccess/Models/CompanyApplicationWithStatus.cs index 9c0198d6d7..4d8e156e90 100644 --- a/src/portalbackend/PortalBackend.DBAccess/Models/CompanyApplicationWithStatus.cs +++ b/src/portalbackend/PortalBackend.DBAccess/Models/CompanyApplicationWithStatus.cs @@ -26,8 +26,10 @@ public record CompanyApplicationWithStatus ( Guid ApplicationId, CompanyApplicationStatusId ApplicationStatus, + CompanyApplicationTypeId ApplicationType, IEnumerable ApplicationChecklist ); + public record ApplicationChecklistData(ApplicationChecklistEntryTypeId TypeId, ApplicationChecklistEntryStatusId StatusId); public record CompanyApplicationDeclineData( diff --git a/src/portalbackend/PortalBackend.DBAccess/Models/DocumentSeedData.cs b/src/portalbackend/PortalBackend.DBAccess/Models/DocumentSeedData.cs index d163b1959f..bdffe6ff84 100644 --- a/src/portalbackend/PortalBackend.DBAccess/Models/DocumentSeedData.cs +++ b/src/portalbackend/PortalBackend.DBAccess/Models/DocumentSeedData.cs @@ -25,7 +25,7 @@ namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; public record DocumentSeedData( [property: JsonPropertyName("id")] Guid Id, - [property: JsonPropertyName("date_created"), Newtonsoft.Json.JsonConverter(typeof(JsonDateTimeOffsetConverter))] DateTimeOffset DateCreated, + [property: JsonPropertyName("date_created"), JsonConverter(typeof(JsonDateTimeOffsetConverter))] DateTimeOffset DateCreated, [property: JsonPropertyName("document_name")] string DocumentName, [property: JsonPropertyName("document_type_id")] int DocumentTypeId, [property: JsonPropertyName("company_user_id")] Guid? CompanyUserId, diff --git a/src/portalbackend/PortalBackend.DBAccess/PortalBackend.DBAccess.csproj b/src/portalbackend/PortalBackend.DBAccess/PortalBackend.DBAccess.csproj index dae64839c8..598e4dea3d 100644 --- a/src/portalbackend/PortalBackend.DBAccess/PortalBackend.DBAccess.csproj +++ b/src/portalbackend/PortalBackend.DBAccess/PortalBackend.DBAccess.csproj @@ -1,46 +1,45 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess - Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess - net7.0 - enable - enable - - - - - - - - - - - - - - - - - - - + + + + + Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess + Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess + net7.0 + enable + enable + + + + + + + + + + + + + + + + + + diff --git a/src/portalbackend/PortalBackend.DBAccess/Repositories/IIdentityProviderRepository.cs b/src/portalbackend/PortalBackend.DBAccess/Repositories/IIdentityProviderRepository.cs index 9020c0ab76..5eff25e538 100644 --- a/src/portalbackend/PortalBackend.DBAccess/Repositories/IIdentityProviderRepository.cs +++ b/src/portalbackend/PortalBackend.DBAccess/Repositories/IIdentityProviderRepository.cs @@ -32,15 +32,18 @@ public interface IIdentityProviderRepository void DeleteIdentityProvider(Guid identityProviderId); IamIdentityProvider CreateIamIdentityProvider(Guid identityProviderId, string idpAlias); void DeleteIamIdentityProvider(string idpAlias); + void AttachAndModifyIamIdentityProvider(string idpAlias, Action? initialize, Action modify); CompanyIdentityProvider CreateCompanyIdentityProvider(Guid companyId, Guid identityProviderId); void DeleteCompanyIdentityProvider(Guid companyId, Guid identityProviderId); void CreateCompanyIdentityProviders(IEnumerable<(Guid CompanyId, Guid IdentityProviderId)> companyIdIdentityProviderIds); Task GetSharedIdentityProviderIamAliasDataUntrackedAsync(Guid companyId); Task<(string? Alias, bool IsValidUser)> GetIdpCategoryIdByUserIdAsync(Guid companyUserId, Guid userCompanyId); - Task<(string? Alias, IdentityProviderCategoryId IamIdentityProviderCategory, bool IsOwnOrOwnerCompany, IdentityProviderTypeId TypeId)> GetOwnCompanyIdentityProviderAliasUntrackedAsync(Guid identityProviderId, Guid companyId); - Task<(string? Alias, IdentityProviderCategoryId IamIdentityProviderCategory, bool IsOwnerCompany, IdentityProviderTypeId TypeId, IEnumerable ConnectedCompanies)> GetOwnIdentityProviderWithConnectedCompanies(Guid identityProviderId, Guid companyId); - Task<(bool IsOwner, string? Alias, IdentityProviderCategoryId IdentityProviderCategory, IdentityProviderTypeId IdentityProviderTypeId, IEnumerable<(Guid CompanyId, IEnumerable Aliase)>? CompanyIdAliase, bool CompanyUsersLinked, string IdpOwnerName)> GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(Guid identityProviderId, Guid companyId, bool queryAliase); - IAsyncEnumerable<(Guid IdentityProviderId, IdentityProviderCategoryId CategoryId, string? Alias, IdentityProviderTypeId TypeId)> GetCompanyIdentityProviderCategoryDataUntracked(Guid companyId); + Task<(string? Alias, IdentityProviderCategoryId IamIdentityProviderCategory, bool IsOwnOrOwnerCompany, IdentityProviderTypeId TypeId, string? MetadataUrl)> GetOwnCompanyIdentityProviderAliasUntrackedAsync(Guid identityProviderId, Guid companyId); + Task<(string? Alias, IdentityProviderCategoryId IamIdentityProviderCategory, bool IsOwnerCompany, IdentityProviderTypeId TypeId, string? MetadataUrl, IEnumerable ConnectedCompanies)> GetOwnIdentityProviderWithConnectedCompanies(Guid identityProviderId, Guid companyId); + Task<(bool IsOwner, (string? Alias, IdentityProviderCategoryId IdentityProviderCategory, IdentityProviderTypeId IdentityProviderTypeId, string? MetadataUrl) IdentityProviderData, IEnumerable<(Guid CompanyId, IEnumerable Aliase)>? CompanyIdAliase, bool CompanyUsersLinked, string IdpOwnerName)> GetOwnCompanyIdentityProviderStatusUpdateData(Guid identityProviderId, Guid companyId, bool queryAliase); + Task<(bool IsOwner, string? Alias, IdentityProviderCategoryId IdentityProviderCategory, IdentityProviderTypeId IdentityProviderTypeId, string? MetadataUrl)> GetOwnCompanyIdentityProviderUpdateData(Guid identityProviderId, Guid companyId); + Task<(bool IsOwner, string? Alias, IdentityProviderTypeId IdentityProviderTypeId, IEnumerable<(Guid CompanyId, IEnumerable Aliase)> CompanyIdAliase, string IdpOwnerName)> GetOwnCompanyIdentityProviderUpdateDataForDelete(Guid identityProviderId, Guid companyId); + IAsyncEnumerable<(Guid IdentityProviderId, IdentityProviderCategoryId CategoryId, string? Alias, IdentityProviderTypeId TypeId, string? MetadataUrl)> GetCompanyIdentityProviderCategoryDataUntracked(Guid companyId); IAsyncEnumerable<(Guid IdentityProviderId, string Alias)> GetOwnCompanyIdentityProviderAliasDataUntracked(Guid companyId, IEnumerable identityProviderIds); Task<(Guid IdentityProviderId, string? Alias)> GetSingleManagedIdentityProviderAliasDataUntracked(Guid companyId); IAsyncEnumerable<(Guid IdentityProviderId, string? Alias)> GetManagedIdentityProviderAliasDataUntracked(Guid companyId, IEnumerable identityProviderIds); diff --git a/src/portalbackend/PortalBackend.DBAccess/Repositories/IdentityProviderRepository.cs b/src/portalbackend/PortalBackend.DBAccess/Repositories/IdentityProviderRepository.cs index d13d2554c1..7bfe327d69 100644 --- a/src/portalbackend/PortalBackend.DBAccess/Repositories/IdentityProviderRepository.cs +++ b/src/portalbackend/PortalBackend.DBAccess/Repositories/IdentityProviderRepository.cs @@ -83,6 +83,14 @@ public IamIdentityProvider CreateIamIdentityProvider(Guid identityProviderId, st public void DeleteIamIdentityProvider(string idpAlias) => _context.IamIdentityProviders.Remove(new IamIdentityProvider(idpAlias, Guid.Empty)); + public void AttachAndModifyIamIdentityProvider(string idpAlias, Action? initialize, Action modify) + { + var iamIdentityProvider = new IamIdentityProvider(idpAlias, Guid.Empty); + initialize?.Invoke(iamIdentityProvider); + _context.Attach(iamIdentityProvider); + modify(iamIdentityProvider); + } + public Task GetSharedIdentityProviderIamAliasDataUntrackedAsync(Guid companyId) => _context.IdentityProviders .AsNoTracking() @@ -104,61 +112,96 @@ public void DeleteIamIdentityProvider(string idpAlias) => true)) .SingleOrDefaultAsync(); - public Task<(string? Alias, IdentityProviderCategoryId IamIdentityProviderCategory, bool IsOwnOrOwnerCompany, IdentityProviderTypeId TypeId)> GetOwnCompanyIdentityProviderAliasUntrackedAsync(Guid identityProviderId, Guid companyId) => + public Task<(string? Alias, IdentityProviderCategoryId IamIdentityProviderCategory, bool IsOwnOrOwnerCompany, IdentityProviderTypeId TypeId, string? MetadataUrl)> GetOwnCompanyIdentityProviderAliasUntrackedAsync(Guid identityProviderId, Guid companyId) => _context.IdentityProviders .Where(identityProvider => identityProvider.Id == identityProviderId) .Select(identityProvider => - new ValueTuple( + new ValueTuple( identityProvider.IamIdentityProvider!.IamIdpAlias, identityProvider.IdentityProviderCategoryId, identityProvider.OwnerId == companyId || identityProvider.Companies.Any(company => company.Id == companyId), - identityProvider.IdentityProviderTypeId)) + identityProvider.IdentityProviderTypeId, + identityProvider.IamIdentityProvider.MetadataUrl)) .SingleOrDefaultAsync(); - public Task<(string? Alias, IdentityProviderCategoryId IamIdentityProviderCategory, bool IsOwnerCompany, IdentityProviderTypeId TypeId, IEnumerable ConnectedCompanies)> GetOwnIdentityProviderWithConnectedCompanies(Guid identityProviderId, Guid companyId) => + public Task<(string? Alias, IdentityProviderCategoryId IamIdentityProviderCategory, bool IsOwnerCompany, IdentityProviderTypeId TypeId, string? MetadataUrl, IEnumerable ConnectedCompanies)> GetOwnIdentityProviderWithConnectedCompanies(Guid identityProviderId, Guid companyId) => _context.IdentityProviders .Where(identityProvider => identityProvider.Id == identityProviderId) .Select(identityProvider => - new ValueTuple>( + new ValueTuple>( identityProvider.IamIdentityProvider!.IamIdpAlias, identityProvider.IdentityProviderCategoryId, identityProvider.OwnerId == companyId, identityProvider.IdentityProviderTypeId, - identityProvider.Companies.Select(c => new ConnectedCompanyData(c.Id, c.Name)) - )) + identityProvider.IamIdentityProvider.MetadataUrl, + identityProvider.Companies.Select(c => new ConnectedCompanyData(c.Id, c.Name)))) .SingleOrDefaultAsync(); - public Task<(bool IsOwner, string? Alias, IdentityProviderCategoryId IdentityProviderCategory, IdentityProviderTypeId IdentityProviderTypeId, IEnumerable<(Guid CompanyId, IEnumerable Aliase)>? CompanyIdAliase, bool CompanyUsersLinked, string IdpOwnerName)> GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(Guid identityProviderId, Guid companyId, bool queryAliase) => + public Task<(bool IsOwner, (string? Alias, IdentityProviderCategoryId IdentityProviderCategory, IdentityProviderTypeId IdentityProviderTypeId, string? MetadataUrl) IdentityProviderData, IEnumerable<(Guid CompanyId, IEnumerable Aliase)>? CompanyIdAliase, bool CompanyUsersLinked, string IdpOwnerName)> GetOwnCompanyIdentityProviderStatusUpdateData(Guid identityProviderId, Guid companyId, bool queryAliase) => _context.IdentityProviders .Where(identityProvider => identityProvider.Id == identityProviderId) .Select(identityProvider => - new ValueTuple)>?, bool, string>( + new ValueTuple)>?, bool, string>( + identityProvider.OwnerId == companyId, + new ValueTuple( + identityProvider.IamIdentityProvider!.IamIdpAlias, + identityProvider.IdentityProviderCategoryId, + identityProvider.IdentityProviderTypeId, + identityProvider.IamIdentityProvider.MetadataUrl), + queryAliase + ? identityProvider.Companies + .Select(c => new ValueTuple>( + c.Id, + c.IdentityProviders + .Where(i => i.IamIdentityProvider != null) + .Select(i => i.IamIdentityProvider!.IamIdpAlias))) + : null, + identityProvider.CompanyUserAssignedIdentityProviders.Any(), + identityProvider.Owner!.Name + )) + .SingleOrDefaultAsync(); + + public Task<(bool IsOwner, string? Alias, IdentityProviderCategoryId IdentityProviderCategory, IdentityProviderTypeId IdentityProviderTypeId, string? MetadataUrl)> GetOwnCompanyIdentityProviderUpdateData(Guid identityProviderId, Guid companyId) => + _context.IdentityProviders + .Where(identityProvider => identityProvider.Id == identityProviderId) + .Select(identityProvider => + new ValueTuple( identityProvider.OwnerId == companyId, identityProvider.IamIdentityProvider!.IamIdpAlias, identityProvider.IdentityProviderCategoryId, identityProvider.IdentityProviderTypeId, - queryAliase - ? identityProvider.Companies - .Select(c => new ValueTuple>( - c.Id, - c.IdentityProviders - .Where(i => i.IamIdentityProvider != null) - .Select(i => i.IamIdentityProvider!.IamIdpAlias))) - : null, - identityProvider.CompanyUserAssignedIdentityProviders.Any(), + identityProvider.IamIdentityProvider.MetadataUrl + )) + .SingleOrDefaultAsync(); + + public Task<(bool IsOwner, string? Alias, IdentityProviderTypeId IdentityProviderTypeId, IEnumerable<(Guid CompanyId, IEnumerable Aliase)> CompanyIdAliase, string IdpOwnerName)> GetOwnCompanyIdentityProviderUpdateDataForDelete(Guid identityProviderId, Guid companyId) => + _context.IdentityProviders + .Where(identityProvider => identityProvider.Id == identityProviderId) + .Select(identityProvider => + new ValueTuple)>, string>( + identityProvider.OwnerId == companyId, + identityProvider.IamIdentityProvider!.IamIdpAlias, + identityProvider.IdentityProviderTypeId, + identityProvider.Companies + .Select(c => new ValueTuple>( + c.Id, + c.IdentityProviders + .Where(i => i.IamIdentityProvider != null) + .Select(i => i.IamIdentityProvider!.IamIdpAlias))), identityProvider.Owner!.Name )) .SingleOrDefaultAsync(); - public IAsyncEnumerable<(Guid IdentityProviderId, IdentityProviderCategoryId CategoryId, string? Alias, IdentityProviderTypeId TypeId)> GetCompanyIdentityProviderCategoryDataUntracked(Guid companyId) => + public IAsyncEnumerable<(Guid IdentityProviderId, IdentityProviderCategoryId CategoryId, string? Alias, IdentityProviderTypeId TypeId, string? MetadataUrl)> GetCompanyIdentityProviderCategoryDataUntracked(Guid companyId) => _context.IdentityProviders .AsNoTracking() .Where(identityProvider => identityProvider.OwnerId == companyId || identityProvider.Companies.Any(company => company.Id == companyId)) - .Select(identityProvider => new ValueTuple( + .Select(identityProvider => new ValueTuple( identityProvider.Id, identityProvider.IdentityProviderCategoryId, identityProvider.IamIdentityProvider!.IamIdpAlias, - identityProvider.IdentityProviderTypeId + identityProvider.IdentityProviderTypeId, + identityProvider.IamIdentityProvider.MetadataUrl )) .ToAsyncEnumerable(); diff --git a/src/portalbackend/PortalBackend.DBAccess/Repositories/UserRepository.cs b/src/portalbackend/PortalBackend.DBAccess/Repositories/UserRepository.cs index e5ca10f0d3..904b33ef17 100644 --- a/src/portalbackend/PortalBackend.DBAccess/Repositories/UserRepository.cs +++ b/src/portalbackend/PortalBackend.DBAccess/Repositories/UserRepository.cs @@ -48,6 +48,7 @@ public IAsyncEnumerable GetApplicationsWithStatusU .Select(companyApplication => new CompanyApplicationWithStatus( companyApplication.Id, companyApplication.ApplicationStatusId, + companyApplication.CompanyApplicationTypeId, companyApplication.ApplicationChecklistEntries.Select(ace => new ApplicationChecklistData(ace.ApplicationChecklistEntryTypeId, ace.ApplicationChecklistEntryStatusId)))) .AsAsyncEnumerable(); diff --git a/src/portalbackend/PortalBackend.Migrations/Migrations/20240206012951_1.8.0-rc5.Designer.cs b/src/portalbackend/PortalBackend.Migrations/Migrations/20240206012951_1.8.0-rc5.Designer.cs new file mode 100644 index 0000000000..924f0db1d4 --- /dev/null +++ b/src/portalbackend/PortalBackend.Migrations/Migrations/20240206012951_1.8.0-rc5.Designer.cs @@ -0,0 +1,9209 @@ +/******************************************************************************** + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; + +#nullable disable + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.Migrations.Migrations +{ + [DbContext(typeof(PortalDbContext))] + [Migration("20240206012951_1.8.0-rc5")] + partial class _180rc5 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("portal") + .UseCollation("en_US.utf8") + .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditAppSubscriptionDetail20221118", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AppInstanceId") + .HasColumnType("uuid") + .HasColumnName("app_instance_id"); + + b.Property("AppSubscriptionUrl") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("app_subscription_url"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferSubscriptionId") + .HasColumnType("uuid") + .HasColumnName("offer_subscription_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_app_subscription_detail20221118"); + + b.ToTable("audit_app_subscription_detail20221118", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditAppSubscriptionDetail20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AppInstanceId") + .HasColumnType("uuid") + .HasColumnName("app_instance_id"); + + b.Property("AppSubscriptionUrl") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("app_subscription_url"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferSubscriptionId") + .HasColumnType("uuid") + .HasColumnName("offer_subscription_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_app_subscription_detail20231115"); + + b.ToTable("audit_app_subscription_detail20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanyApplication20221005", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("ApplicationStatusId") + .HasColumnType("integer") + .HasColumnName("application_status_id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_application20221005"); + + b.ToTable("audit_company_application20221005", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanyApplication20230214", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("ApplicationStatusId") + .HasColumnType("integer") + .HasColumnName("application_status_id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("ChecklistProcessId") + .HasColumnType("uuid") + .HasColumnName("checklist_process_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_application20230214"); + + b.ToTable("audit_company_application20230214", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanyApplication20230824", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("ApplicationStatusId") + .HasColumnType("integer") + .HasColumnName("application_status_id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("ChecklistProcessId") + .HasColumnType("uuid") + .HasColumnName("checklist_process_id"); + + b.Property("CompanyApplicationTypeId") + .HasColumnType("integer") + .HasColumnName("company_application_type_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OnboardingServiceProviderId") + .HasColumnType("uuid") + .HasColumnName("onboarding_service_provider_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_application20230824"); + + b.ToTable("audit_company_application20230824", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanyApplication20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("ApplicationStatusId") + .HasColumnType("integer") + .HasColumnName("application_status_id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("ChecklistProcessId") + .HasColumnType("uuid") + .HasColumnName("checklist_process_id"); + + b.Property("CompanyApplicationTypeId") + .HasColumnType("integer") + .HasColumnName("company_application_type_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OnboardingServiceProviderId") + .HasColumnType("uuid") + .HasColumnName("onboarding_service_provider_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_application20231115"); + + b.ToTable("audit_company_application20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanyAssignedRole2023316", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyRoleId") + .HasColumnType("integer") + .HasColumnName("company_role_id"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_assigned_role2023316"); + + b.ToTable("audit_company_assigned_role2023316", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanySsiDetail20230621", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanySsiDetailStatusId") + .HasColumnType("integer") + .HasColumnName("company_ssi_detail_status_id"); + + b.Property("CreatorUserId") + .HasColumnType("uuid") + .HasColumnName("creator_user_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("ExpiryDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("expiry_date"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("VerifiedCredentialExternalTypeUseCaseDetailId") + .HasColumnType("uuid") + .HasColumnName("verified_credential_external_type_use_case_detail_id"); + + b.Property("VerifiedCredentialTypeId") + .HasColumnType("integer") + .HasColumnName("verified_credential_type_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_ssi_detail20230621"); + + b.ToTable("audit_company_ssi_detail20230621", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanySsiDetail20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanySsiDetailStatusId") + .HasColumnType("integer") + .HasColumnName("company_ssi_detail_status_id"); + + b.Property("CreatorUserId") + .HasColumnType("uuid") + .HasColumnName("creator_user_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("ExpiryDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("expiry_date"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("VerifiedCredentialExternalTypeUseCaseDetailId") + .HasColumnType("uuid") + .HasColumnName("verified_credential_external_type_use_case_detail_id"); + + b.Property("VerifiedCredentialTypeId") + .HasColumnType("integer") + .HasColumnName("verified_credential_type_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_ssi_detail20231115"); + + b.ToTable("audit_company_ssi_detail20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanyUser20221005", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyUserStatusId") + .HasColumnType("integer") + .HasColumnName("company_user_status_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Email") + .HasColumnType("text") + .HasColumnName("email"); + + b.Property("Firstname") + .HasColumnType("text") + .HasColumnName("firstname"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("Lastlogin") + .HasColumnType("bytea") + .HasColumnName("lastlogin"); + + b.Property("Lastname") + .HasColumnType("text") + .HasColumnName("lastname"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_user20221005"); + + b.ToTable("audit_company_user20221005", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanyUser20230522", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Email") + .HasColumnType("text") + .HasColumnName("email"); + + b.Property("Firstname") + .HasColumnType("text") + .HasColumnName("firstname"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("Lastlogin") + .HasColumnType("bytea") + .HasColumnName("lastlogin"); + + b.Property("Lastname") + .HasColumnType("text") + .HasColumnName("lastname"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_user20230523"); + + b.ToTable("audit_company_user20230523", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditCompanyUserAssignedRole20221018", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("UserRoleId") + .HasColumnType("uuid") + .HasColumnName("user_role_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_company_user_assigned_role20221018"); + + b.ToTable("audit_company_user_assigned_role20221018", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditConnector20230405", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("ConnectorUrl") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("connector_url"); + + b.Property("DapsRegistrationSuccessful") + .HasColumnType("boolean") + .HasColumnName("daps_registration_successful"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("HostId") + .HasColumnType("uuid") + .HasColumnName("host_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("LocationId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("location_id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("ProviderId") + .HasColumnType("uuid") + .HasColumnName("provider_id"); + + b.Property("SelfDescriptionDocumentId") + .HasColumnType("uuid") + .HasColumnName("self_description_document_id"); + + b.Property("SelfDescriptionMessage") + .HasColumnType("text") + .HasColumnName("self_description_message"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("type_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_connector20230405"); + + b.ToTable("audit_connector20230405", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditConnector20230503", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyServiceAccountId") + .HasColumnType("uuid") + .HasColumnName("company_service_account_id"); + + b.Property("ConnectorUrl") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("connector_url"); + + b.Property("DapsRegistrationSuccessful") + .HasColumnType("boolean") + .HasColumnName("daps_registration_successful"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("HostId") + .HasColumnType("uuid") + .HasColumnName("host_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("LocationId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("location_id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("ProviderId") + .HasColumnType("uuid") + .HasColumnName("provider_id"); + + b.Property("SelfDescriptionDocumentId") + .HasColumnType("uuid") + .HasColumnName("self_description_document_id"); + + b.Property("SelfDescriptionMessage") + .HasColumnType("text") + .HasColumnName("self_description_message"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("type_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_connector20230503"); + + b.ToTable("audit_connector20230503", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditConnector20230803", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyServiceAccountId") + .HasColumnType("uuid") + .HasColumnName("company_service_account_id"); + + b.Property("ConnectorUrl") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("connector_url"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("HostId") + .HasColumnType("uuid") + .HasColumnName("host_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("LocationId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("location_id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("ProviderId") + .HasColumnType("uuid") + .HasColumnName("provider_id"); + + b.Property("SelfDescriptionDocumentId") + .HasColumnType("uuid") + .HasColumnName("self_description_document_id"); + + b.Property("SelfDescriptionMessage") + .HasColumnType("text") + .HasColumnName("self_description_message"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("type_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_connector20230803"); + + b.ToTable("audit_connector20230803", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditConnector20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyServiceAccountId") + .HasColumnType("uuid") + .HasColumnName("company_service_account_id"); + + b.Property("ConnectorUrl") + .HasColumnType("text") + .HasColumnName("connector_url"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("HostId") + .HasColumnType("uuid") + .HasColumnName("host_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("LocationId") + .HasColumnType("text") + .HasColumnName("location_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("ProviderId") + .HasColumnType("uuid") + .HasColumnName("provider_id"); + + b.Property("SelfDescriptionDocumentId") + .HasColumnType("uuid") + .HasColumnName("self_description_document_id"); + + b.Property("SelfDescriptionMessage") + .HasColumnType("text") + .HasColumnName("self_description_message"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("type_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_connector20231115"); + + b.ToTable("audit_connector20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditConsent20230412", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AgreementId") + .HasColumnType("uuid") + .HasColumnName("agreement_id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("Comment") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("ConsentStatusId") + .HasColumnType("integer") + .HasColumnName("consent_status_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("Target") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("target"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_consent20230412"); + + b.ToTable("audit_consent20230412", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditConsent20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AgreementId") + .HasColumnType("uuid") + .HasColumnName("agreement_id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("ConsentStatusId") + .HasColumnType("integer") + .HasColumnName("consent_status_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_consent20231115"); + + b.ToTable("audit_consent20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditDocument20231108", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DocumentContent") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("document_content"); + + b.Property("DocumentHash") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("document_hash"); + + b.Property("DocumentName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("document_name"); + + b.Property("DocumentStatusId") + .HasColumnType("integer") + .HasColumnName("document_status_id"); + + b.Property("DocumentTypeId") + .HasColumnType("integer") + .HasColumnName("document_type_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("MediaTypeId") + .HasColumnType("integer") + .HasColumnName("media_type_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_document20231108"); + + b.ToTable("audit_document20231108", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditDocument20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DocumentContent") + .HasColumnType("bytea") + .HasColumnName("document_content"); + + b.Property("DocumentHash") + .HasColumnType("bytea") + .HasColumnName("document_hash"); + + b.Property("DocumentName") + .HasColumnType("text") + .HasColumnName("document_name"); + + b.Property("DocumentStatusId") + .HasColumnType("integer") + .HasColumnName("document_status_id"); + + b.Property("DocumentTypeId") + .HasColumnType("integer") + .HasColumnName("document_type_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("MediaTypeId") + .HasColumnType("integer") + .HasColumnName("media_type_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_document20231115"); + + b.ToTable("audit_document20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditIdentity20230526", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("IdentityTypeId") + .HasColumnType("integer") + .HasColumnName("identity_type_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("UserEntityId") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("user_entity_id"); + + b.Property("UserStatusId") + .HasColumnType("integer") + .HasColumnName("user_status_id") + .HasAnnotation("Relational:JsonPropertyName", "user_status_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_identity20230526"); + + b.ToTable("audit_identity20230526", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditIdentity20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("IdentityTypeId") + .HasColumnType("integer") + .HasColumnName("identity_type_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("UserEntityId") + .HasColumnType("text") + .HasColumnName("user_entity_id"); + + b.Property("UserStatusId") + .HasColumnType("integer") + .HasColumnName("user_status_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_identity20231115"); + + b.ToTable("audit_identity20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditIdentityAssignedRole20230522", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("IdentityId") + .HasColumnType("uuid") + .HasColumnName("identity_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("UserRoleId") + .HasColumnType("uuid") + .HasColumnName("user_role_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_identity_assigned_role20230522"); + + b.ToTable("audit_identity_assigned_role20230522", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditOffer20230119", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("ContactEmail") + .HasColumnType("text") + .HasColumnName("contact_email"); + + b.Property("ContactNumber") + .HasColumnType("text") + .HasColumnName("contact_number"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DateReleased") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_released"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("MarketingUrl") + .HasColumnType("text") + .HasColumnName("marketing_url"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("OfferStatusId") + .HasColumnType("integer") + .HasColumnName("offer_status_id"); + + b.Property("OfferTypeId") + .HasColumnType("integer") + .HasColumnName("offer_type_id"); + + b.Property("Provider") + .IsRequired() + .HasColumnType("text") + .HasColumnName("provider"); + + b.Property("ProviderCompanyId") + .HasColumnType("uuid") + .HasColumnName("provider_company_id"); + + b.Property("SalesManagerId") + .HasColumnType("uuid") + .HasColumnName("sales_manager_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_offer20230119"); + + b.ToTable("audit_offer20230119", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditOffer20230406", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("ContactEmail") + .HasColumnType("text") + .HasColumnName("contact_email"); + + b.Property("ContactNumber") + .HasColumnType("text") + .HasColumnName("contact_number"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DateReleased") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_released"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("LicenseTypeId") + .HasColumnType("integer") + .HasColumnName("license_type_id"); + + b.Property("MarketingUrl") + .HasColumnType("text") + .HasColumnName("marketing_url"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("OfferStatusId") + .HasColumnType("integer") + .HasColumnName("offer_status_id"); + + b.Property("OfferTypeId") + .HasColumnType("integer") + .HasColumnName("offer_type_id"); + + b.Property("Provider") + .IsRequired() + .HasColumnType("text") + .HasColumnName("provider"); + + b.Property("ProviderCompanyId") + .HasColumnType("uuid") + .HasColumnName("provider_company_id"); + + b.Property("SalesManagerId") + .HasColumnType("uuid") + .HasColumnName("sales_manager_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_offer20230406"); + + b.ToTable("audit_offer20230406", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditOffer20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("ContactEmail") + .HasColumnType("text") + .HasColumnName("contact_email"); + + b.Property("ContactNumber") + .HasColumnType("text") + .HasColumnName("contact_number"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DateReleased") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_released"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("LicenseTypeId") + .HasColumnType("integer") + .HasColumnName("license_type_id"); + + b.Property("MarketingUrl") + .HasColumnType("text") + .HasColumnName("marketing_url"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("OfferStatusId") + .HasColumnType("integer") + .HasColumnName("offer_status_id"); + + b.Property("OfferTypeId") + .HasColumnType("integer") + .HasColumnName("offer_type_id"); + + b.Property("Provider") + .HasColumnType("text") + .HasColumnName("provider"); + + b.Property("ProviderCompanyId") + .HasColumnType("uuid") + .HasColumnName("provider_company_id"); + + b.Property("SalesManagerId") + .HasColumnType("uuid") + .HasColumnName("sales_manager_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_offer20231115"); + + b.ToTable("audit_offer20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditOfferSubscription20221005", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DisplayName") + .HasColumnType("text") + .HasColumnName("display_name"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("OfferSubscriptionStatusId") + .HasColumnType("integer") + .HasColumnName("offer_subscription_status_id"); + + b.Property("RequesterId") + .HasColumnType("uuid") + .HasColumnName("requester_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_offer_subscription20221005"); + + b.ToTable("audit_offer_subscription20221005", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditOfferSubscription20230317", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DisplayName") + .HasColumnType("text") + .HasColumnName("display_name"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("OfferSubscriptionStatusId") + .HasColumnType("integer") + .HasColumnName("offer_subscription_status_id"); + + b.Property("ProcessId") + .HasColumnType("uuid") + .HasColumnName("process_id"); + + b.Property("RequesterId") + .HasColumnType("uuid") + .HasColumnName("requester_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_offer_subscription20230317"); + + b.ToTable("audit_offer_subscription20230317", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditOfferSubscription20231013", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DisplayName") + .HasColumnType("text") + .HasColumnName("display_name"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("OfferSubscriptionStatusId") + .HasColumnType("integer") + .HasColumnName("offer_subscription_status_id"); + + b.Property("ProcessId") + .HasColumnType("uuid") + .HasColumnName("process_id"); + + b.Property("RequesterId") + .HasColumnType("uuid") + .HasColumnName("requester_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_offer_subscription20231013"); + + b.ToTable("audit_offer_subscription20231013", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditOfferSubscription20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DisplayName") + .HasColumnType("text") + .HasColumnName("display_name"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("OfferSubscriptionStatusId") + .HasColumnType("integer") + .HasColumnName("offer_subscription_status_id"); + + b.Property("ProcessId") + .HasColumnType("uuid") + .HasColumnName("process_id"); + + b.Property("RequesterId") + .HasColumnType("uuid") + .HasColumnName("requester_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_offer_subscription20231115"); + + b.ToTable("audit_offer_subscription20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditProviderCompanyDetail20230614", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("AutoSetupCallbackUrl") + .HasColumnType("text") + .HasColumnName("auto_setup_callback_url"); + + b.Property("AutoSetupUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("auto_setup_url"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_provider_company_detail20230614"); + + b.ToTable("audit_provider_company_detail20230614", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditProviderCompanyDetail20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("AutoSetupCallbackUrl") + .HasColumnType("text") + .HasColumnName("auto_setup_callback_url"); + + b.Property("AutoSetupUrl") + .HasColumnType("text") + .HasColumnName("auto_setup_url"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_provider_company_detail20231115"); + + b.ToTable("audit_provider_company_detail20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditUserRole20221017", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("UserRoleText") + .IsRequired() + .HasColumnType("text") + .HasColumnName("user_role"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_user_role20221017"); + + b.ToTable("audit_user_role20221017", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.AuditEntities.AuditUserRole20231115", b => + { + b.Property("AuditV1Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("audit_v1id"); + + b.Property("AuditV1DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("audit_v1date_last_changed"); + + b.Property("AuditV1LastEditorId") + .HasColumnType("uuid") + .HasColumnName("audit_v1last_editor_id"); + + b.Property("AuditV1OperationId") + .HasColumnType("integer") + .HasColumnName("audit_v1operation_id"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("UserRoleText") + .HasColumnType("text") + .HasColumnName("user_role"); + + b.HasKey("AuditV1Id") + .HasName("pk_audit_user_role20231115"); + + b.ToTable("audit_user_role20231115", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompanyCertificateStatusId") + .HasColumnType("integer") + .HasColumnName("company_certificate_status_id"); + + b.Property("CompanyCertificateTypeId") + .HasColumnType("integer") + .HasColumnName("company_certificate_type_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("ValidFrom") + .HasColumnType("timestamp with time zone") + .HasColumnName("valid_from"); + + b.Property("ValidTill") + .HasColumnType("timestamp with time zone") + .HasColumnName("valid_till"); + + b.HasKey("Id") + .HasName("pk_company_certificates"); + + b.HasIndex("CompanyCertificateStatusId") + .HasDatabaseName("ix_company_certificates_company_certificate_status_id"); + + b.HasIndex("CompanyCertificateTypeId") + .HasDatabaseName("ix_company_certificates_company_certificate_type_id"); + + b.HasIndex("CompanyId") + .HasDatabaseName("ix_company_certificates_company_id"); + + b.HasIndex("DocumentId") + .HasDatabaseName("ix_company_certificates_document_id"); + + b.ToTable("company_certificates", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_certificate_statuses"); + + b.ToTable("company_certificate_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "IN_REVIEW" + }, + new + { + Id = 2, + Label = "ACTIVE" + }, + new + { + Id = 3, + Label = "INACTVIE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_certificate_types"); + + b.ToTable("company_certificate_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "AEO_CTPAT_Security_Declaration" + }, + new + { + Id = 2, + Label = "ISO_9001" + }, + new + { + Id = 3, + Label = "IATF_16949" + }, + new + { + Id = 4, + Label = "ISO_14001_EMAS_or_national_certification" + }, + new + { + Id = 5, + Label = "ISO_45001_OHSAS_18001_or_national_certification" + }, + new + { + Id = 6, + Label = "ISO_IEC_27001" + }, + new + { + Id = 7, + Label = "ISO_50001_or_national_certification" + }, + new + { + Id = 8, + Label = "ISO_IEC_17025" + }, + new + { + Id = 9, + Label = "ISO_15504_SPICE" + }, + new + { + Id = 10, + Label = "B_BBEE_Certificate_of_South_Africa" + }, + new + { + Id = 11, + Label = "IATF" + }, + new + { + Id = 12, + Label = "TISAX" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeAssignedStatus", b => + { + b.Property("CompanyCertificateTypeId") + .HasColumnType("integer") + .HasColumnName("company_certificate_type_id"); + + b.Property("CompanyCertificateTypeStatusId") + .HasColumnType("integer") + .HasColumnName("company_certificate_type_status_id"); + + b.HasKey("CompanyCertificateTypeId") + .HasName("pk_company_certificate_type_assigned_statuses"); + + b.HasIndex("CompanyCertificateTypeStatusId") + .HasDatabaseName("ix_company_certificate_type_assigned_statuses_company_certific"); + + b.ToTable("company_certificate_type_assigned_statuses", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeDescription", b => + { + b.Property("CompanyCertificateTypeId") + .HasColumnType("integer") + .HasColumnName("company_certificate_type_id"); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text") + .HasColumnName("description"); + + b.HasKey("CompanyCertificateTypeId", "LanguageShortName") + .HasName("pk_company_certificate_type_descriptions"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_company_certificate_type_descriptions_language_short_name"); + + b.ToTable("company_certificate_type_descriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_certificate_type_statuses"); + + b.ToTable("company_certificate_type_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "ACTIVE" + }, + new + { + Id = 2, + Label = "INACTVIE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Address", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("City") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("city"); + + b.Property("CountryAlpha2Code") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("country_alpha2code") + .HasAnnotation("Relational:JsonPropertyName", "country_alpha2code"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Region") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("region"); + + b.Property("Streetadditional") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("streetadditional"); + + b.Property("Streetname") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("streetname"); + + b.Property("Streetnumber") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("streetnumber"); + + b.Property("Zipcode") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("zipcode"); + + b.HasKey("Id") + .HasName("pk_addresses"); + + b.HasIndex("CountryAlpha2Code") + .HasDatabaseName("ix_addresses_country_alpha2code"); + + b.ToTable("addresses", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Agreement", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AgreementCategoryId") + .HasColumnType("integer") + .HasColumnName("agreement_category_id"); + + b.Property("AgreementLink") + .HasColumnType("text") + .HasColumnName("agreement_link"); + + b.Property("AgreementStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(1) + .HasColumnName("agreement_status_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("IssuerCompanyId") + .HasColumnType("uuid") + .HasColumnName("issuer_company_id"); + + b.Property("Mandatory") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true) + .HasColumnName("mandatory"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("UseCaseId") + .HasColumnType("uuid") + .HasColumnName("use_case_id"); + + b.HasKey("Id") + .HasName("pk_agreements"); + + b.HasIndex("AgreementCategoryId") + .HasDatabaseName("ix_agreements_agreement_category_id"); + + b.HasIndex("AgreementStatusId") + .HasDatabaseName("ix_agreements_agreement_status_id"); + + b.HasIndex("DocumentId") + .HasDatabaseName("ix_agreements_document_id"); + + b.HasIndex("IssuerCompanyId") + .HasDatabaseName("ix_agreements_issuer_company_id"); + + b.HasIndex("UseCaseId") + .HasDatabaseName("ix_agreements_use_case_id"); + + b.ToTable("agreements", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementAssignedCompanyRole", b => + { + b.Property("AgreementId") + .HasColumnType("uuid") + .HasColumnName("agreement_id"); + + b.Property("CompanyRoleId") + .HasColumnType("integer") + .HasColumnName("company_role_id"); + + b.HasKey("AgreementId", "CompanyRoleId") + .HasName("pk_agreement_assigned_company_roles"); + + b.HasIndex("CompanyRoleId") + .HasDatabaseName("ix_agreement_assigned_company_roles_company_role_id"); + + b.ToTable("agreement_assigned_company_roles", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementAssignedOffer", b => + { + b.Property("AgreementId") + .HasColumnType("uuid") + .HasColumnName("agreement_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.HasKey("AgreementId", "OfferId") + .HasName("pk_agreement_assigned_offers"); + + b.HasIndex("OfferId") + .HasDatabaseName("ix_agreement_assigned_offers_offer_id"); + + b.ToTable("agreement_assigned_offers", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementAssignedOfferType", b => + { + b.Property("AgreementId") + .HasColumnType("uuid") + .HasColumnName("agreement_id"); + + b.Property("OfferTypeId") + .HasColumnType("integer") + .HasColumnName("offer_type_id"); + + b.HasKey("AgreementId", "OfferTypeId") + .HasName("pk_agreement_assigned_offer_types"); + + b.HasIndex("OfferTypeId") + .HasDatabaseName("ix_agreement_assigned_offer_types_offer_type_id"); + + b.ToTable("agreement_assigned_offer_types", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementCategory", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_agreement_categories"); + + b.ToTable("agreement_categories", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "CX_FRAME_CONTRACT" + }, + new + { + Id = 2, + Label = "APP_CONTRACT" + }, + new + { + Id = 3, + Label = "DATA_CONTRACT" + }, + new + { + Id = 4, + Label = "SERVICE_CONTRACT" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_agreement_statuses"); + + b.ToTable("agreement_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "ACTIVE" + }, + new + { + Id = 2, + Label = "INACTIVE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppAssignedUseCase", b => + { + b.Property("AppId") + .HasColumnType("uuid") + .HasColumnName("app_id"); + + b.Property("UseCaseId") + .HasColumnType("uuid") + .HasColumnName("use_case_id"); + + b.HasKey("AppId", "UseCaseId") + .HasName("pk_app_assigned_use_cases"); + + b.HasIndex("UseCaseId") + .HasDatabaseName("ix_app_assigned_use_cases_use_case_id"); + + b.ToTable("app_assigned_use_cases", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstance", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AppId") + .HasColumnType("uuid") + .HasColumnName("app_id"); + + b.Property("IamClientId") + .HasColumnType("uuid") + .HasColumnName("iam_client_id"); + + b.HasKey("Id") + .HasName("pk_app_instances"); + + b.HasIndex("AppId") + .HasDatabaseName("ix_app_instances_app_id"); + + b.HasIndex("IamClientId") + .HasDatabaseName("ix_app_instances_iam_client_id"); + + b.ToTable("app_instances", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstanceAssignedCompanyServiceAccount", b => + { + b.Property("AppInstanceId") + .HasColumnType("uuid") + .HasColumnName("app_instance_id"); + + b.Property("CompanyServiceAccountId") + .HasColumnType("uuid") + .HasColumnName("company_service_account_id"); + + b.HasKey("AppInstanceId", "CompanyServiceAccountId") + .HasName("pk_app_instance_assigned_service_accounts"); + + b.HasIndex("CompanyServiceAccountId") + .HasDatabaseName("ix_app_instance_assigned_service_accounts_company_service_acco"); + + b.ToTable("app_instance_assigned_service_accounts", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstanceSetup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AppId") + .HasColumnType("uuid") + .HasColumnName("app_id"); + + b.Property("InstanceUrl") + .HasColumnType("text") + .HasColumnName("instance_url"); + + b.Property("IsSingleInstance") + .HasColumnType("boolean") + .HasColumnName("is_single_instance"); + + b.HasKey("Id") + .HasName("pk_app_instance_setups"); + + b.HasIndex("AppId") + .IsUnique() + .HasDatabaseName("ix_app_instance_setups_app_id"); + + b.ToTable("app_instance_setups", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppLanguage", b => + { + b.Property("AppId") + .HasColumnType("uuid") + .HasColumnName("app_id"); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name"); + + b.HasKey("AppId", "LanguageShortName") + .HasName("pk_app_languages"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_app_languages_language_short_name"); + + b.ToTable("app_languages", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppSubscriptionDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AppInstanceId") + .HasColumnType("uuid") + .HasColumnName("app_instance_id"); + + b.Property("AppSubscriptionUrl") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("app_subscription_url"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferSubscriptionId") + .HasColumnType("uuid") + .HasColumnName("offer_subscription_id"); + + b.HasKey("Id") + .HasName("pk_app_subscription_details"); + + b.HasIndex("AppInstanceId") + .HasDatabaseName("ix_app_subscription_details_app_instance_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_app_subscription_details_last_editor_id"); + + b.HasIndex("OfferSubscriptionId") + .IsUnique() + .HasDatabaseName("ix_app_subscription_details_offer_subscription_id"); + + b.ToTable("app_subscription_details", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_APPSUBSCRIPTIONDETAIL"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_APPSUBSCRIPTIONDETAIL"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_APPSUBSCRIPTIONDETAIL", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_APPSUBSCRIPTIONDETAIL\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_APPSUBSCRIPTIONDETAIL$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_app_subscription_detail20231115\" (\"id\", \"offer_subscription_id\", \"app_instance_id\", \"app_subscription_url\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"offer_subscription_id\", \r\n NEW.\"app_instance_id\", \r\n NEW.\"app_subscription_url\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_APPSUBSCRIPTIONDETAIL$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_APPSUBSCRIPTIONDETAIL AFTER INSERT\r\nON \"portal\".\"app_subscription_details\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_APPSUBSCRIPTIONDETAIL\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_APPSUBSCRIPTIONDETAIL", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_APPSUBSCRIPTIONDETAIL\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_APPSUBSCRIPTIONDETAIL$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_app_subscription_detail20231115\" (\"id\", \"offer_subscription_id\", \"app_instance_id\", \"app_subscription_url\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"offer_subscription_id\", \r\n NEW.\"app_instance_id\", \r\n NEW.\"app_subscription_url\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_APPSUBSCRIPTIONDETAIL$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_APPSUBSCRIPTIONDETAIL AFTER UPDATE\r\nON \"portal\".\"app_subscription_details\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_APPSUBSCRIPTIONDETAIL\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ApplicationChecklistEntry", b => + { + b.Property("ApplicationId") + .HasColumnType("uuid") + .HasColumnName("application_id"); + + b.Property("ApplicationChecklistEntryTypeId") + .HasColumnType("integer") + .HasColumnName("application_checklist_entry_type_id"); + + b.Property("ApplicationChecklistEntryStatusId") + .HasColumnType("integer") + .HasColumnName("application_checklist_entry_status_id"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.HasKey("ApplicationId", "ApplicationChecklistEntryTypeId") + .HasName("pk_application_checklist"); + + b.HasIndex("ApplicationChecklistEntryStatusId") + .HasDatabaseName("ix_application_checklist_application_checklist_entry_status_id"); + + b.HasIndex("ApplicationChecklistEntryTypeId") + .HasDatabaseName("ix_application_checklist_application_checklist_entry_type_id"); + + b.ToTable("application_checklist", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ApplicationChecklistEntryStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_application_checklist_statuses"); + + b.ToTable("application_checklist_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "TO_DO" + }, + new + { + Id = 2, + Label = "IN_PROGRESS" + }, + new + { + Id = 3, + Label = "DONE" + }, + new + { + Id = 4, + Label = "FAILED" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ApplicationChecklistEntryType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_application_checklist_types"); + + b.ToTable("application_checklist_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "REGISTRATION_VERIFICATION" + }, + new + { + Id = 2, + Label = "BUSINESS_PARTNER_NUMBER" + }, + new + { + Id = 3, + Label = "IDENTITY_WALLET" + }, + new + { + Id = 4, + Label = "CLEARING_HOUSE" + }, + new + { + Id = 5, + Label = "SELF_DESCRIPTION_LP" + }, + new + { + Id = 6, + Label = "APPLICATION_ACTIVATION" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AuditOperation", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_audit_operation"); + + b.ToTable("audit_operation", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "INSERT" + }, + new + { + Id = 2, + Label = "UPDATE" + }, + new + { + Id = 3, + Label = "DELETE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.BpdmIdentifier", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_bpdm_identifiers"); + + b.ToTable("bpdm_identifiers", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "EU_VAT_ID_DE" + }, + new + { + Id = 2, + Label = "CH_UID" + }, + new + { + Id = 3, + Label = "EU_VAT_ID_FR" + }, + new + { + Id = 4, + Label = "FR_SIREN" + }, + new + { + Id = 5, + Label = "EU_VAT_ID_AT" + }, + new + { + Id = 6, + Label = "DE_BNUM" + }, + new + { + Id = 7, + Label = "CZ_ICO" + }, + new + { + Id = 8, + Label = "EU_VAT_ID_CZ" + }, + new + { + Id = 9, + Label = "EU_VAT_ID_PL" + }, + new + { + Id = 10, + Label = "EU_VAT_ID_BE" + }, + new + { + Id = 11, + Label = "EU_VAT_ID_CH" + }, + new + { + Id = 12, + Label = "EU_VAT_ID_DK" + }, + new + { + Id = 13, + Label = "EU_VAT_ID_ES" + }, + new + { + Id = 14, + Label = "EU_VAT_ID_GB" + }, + new + { + Id = 15, + Label = "EU_VAT_ID_NO" + }, + new + { + Id = 16, + Label = "BE_ENT_NO" + }, + new + { + Id = 17, + Label = "CVR_DK" + }, + new + { + Id = 18, + Label = "ID_CRN" + }, + new + { + Id = 19, + Label = "NO_ORGID" + }, + new + { + Id = 20, + Label = "LEI_ID" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AddressId") + .HasColumnType("uuid") + .HasColumnName("address_id"); + + b.Property("BusinessPartnerNumber") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("business_partner_number"); + + b.Property("CompanyStatusId") + .HasColumnType("integer") + .HasColumnName("company_status_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("SelfDescriptionDocumentId") + .HasColumnType("uuid") + .HasColumnName("self_description_document_id"); + + b.Property("Shortname") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("shortname"); + + b.HasKey("Id") + .HasName("pk_companies"); + + b.HasIndex("AddressId") + .HasDatabaseName("ix_companies_address_id"); + + b.HasIndex("CompanyStatusId") + .HasDatabaseName("ix_companies_company_status_id"); + + b.HasIndex("SelfDescriptionDocumentId") + .HasDatabaseName("ix_companies_self_description_document_id"); + + b.ToTable("companies", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ApplicationStatusId") + .HasColumnType("integer") + .HasColumnName("application_status_id"); + + b.Property("ChecklistProcessId") + .HasColumnType("uuid") + .HasColumnName("checklist_process_id"); + + b.Property("CompanyApplicationTypeId") + .HasColumnType("integer") + .HasColumnName("company_application_type_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OnboardingServiceProviderId") + .HasColumnType("uuid") + .HasColumnName("onboarding_service_provider_id"); + + b.HasKey("Id") + .HasName("pk_company_applications"); + + b.HasIndex("ApplicationStatusId") + .HasDatabaseName("ix_company_applications_application_status_id"); + + b.HasIndex("ChecklistProcessId") + .IsUnique() + .HasDatabaseName("ix_company_applications_checklist_process_id"); + + b.HasIndex("CompanyApplicationTypeId") + .HasDatabaseName("ix_company_applications_company_application_type_id"); + + b.HasIndex("CompanyId") + .HasDatabaseName("ix_company_applications_company_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_company_applications_last_editor_id"); + + b.HasIndex("OnboardingServiceProviderId") + .HasDatabaseName("ix_company_applications_onboarding_service_provider_id"); + + b.ToTable("company_applications", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_COMPANYAPPLICATION"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_COMPANYAPPLICATION"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_COMPANYAPPLICATION", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_COMPANYAPPLICATION\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_COMPANYAPPLICATION$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_company_application20231115\" (\"id\", \"date_created\", \"date_last_changed\", \"application_status_id\", \"company_id\", \"checklist_process_id\", \"company_application_type_id\", \"onboarding_service_provider_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"application_status_id\", \r\n NEW.\"company_id\", \r\n NEW.\"checklist_process_id\", \r\n NEW.\"company_application_type_id\", \r\n NEW.\"onboarding_service_provider_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_COMPANYAPPLICATION$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_COMPANYAPPLICATION AFTER INSERT\r\nON \"portal\".\"company_applications\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_COMPANYAPPLICATION\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_COMPANYAPPLICATION", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_COMPANYAPPLICATION\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_COMPANYAPPLICATION$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_company_application20231115\" (\"id\", \"date_created\", \"date_last_changed\", \"application_status_id\", \"company_id\", \"checklist_process_id\", \"company_application_type_id\", \"onboarding_service_provider_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"application_status_id\", \r\n NEW.\"company_id\", \r\n NEW.\"checklist_process_id\", \r\n NEW.\"company_application_type_id\", \r\n NEW.\"onboarding_service_provider_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_COMPANYAPPLICATION$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_COMPANYAPPLICATION AFTER UPDATE\r\nON \"portal\".\"company_applications\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_COMPANYAPPLICATION\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplicationStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_application_statuses"); + + b.ToTable("company_application_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "CREATED" + }, + new + { + Id = 2, + Label = "ADD_COMPANY_DATA" + }, + new + { + Id = 3, + Label = "INVITE_USER" + }, + new + { + Id = 4, + Label = "SELECT_COMPANY_ROLE" + }, + new + { + Id = 5, + Label = "UPLOAD_DOCUMENTS" + }, + new + { + Id = 6, + Label = "VERIFY" + }, + new + { + Id = 7, + Label = "SUBMITTED" + }, + new + { + Id = 8, + Label = "CONFIRMED" + }, + new + { + Id = 9, + Label = "DECLINED" + }, + new + { + Id = 10, + Label = "CANCELLED_BY_CUSTOMER" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplicationType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_application_types"); + + b.ToTable("company_application_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "INTERNAL" + }, + new + { + Id = 2, + Label = "EXTERNAL" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyAssignedRole", b => + { + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyRoleId") + .HasColumnType("integer") + .HasColumnName("company_role_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.HasKey("CompanyId", "CompanyRoleId") + .HasName("pk_company_assigned_roles"); + + b.HasIndex("CompanyRoleId") + .HasDatabaseName("ix_company_assigned_roles_company_role_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_company_assigned_roles_last_editor_id"); + + b.ToTable("company_assigned_roles", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_COMPANYASSIGNEDROLE"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_COMPANYASSIGNEDROLE"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_COMPANYASSIGNEDROLE", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_COMPANYASSIGNEDROLE\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_COMPANYASSIGNEDROLE$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_company_assigned_role2023316\" (\"company_id\", \"company_role_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"company_id\", \r\n NEW.\"company_role_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_COMPANYASSIGNEDROLE$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_COMPANYASSIGNEDROLE AFTER INSERT\r\nON \"portal\".\"company_assigned_roles\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_COMPANYASSIGNEDROLE\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_COMPANYASSIGNEDROLE", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_COMPANYASSIGNEDROLE\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_COMPANYASSIGNEDROLE$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_company_assigned_role2023316\" (\"company_id\", \"company_role_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"company_id\", \r\n NEW.\"company_role_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_COMPANYASSIGNEDROLE$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_COMPANYASSIGNEDROLE AFTER UPDATE\r\nON \"portal\".\"company_assigned_roles\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_COMPANYASSIGNEDROLE\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyAssignedUseCase", b => + { + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("UseCaseId") + .HasColumnType("uuid") + .HasColumnName("use_case_id"); + + b.HasKey("CompanyId", "UseCaseId") + .HasName("pk_company_assigned_use_cases"); + + b.HasIndex("UseCaseId") + .HasDatabaseName("ix_company_assigned_use_cases_use_case_id"); + + b.ToTable("company_assigned_use_cases", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyIdentifier", b => + { + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("UniqueIdentifierId") + .HasColumnType("integer") + .HasColumnName("unique_identifier_id"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text") + .HasColumnName("value"); + + b.HasKey("CompanyId", "UniqueIdentifierId") + .HasName("pk_company_identifiers"); + + b.HasIndex("UniqueIdentifierId") + .HasDatabaseName("ix_company_identifiers_unique_identifier_id"); + + b.ToTable("company_identifiers", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyIdentityProvider", b => + { + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("IdentityProviderId") + .HasColumnType("uuid") + .HasColumnName("identity_provider_id"); + + b.HasKey("CompanyId", "IdentityProviderId") + .HasName("pk_company_identity_providers"); + + b.HasIndex("IdentityProviderId") + .HasDatabaseName("ix_company_identity_providers_identity_provider_id"); + + b.ToTable("company_identity_providers", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRole", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_roles"); + + b.ToTable("company_roles", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "ACTIVE_PARTICIPANT" + }, + new + { + Id = 2, + Label = "APP_PROVIDER" + }, + new + { + Id = 3, + Label = "SERVICE_PROVIDER" + }, + new + { + Id = 4, + Label = "OPERATOR" + }, + new + { + Id = 5, + Label = "ONBOARDING_SERVICE_PROVIDER" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleAssignedRoleCollection", b => + { + b.Property("CompanyRoleId") + .HasColumnType("integer") + .HasColumnName("company_role_id"); + + b.Property("UserRoleCollectionId") + .HasColumnType("uuid") + .HasColumnName("user_role_collection_id"); + + b.HasKey("CompanyRoleId") + .HasName("pk_company_role_assigned_role_collections"); + + b.HasIndex("UserRoleCollectionId") + .IsUnique() + .HasDatabaseName("ix_company_role_assigned_role_collections_user_role_collection"); + + b.ToTable("company_role_assigned_role_collections", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleDescription", b => + { + b.Property("CompanyRoleId") + .HasColumnType("integer") + .HasColumnName("company_role_id"); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("description"); + + b.HasKey("CompanyRoleId", "LanguageShortName") + .HasName("pk_company_role_descriptions"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_company_role_descriptions_language_short_name"); + + b.ToTable("company_role_descriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleRegistrationData", b => + { + b.Property("CompanyRoleId") + .HasColumnType("integer") + .HasColumnName("company_role_id"); + + b.Property("IsRegistrationRole") + .HasColumnType("boolean") + .HasColumnName("is_registration_role"); + + b.HasKey("CompanyRoleId") + .HasName("pk_company_role_registration_data"); + + b.ToTable("company_role_registration_data", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccount", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ClientClientId") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("client_client_id"); + + b.Property("CompanyServiceAccountTypeId") + .HasColumnType("integer") + .HasColumnName("company_service_account_type_id"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OfferSubscriptionId") + .HasColumnType("uuid") + .HasColumnName("offer_subscription_id"); + + b.HasKey("Id") + .HasName("pk_company_service_accounts"); + + b.HasIndex("ClientClientId") + .IsUnique() + .HasDatabaseName("ix_company_service_accounts_client_client_id"); + + b.HasIndex("CompanyServiceAccountTypeId") + .HasDatabaseName("ix_company_service_accounts_company_service_account_type_id"); + + b.HasIndex("OfferSubscriptionId") + .HasDatabaseName("ix_company_service_accounts_offer_subscription_id"); + + b.ToTable("company_service_accounts", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccountType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_service_account_types"); + + b.ToTable("company_service_account_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "MANAGED" + }, + new + { + Id = 2, + Label = "OWN" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanySsiDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanySsiDetailStatusId") + .HasColumnType("integer") + .HasColumnName("company_ssi_detail_status_id"); + + b.Property("CreatorUserId") + .HasColumnType("uuid") + .HasColumnName("creator_user_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("ExpiryDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("expiry_date"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("VerifiedCredentialExternalTypeUseCaseDetailId") + .HasColumnType("uuid") + .HasColumnName("verified_credential_external_type_use_case_detail_id"); + + b.Property("VerifiedCredentialTypeId") + .HasColumnType("integer") + .HasColumnName("verified_credential_type_id"); + + b.HasKey("Id") + .HasName("pk_company_ssi_details"); + + b.HasIndex("CompanyId") + .HasDatabaseName("ix_company_ssi_details_company_id"); + + b.HasIndex("CompanySsiDetailStatusId") + .HasDatabaseName("ix_company_ssi_details_company_ssi_detail_status_id"); + + b.HasIndex("CreatorUserId") + .HasDatabaseName("ix_company_ssi_details_creator_user_id"); + + b.HasIndex("DocumentId") + .IsUnique() + .HasDatabaseName("ix_company_ssi_details_document_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_company_ssi_details_last_editor_id"); + + b.HasIndex("VerifiedCredentialExternalTypeUseCaseDetailId") + .HasDatabaseName("ix_company_ssi_details_verified_credential_external_type_use_c"); + + b.HasIndex("VerifiedCredentialTypeId") + .HasDatabaseName("ix_company_ssi_details_verified_credential_type_id"); + + b.ToTable("company_ssi_details", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_COMPANYSSIDETAIL"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_COMPANYSSIDETAIL"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_COMPANYSSIDETAIL", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_COMPANYSSIDETAIL\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_COMPANYSSIDETAIL$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_company_ssi_detail20231115\" (\"id\", \"company_id\", \"verified_credential_type_id\", \"company_ssi_detail_status_id\", \"document_id\", \"date_created\", \"creator_user_id\", \"expiry_date\", \"verified_credential_external_type_use_case_detail_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"company_id\", \r\n NEW.\"verified_credential_type_id\", \r\n NEW.\"company_ssi_detail_status_id\", \r\n NEW.\"document_id\", \r\n NEW.\"date_created\", \r\n NEW.\"creator_user_id\", \r\n NEW.\"expiry_date\", \r\n NEW.\"verified_credential_external_type_use_case_detail_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_COMPANYSSIDETAIL$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_COMPANYSSIDETAIL AFTER INSERT\r\nON \"portal\".\"company_ssi_details\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_COMPANYSSIDETAIL\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_COMPANYSSIDETAIL", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_COMPANYSSIDETAIL\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_COMPANYSSIDETAIL$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_company_ssi_detail20231115\" (\"id\", \"company_id\", \"verified_credential_type_id\", \"company_ssi_detail_status_id\", \"document_id\", \"date_created\", \"creator_user_id\", \"expiry_date\", \"verified_credential_external_type_use_case_detail_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"company_id\", \r\n NEW.\"verified_credential_type_id\", \r\n NEW.\"company_ssi_detail_status_id\", \r\n NEW.\"document_id\", \r\n NEW.\"date_created\", \r\n NEW.\"creator_user_id\", \r\n NEW.\"expiry_date\", \r\n NEW.\"verified_credential_external_type_use_case_detail_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_COMPANYSSIDETAIL$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_COMPANYSSIDETAIL AFTER UPDATE\r\nON \"portal\".\"company_ssi_details\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_COMPANYSSIDETAIL\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanySsiDetailStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_ssi_detail_statuses"); + + b.ToTable("company_ssi_detail_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "PENDING" + }, + new + { + Id = 2, + Label = "ACTIVE" + }, + new + { + Id = 3, + Label = "INACTIVE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_statuses"); + + b.ToTable("company_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "PENDING" + }, + new + { + Id = 2, + Label = "ACTIVE" + }, + new + { + Id = 3, + Label = "REJECTED" + }, + new + { + Id = 4, + Label = "INACTIVE" + }, + new + { + Id = 5, + Label = "DELETED" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Email") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("email"); + + b.Property("Firstname") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("firstname"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("Lastlogin") + .HasColumnType("bytea") + .HasColumnName("lastlogin"); + + b.Property("Lastname") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("lastname"); + + b.HasKey("Id") + .HasName("pk_company_users"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_company_users_last_editor_id"); + + b.ToTable("company_users", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_COMPANYUSER"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_COMPANYUSER"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_COMPANYUSER", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_COMPANYUSER\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_COMPANYUSER$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_company_user20230523\" (\"id\", \"email\", \"firstname\", \"lastlogin\", \"lastname\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"email\", \r\n NEW.\"firstname\", \r\n NEW.\"lastlogin\", \r\n NEW.\"lastname\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_COMPANYUSER$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_COMPANYUSER AFTER INSERT\r\nON \"portal\".\"company_users\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_COMPANYUSER\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_COMPANYUSER", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_COMPANYUSER\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_COMPANYUSER$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_company_user20230523\" (\"id\", \"email\", \"firstname\", \"lastlogin\", \"lastname\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"email\", \r\n NEW.\"firstname\", \r\n NEW.\"lastlogin\", \r\n NEW.\"lastname\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_COMPANYUSER$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_COMPANYUSER AFTER UPDATE\r\nON \"portal\".\"company_users\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_COMPANYUSER\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUserAssignedAppFavourite", b => + { + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("AppId") + .HasColumnType("uuid") + .HasColumnName("app_id"); + + b.HasKey("CompanyUserId", "AppId") + .HasName("pk_company_user_assigned_app_favourites"); + + b.HasIndex("AppId") + .HasDatabaseName("ix_company_user_assigned_app_favourites_app_id"); + + b.ToTable("company_user_assigned_app_favourites", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUserAssignedBusinessPartner", b => + { + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("BusinessPartnerNumber") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("business_partner_number"); + + b.HasKey("CompanyUserId", "BusinessPartnerNumber") + .HasName("pk_company_user_assigned_business_partners"); + + b.ToTable("company_user_assigned_business_partners", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUserAssignedIdentityProvider", b => + { + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("IdentityProviderId") + .HasColumnType("uuid") + .HasColumnName("identity_provider_id"); + + b.Property("ProviderId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("provider_id"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("user_name"); + + b.HasKey("CompanyUserId", "IdentityProviderId") + .HasName("pk_company_user_assigned_identity_providers"); + + b.HasIndex("IdentityProviderId") + .HasDatabaseName("ix_company_user_assigned_identity_providers_identity_provider_"); + + b.ToTable("company_user_assigned_identity_providers", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Connector", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompanyServiceAccountId") + .HasColumnType("uuid") + .HasColumnName("company_service_account_id"); + + b.Property("ConnectorUrl") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("connector_url"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("HostId") + .HasColumnType("uuid") + .HasColumnName("host_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("LocationId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("location_id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("ProviderId") + .HasColumnType("uuid") + .HasColumnName("provider_id"); + + b.Property("SelfDescriptionDocumentId") + .HasColumnType("uuid") + .HasColumnName("self_description_document_id"); + + b.Property("SelfDescriptionMessage") + .HasColumnType("text") + .HasColumnName("self_description_message"); + + b.Property("StatusId") + .HasColumnType("integer") + .HasColumnName("status_id"); + + b.Property("TypeId") + .HasColumnType("integer") + .HasColumnName("type_id"); + + b.HasKey("Id") + .HasName("pk_connectors"); + + b.HasIndex("CompanyServiceAccountId") + .IsUnique() + .HasDatabaseName("ix_connectors_company_service_account_id"); + + b.HasIndex("HostId") + .HasDatabaseName("ix_connectors_host_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_connectors_last_editor_id"); + + b.HasIndex("LocationId") + .HasDatabaseName("ix_connectors_location_id"); + + b.HasIndex("ProviderId") + .HasDatabaseName("ix_connectors_provider_id"); + + b.HasIndex("SelfDescriptionDocumentId") + .IsUnique() + .HasDatabaseName("ix_connectors_self_description_document_id"); + + b.HasIndex("StatusId") + .HasDatabaseName("ix_connectors_status_id"); + + b.HasIndex("TypeId") + .HasDatabaseName("ix_connectors_type_id"); + + b.ToTable("connectors", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_CONNECTOR"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_CONNECTOR"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_CONNECTOR", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_CONNECTOR\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_CONNECTOR$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_connector20231115\" (\"id\", \"name\", \"connector_url\", \"type_id\", \"status_id\", \"provider_id\", \"host_id\", \"self_description_document_id\", \"location_id\", \"self_description_message\", \"date_last_changed\", \"company_service_account_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"name\", \r\n NEW.\"connector_url\", \r\n NEW.\"type_id\", \r\n NEW.\"status_id\", \r\n NEW.\"provider_id\", \r\n NEW.\"host_id\", \r\n NEW.\"self_description_document_id\", \r\n NEW.\"location_id\", \r\n NEW.\"self_description_message\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"company_service_account_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_CONNECTOR$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_CONNECTOR AFTER INSERT\r\nON \"portal\".\"connectors\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_CONNECTOR\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_CONNECTOR", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_CONNECTOR\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_CONNECTOR$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_connector20231115\" (\"id\", \"name\", \"connector_url\", \"type_id\", \"status_id\", \"provider_id\", \"host_id\", \"self_description_document_id\", \"location_id\", \"self_description_message\", \"date_last_changed\", \"company_service_account_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"name\", \r\n NEW.\"connector_url\", \r\n NEW.\"type_id\", \r\n NEW.\"status_id\", \r\n NEW.\"provider_id\", \r\n NEW.\"host_id\", \r\n NEW.\"self_description_document_id\", \r\n NEW.\"location_id\", \r\n NEW.\"self_description_message\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"company_service_account_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_CONNECTOR$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_CONNECTOR AFTER UPDATE\r\nON \"portal\".\"connectors\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_CONNECTOR\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConnectorAssignedOfferSubscription", b => + { + b.Property("ConnectorId") + .HasColumnType("uuid") + .HasColumnName("connector_id"); + + b.Property("OfferSubscriptionId") + .HasColumnType("uuid") + .HasColumnName("offer_subscription_id"); + + b.HasKey("ConnectorId", "OfferSubscriptionId") + .HasName("pk_connector_assigned_offer_subscriptions"); + + b.HasIndex("OfferSubscriptionId") + .HasDatabaseName("ix_connector_assigned_offer_subscriptions_offer_subscription_id"); + + b.ToTable("connector_assigned_offer_subscriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConnectorStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_connector_statuses"); + + b.ToTable("connector_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "PENDING" + }, + new + { + Id = 2, + Label = "ACTIVE" + }, + new + { + Id = 3, + Label = "INACTIVE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConnectorType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_connector_types"); + + b.ToTable("connector_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "COMPANY_CONNECTOR" + }, + new + { + Id = 2, + Label = "CONNECTOR_AS_A_SERVICE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Consent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AgreementId") + .HasColumnType("uuid") + .HasColumnName("agreement_id"); + + b.Property("Comment") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("ConsentStatusId") + .HasColumnType("integer") + .HasColumnName("consent_status_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("Target") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("target"); + + b.HasKey("Id") + .HasName("pk_consents"); + + b.HasIndex("AgreementId") + .HasDatabaseName("ix_consents_agreement_id"); + + b.HasIndex("CompanyId") + .HasDatabaseName("ix_consents_company_id"); + + b.HasIndex("CompanyUserId") + .HasDatabaseName("ix_consents_company_user_id"); + + b.HasIndex("ConsentStatusId") + .HasDatabaseName("ix_consents_consent_status_id"); + + b.HasIndex("DocumentId") + .HasDatabaseName("ix_consents_document_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_consents_last_editor_id"); + + b.ToTable("consents", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_CONSENT"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_CONSENT"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_CONSENT", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_CONSENT\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_CONSENT$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_consent20231115\" (\"id\", \"date_created\", \"comment\", \"consent_status_id\", \"target\", \"agreement_id\", \"company_id\", \"document_id\", \"company_user_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"comment\", \r\n NEW.\"consent_status_id\", \r\n NEW.\"target\", \r\n NEW.\"agreement_id\", \r\n NEW.\"company_id\", \r\n NEW.\"document_id\", \r\n NEW.\"company_user_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_CONSENT$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_CONSENT AFTER INSERT\r\nON \"portal\".\"consents\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_CONSENT\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_CONSENT", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_CONSENT\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_CONSENT$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_consent20231115\" (\"id\", \"date_created\", \"comment\", \"consent_status_id\", \"target\", \"agreement_id\", \"company_id\", \"document_id\", \"company_user_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"comment\", \r\n NEW.\"consent_status_id\", \r\n NEW.\"target\", \r\n NEW.\"agreement_id\", \r\n NEW.\"company_id\", \r\n NEW.\"document_id\", \r\n NEW.\"company_user_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_CONSENT$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_CONSENT AFTER UPDATE\r\nON \"portal\".\"consents\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_CONSENT\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConsentAssignedOffer", b => + { + b.Property("ConsentId") + .HasColumnType("uuid") + .HasColumnName("consent_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.HasKey("ConsentId", "OfferId") + .HasName("pk_consent_assigned_offers"); + + b.HasIndex("OfferId") + .HasDatabaseName("ix_consent_assigned_offers_offer_id"); + + b.ToTable("consent_assigned_offers", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConsentAssignedOfferSubscription", b => + { + b.Property("ConsentId") + .HasColumnType("uuid") + .HasColumnName("consent_id"); + + b.Property("OfferSubscriptionId") + .HasColumnType("uuid") + .HasColumnName("offer_subscription_id"); + + b.HasKey("ConsentId", "OfferSubscriptionId") + .HasName("pk_consent_assigned_offer_subscriptions"); + + b.HasIndex("OfferSubscriptionId") + .HasDatabaseName("ix_consent_assigned_offer_subscriptions_offer_subscription_id"); + + b.ToTable("consent_assigned_offer_subscriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConsentStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_consent_statuses"); + + b.ToTable("consent_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "ACTIVE" + }, + new + { + Id = 2, + Label = "INACTIVE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Country", b => + { + b.Property("Alpha2Code") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("alpha2code") + .IsFixedLength() + .HasAnnotation("Relational:JsonPropertyName", "alpha2code"); + + b.Property("Alpha3Code") + .HasMaxLength(3) + .HasColumnType("character(3)") + .HasColumnName("alpha3code") + .IsFixedLength() + .HasAnnotation("Relational:JsonPropertyName", "alpha3code"); + + b.HasKey("Alpha2Code") + .HasName("pk_countries"); + + b.ToTable("countries", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CountryAssignedIdentifier", b => + { + b.Property("CountryAlpha2Code") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("country_alpha2code") + .HasAnnotation("Relational:JsonPropertyName", "country_alpha2code"); + + b.Property("UniqueIdentifierId") + .HasColumnType("integer") + .HasColumnName("unique_identifier_id"); + + b.Property("BpdmIdentifierId") + .HasColumnType("integer") + .HasColumnName("bpdm_identifier_id"); + + b.HasKey("CountryAlpha2Code", "UniqueIdentifierId") + .HasName("pk_country_assigned_identifiers"); + + b.HasIndex("BpdmIdentifierId") + .HasDatabaseName("ix_country_assigned_identifiers_bpdm_identifier_id"); + + b.HasIndex("UniqueIdentifierId") + .HasDatabaseName("ix_country_assigned_identifiers_unique_identifier_id"); + + b.ToTable("country_assigned_identifiers", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CountryLongName", b => + { + b.Property("Alpha2Code") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("alpha2code") + .HasAnnotation("Relational:JsonPropertyName", "alpha2code"); + + b.Property("ShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("short_name"); + + b.Property("LongName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("long_name"); + + b.HasKey("Alpha2Code", "ShortName") + .HasName("pk_country_long_names"); + + b.HasIndex("ShortName") + .HasDatabaseName("ix_country_long_names_short_name"); + + b.ToTable("country_long_names", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DocumentContent") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("document_content"); + + b.Property("DocumentHash") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("document_hash"); + + b.Property("DocumentName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("document_name"); + + b.Property("DocumentStatusId") + .HasColumnType("integer") + .HasColumnName("document_status_id"); + + b.Property("DocumentTypeId") + .HasColumnType("integer") + .HasColumnName("document_type_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("MediaTypeId") + .HasColumnType("integer") + .HasColumnName("media_type_id"); + + b.HasKey("Id") + .HasName("pk_documents"); + + b.HasIndex("CompanyUserId") + .HasDatabaseName("ix_documents_company_user_id"); + + b.HasIndex("DocumentStatusId") + .HasDatabaseName("ix_documents_document_status_id"); + + b.HasIndex("DocumentTypeId") + .HasDatabaseName("ix_documents_document_type_id"); + + b.HasIndex("MediaTypeId") + .HasDatabaseName("ix_documents_media_type_id"); + + b.ToTable("documents", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_DOCUMENT"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_DOCUMENT"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_DOCUMENT", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_DOCUMENT\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_DOCUMENT$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_document20231115\" (\"id\", \"date_created\", \"document_hash\", \"document_content\", \"document_name\", \"media_type_id\", \"document_type_id\", \"document_status_id\", \"company_user_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"document_hash\", \r\n NEW.\"document_content\", \r\n NEW.\"document_name\", \r\n NEW.\"media_type_id\", \r\n NEW.\"document_type_id\", \r\n NEW.\"document_status_id\", \r\n NEW.\"company_user_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_DOCUMENT$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_DOCUMENT AFTER INSERT\r\nON \"portal\".\"documents\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_DOCUMENT\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_DOCUMENT", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_DOCUMENT\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_DOCUMENT$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_document20231115\" (\"id\", \"date_created\", \"document_hash\", \"document_content\", \"document_name\", \"media_type_id\", \"document_type_id\", \"document_status_id\", \"company_user_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"document_hash\", \r\n NEW.\"document_content\", \r\n NEW.\"document_name\", \r\n NEW.\"media_type_id\", \r\n NEW.\"document_type_id\", \r\n NEW.\"document_status_id\", \r\n NEW.\"company_user_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_DOCUMENT$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_DOCUMENT AFTER UPDATE\r\nON \"portal\".\"documents\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_DOCUMENT\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.DocumentStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_document_status"); + + b.ToTable("document_status", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "PENDING" + }, + new + { + Id = 2, + Label = "LOCKED" + }, + new + { + Id = 3, + Label = "INACTIVE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.DocumentType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_document_types"); + + b.ToTable("document_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "CX_FRAME_CONTRACT" + }, + new + { + Id = 2, + Label = "COMMERCIAL_REGISTER_EXTRACT" + }, + new + { + Id = 3, + Label = "APP_CONTRACT" + }, + new + { + Id = 4, + Label = "CONFORMITY_APPROVAL_REGISTRATION" + }, + new + { + Id = 5, + Label = "ADDITIONAL_DETAILS" + }, + new + { + Id = 6, + Label = "APP_LEADIMAGE" + }, + new + { + Id = 7, + Label = "APP_IMAGE" + }, + new + { + Id = 8, + Label = "SELF_DESCRIPTION" + }, + new + { + Id = 9, + Label = "APP_TECHNICAL_INFORMATION" + }, + new + { + Id = 10, + Label = "CONFORMITY_APPROVAL_CONNECTOR" + }, + new + { + Id = 11, + Label = "CONFORMITY_APPROVAL_BUSINESS_APPS" + }, + new + { + Id = 12, + Label = "CONFORMITY_APPROVAL_SERVICES" + }, + new + { + Id = 13, + Label = "SERVICE_LEADIMAGE" + }, + new + { + Id = 14, + Label = "PRESENTATION" + }, + new + { + Id = 15, + Label = "COMPANY_CERTIFICATE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IamClient", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ClientClientId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("client_client_id"); + + b.HasKey("Id") + .HasName("pk_iam_clients"); + + b.HasIndex("ClientClientId") + .IsUnique() + .HasDatabaseName("ix_iam_clients_client_client_id"); + + b.ToTable("iam_clients", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IamIdentityProvider", b => + { + b.Property("IamIdpAlias") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("iam_idp_alias"); + + b.Property("IdentityProviderId") + .HasColumnType("uuid") + .HasColumnName("identity_provider_id"); + + b.Property("MetadataUrl") + .HasColumnType("text") + .HasColumnName("metadata_url"); + + b.HasKey("IamIdpAlias") + .HasName("pk_iam_identity_providers"); + + b.HasIndex("IdentityProviderId") + .IsUnique() + .HasDatabaseName("ix_iam_identity_providers_identity_provider_id"); + + b.ToTable("iam_identity_providers", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("IdentityTypeId") + .HasColumnType("integer") + .HasColumnName("identity_type_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("UserEntityId") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("user_entity_id"); + + b.Property("UserStatusId") + .HasColumnType("integer") + .HasColumnName("user_status_id") + .HasAnnotation("Relational:JsonPropertyName", "user_status_id"); + + b.HasKey("Id") + .HasName("pk_identities"); + + b.HasIndex("CompanyId") + .HasDatabaseName("ix_identities_company_id"); + + b.HasIndex("IdentityTypeId") + .HasDatabaseName("ix_identities_identity_type_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_identities_last_editor_id"); + + b.HasIndex("UserEntityId") + .IsUnique() + .HasDatabaseName("ix_identities_user_entity_id"); + + b.HasIndex("UserStatusId") + .HasDatabaseName("ix_identities_user_status_id"); + + b.ToTable("identities", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_IDENTITY"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_IDENTITY"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_IDENTITY", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_IDENTITY\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_IDENTITY$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_identity20231115\" (\"id\", \"date_created\", \"company_id\", \"user_status_id\", \"user_entity_id\", \"identity_type_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"company_id\", \r\n NEW.\"user_status_id\", \r\n NEW.\"user_entity_id\", \r\n NEW.\"identity_type_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_IDENTITY$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_IDENTITY AFTER INSERT\r\nON \"portal\".\"identities\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_IDENTITY\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_IDENTITY", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_IDENTITY\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_IDENTITY$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_identity20231115\" (\"id\", \"date_created\", \"company_id\", \"user_status_id\", \"user_entity_id\", \"identity_type_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"company_id\", \r\n NEW.\"user_status_id\", \r\n NEW.\"user_entity_id\", \r\n NEW.\"identity_type_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_IDENTITY$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_IDENTITY AFTER UPDATE\r\nON \"portal\".\"identities\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_IDENTITY\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityAssignedRole", b => + { + b.Property("IdentityId") + .HasColumnType("uuid") + .HasColumnName("identity_id"); + + b.Property("UserRoleId") + .HasColumnType("uuid") + .HasColumnName("user_role_id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.HasKey("IdentityId", "UserRoleId") + .HasName("pk_identity_assigned_roles"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_identity_assigned_roles_last_editor_id"); + + b.HasIndex("UserRoleId") + .HasDatabaseName("ix_identity_assigned_roles_user_role_id"); + + b.ToTable("identity_assigned_roles", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_IDENTITYASSIGNEDROLE"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_IDENTITYASSIGNEDROLE"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_IDENTITYASSIGNEDROLE", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_IDENTITYASSIGNEDROLE\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_IDENTITYASSIGNEDROLE$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_identity_assigned_role20230522\" (\"identity_id\", \"user_role_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"identity_id\", \r\n NEW.\"user_role_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_IDENTITYASSIGNEDROLE$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_IDENTITYASSIGNEDROLE AFTER INSERT\r\nON \"portal\".\"identity_assigned_roles\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_IDENTITYASSIGNEDROLE\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_IDENTITYASSIGNEDROLE", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_IDENTITYASSIGNEDROLE\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_IDENTITYASSIGNEDROLE$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_identity_assigned_role20230522\" (\"identity_id\", \"user_role_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"identity_id\", \r\n NEW.\"user_role_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_IDENTITYASSIGNEDROLE$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_IDENTITYASSIGNEDROLE AFTER UPDATE\r\nON \"portal\".\"identity_assigned_roles\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_IDENTITYASSIGNEDROLE\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("IdentityProviderCategoryId") + .HasColumnType("integer") + .HasColumnName("identity_provider_category_id"); + + b.Property("IdentityProviderTypeId") + .HasColumnType("integer") + .HasColumnName("identity_provider_type_id"); + + b.Property("OwnerId") + .HasColumnType("uuid") + .HasColumnName("owner_id"); + + b.HasKey("Id") + .HasName("pk_identity_providers"); + + b.HasIndex("IdentityProviderCategoryId") + .HasDatabaseName("ix_identity_providers_identity_provider_category_id"); + + b.HasIndex("IdentityProviderTypeId") + .HasDatabaseName("ix_identity_providers_identity_provider_type_id"); + + b.HasIndex("OwnerId") + .HasDatabaseName("ix_identity_providers_owner_id"); + + b.ToTable("identity_providers", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProviderCategory", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_identity_provider_categories"); + + b.ToTable("identity_provider_categories", "portal"); + + b.HasData( + new + { + Id = 2, + Label = "KEYCLOAK_OIDC" + }, + new + { + Id = 3, + Label = "KEYCLOAK_SAML" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProviderType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_identity_provider_types"); + + b.ToTable("identity_provider_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "OWN" + }, + new + { + Id = 2, + Label = "MANAGED" + }, + new + { + Id = 3, + Label = "SHARED" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_identity_type"); + + b.ToTable("identity_type", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "COMPANY_USER" + }, + new + { + Id = 2, + Label = "COMPANY_SERVICE_ACCOUNT" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityUserStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_identity_user_statuses"); + + b.ToTable("identity_user_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "ACTIVE" + }, + new + { + Id = 2, + Label = "INACTIVE" + }, + new + { + Id = 3, + Label = "DELETED" + }, + new + { + Id = 4, + Label = "PENDING" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Invitation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompanyApplicationId") + .HasColumnType("uuid") + .HasColumnName("company_application_id"); + + b.Property("CompanyUserId") + .HasColumnType("uuid") + .HasColumnName("company_user_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("InvitationStatusId") + .HasColumnType("integer") + .HasColumnName("invitation_status_id"); + + b.HasKey("Id") + .HasName("pk_invitations"); + + b.HasIndex("CompanyApplicationId") + .HasDatabaseName("ix_invitations_company_application_id"); + + b.HasIndex("CompanyUserId") + .HasDatabaseName("ix_invitations_company_user_id"); + + b.HasIndex("InvitationStatusId") + .HasDatabaseName("ix_invitations_invitation_status_id"); + + b.ToTable("invitations", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.InvitationStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_invitation_statuses"); + + b.ToTable("invitation_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "CREATED" + }, + new + { + Id = 2, + Label = "PENDING" + }, + new + { + Id = 3, + Label = "ACCEPTED" + }, + new + { + Id = 4, + Label = "DECLINED" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", b => + { + b.Property("ShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("short_name") + .IsFixedLength(); + + b.HasKey("ShortName") + .HasName("pk_languages"); + + b.ToTable("languages", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.LanguageLongName", b => + { + b.Property("ShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("short_name") + .IsFixedLength(); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name") + .IsFixedLength(); + + b.Property("LongName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("long_name"); + + b.HasKey("ShortName", "LanguageShortName") + .HasName("pk_language_long_names"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_language_long_names_language_short_name"); + + b.ToTable("language_long_names", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.LicenseType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_license_types"); + + b.ToTable("license_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "COTS" + }, + new + { + Id = 2, + Label = "FOSS" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.MediaType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_media_types"); + + b.ToTable("media_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "JPEG" + }, + new + { + Id = 2, + Label = "GIF" + }, + new + { + Id = 3, + Label = "PNG" + }, + new + { + Id = 4, + Label = "SVG" + }, + new + { + Id = 5, + Label = "TIFF" + }, + new + { + Id = 6, + Label = "PDF" + }, + new + { + Id = 7, + Label = "JSON" + }, + new + { + Id = 8, + Label = "PEM" + }, + new + { + Id = 9, + Label = "CA_CERT" + }, + new + { + Id = 10, + Label = "PKX_CER" + }, + new + { + Id = 11, + Label = "OCTET" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NetworkRegistration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ApplicationId") + .HasColumnType("uuid") + .HasColumnName("application_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("ExternalId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("external_id"); + + b.Property("OnboardingServiceProviderId") + .HasColumnType("uuid") + .HasColumnName("onboarding_service_provider_id"); + + b.Property("ProcessId") + .HasColumnType("uuid") + .HasColumnName("process_id"); + + b.HasKey("Id") + .HasName("pk_network_registrations"); + + b.HasIndex("ApplicationId") + .IsUnique() + .HasDatabaseName("ix_network_registrations_application_id"); + + b.HasIndex("CompanyId") + .IsUnique() + .HasDatabaseName("ix_network_registrations_company_id"); + + b.HasIndex("OnboardingServiceProviderId") + .HasDatabaseName("ix_network_registrations_onboarding_service_provider_id"); + + b.HasIndex("ProcessId") + .IsUnique() + .HasDatabaseName("ix_network_registrations_process_id"); + + b.HasIndex("ExternalId", "OnboardingServiceProviderId") + .IsUnique() + .HasDatabaseName("ix_network_registrations_external_id_onboarding_service_provid"); + + b.ToTable("network_registrations", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content"); + + b.Property("CreatorUserId") + .HasColumnType("uuid") + .HasColumnName("creator_user_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("Done") + .HasColumnType("boolean") + .HasColumnName("done"); + + b.Property("DueDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("due_date"); + + b.Property("IsRead") + .HasColumnType("boolean") + .HasColumnName("is_read"); + + b.Property("NotificationTypeId") + .HasColumnType("integer") + .HasColumnName("notification_type_id"); + + b.Property("ReceiverUserId") + .HasColumnType("uuid") + .HasColumnName("receiver_user_id"); + + b.HasKey("Id") + .HasName("pk_notifications"); + + b.HasIndex("CreatorUserId") + .HasDatabaseName("ix_notifications_creator_user_id"); + + b.HasIndex("NotificationTypeId") + .HasDatabaseName("ix_notifications_notification_type_id"); + + b.HasIndex("ReceiverUserId") + .HasDatabaseName("ix_notifications_receiver_user_id"); + + b.ToTable("notifications", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationTopic", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_notification_topic"); + + b.ToTable("notification_topic", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "INFO" + }, + new + { + Id = 2, + Label = "ACTION" + }, + new + { + Id = 3, + Label = "OFFER" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_notification_type"); + + b.ToTable("notification_type", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "INFO" + }, + new + { + Id = 2, + Label = "ACTION" + }, + new + { + Id = 3, + Label = "WELCOME" + }, + new + { + Id = 4, + Label = "WELCOME_USE_CASES" + }, + new + { + Id = 5, + Label = "WELCOME_SERVICE_PROVIDER" + }, + new + { + Id = 6, + Label = "WELCOME_CONNECTOR_REGISTRATION" + }, + new + { + Id = 7, + Label = "WELCOME_APP_MARKETPLACE" + }, + new + { + Id = 8, + Label = "APP_SUBSCRIPTION_REQUEST" + }, + new + { + Id = 9, + Label = "APP_SUBSCRIPTION_ACTIVATION" + }, + new + { + Id = 10, + Label = "CONNECTOR_REGISTERED" + }, + new + { + Id = 11, + Label = "APP_RELEASE_REQUEST" + }, + new + { + Id = 12, + Label = "TECHNICAL_USER_CREATION" + }, + new + { + Id = 13, + Label = "SERVICE_REQUEST" + }, + new + { + Id = 14, + Label = "SERVICE_ACTIVATION" + }, + new + { + Id = 15, + Label = "APP_ROLE_ADDED" + }, + new + { + Id = 16, + Label = "APP_RELEASE_APPROVAL" + }, + new + { + Id = 17, + Label = "SERVICE_RELEASE_REQUEST" + }, + new + { + Id = 18, + Label = "SERVICE_RELEASE_APPROVAL" + }, + new + { + Id = 19, + Label = "APP_RELEASE_REJECTION" + }, + new + { + Id = 20, + Label = "SERVICE_RELEASE_REJECTION" + }, + new + { + Id = 21, + Label = "ROLE_UPDATE_CORE_OFFER" + }, + new + { + Id = 22, + Label = "ROLE_UPDATE_APP_OFFER" + }, + new + { + Id = 23, + Label = "SUBSCRIPTION_URL_UPDATE" + }, + new + { + Id = 24, + Label = "CREDENTIAL_APPROVAL" + }, + new + { + Id = 25, + Label = "CREDENTIAL_REJECTED" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationTypeAssignedTopic", b => + { + b.Property("NotificationTypeId") + .HasColumnType("integer") + .HasColumnName("notification_type_id"); + + b.Property("NotificationTopicId") + .HasColumnType("integer") + .HasColumnName("notification_topic_id"); + + b.HasKey("NotificationTypeId", "NotificationTopicId") + .HasName("pk_notification_type_assigned_topics"); + + b.HasIndex("NotificationTopicId") + .HasDatabaseName("ix_notification_type_assigned_topics_notification_topic_id"); + + b.HasIndex("NotificationTypeId") + .IsUnique() + .HasDatabaseName("ix_notification_type_assigned_topics_notification_type_id"); + + b.ToTable("notification_type_assigned_topics", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ContactEmail") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("contact_email"); + + b.Property("ContactNumber") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("contact_number"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("DateReleased") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_released"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("LicenseTypeId") + .HasColumnType("integer") + .HasColumnName("license_type_id"); + + b.Property("MarketingUrl") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("marketing_url"); + + b.Property("Name") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OfferStatusId") + .HasColumnType("integer") + .HasColumnName("offer_status_id"); + + b.Property("OfferTypeId") + .HasColumnType("integer") + .HasColumnName("offer_type_id"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("provider"); + + b.Property("ProviderCompanyId") + .HasColumnType("uuid") + .HasColumnName("provider_company_id"); + + b.Property("SalesManagerId") + .HasColumnType("uuid") + .HasColumnName("sales_manager_id"); + + b.HasKey("Id") + .HasName("pk_offers"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_offers_last_editor_id"); + + b.HasIndex("LicenseTypeId") + .HasDatabaseName("ix_offers_license_type_id"); + + b.HasIndex("OfferStatusId") + .HasDatabaseName("ix_offers_offer_status_id"); + + b.HasIndex("OfferTypeId") + .HasDatabaseName("ix_offers_offer_type_id"); + + b.HasIndex("ProviderCompanyId") + .HasDatabaseName("ix_offers_provider_company_id"); + + b.HasIndex("SalesManagerId") + .HasDatabaseName("ix_offers_sales_manager_id"); + + b.ToTable("offers", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_OFFER"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_OFFER"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_OFFER", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_OFFER\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_OFFER$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_offer20231115\" (\"id\", \"name\", \"date_created\", \"date_released\", \"marketing_url\", \"contact_email\", \"contact_number\", \"provider\", \"offer_type_id\", \"sales_manager_id\", \"provider_company_id\", \"offer_status_id\", \"license_type_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"name\", \r\n NEW.\"date_created\", \r\n NEW.\"date_released\", \r\n NEW.\"marketing_url\", \r\n NEW.\"contact_email\", \r\n NEW.\"contact_number\", \r\n NEW.\"provider\", \r\n NEW.\"offer_type_id\", \r\n NEW.\"sales_manager_id\", \r\n NEW.\"provider_company_id\", \r\n NEW.\"offer_status_id\", \r\n NEW.\"license_type_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_OFFER$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_OFFER AFTER INSERT\r\nON \"portal\".\"offers\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_OFFER\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_OFFER", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_OFFER\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_OFFER$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_offer20231115\" (\"id\", \"name\", \"date_created\", \"date_released\", \"marketing_url\", \"contact_email\", \"contact_number\", \"provider\", \"offer_type_id\", \"sales_manager_id\", \"provider_company_id\", \"offer_status_id\", \"license_type_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"name\", \r\n NEW.\"date_created\", \r\n NEW.\"date_released\", \r\n NEW.\"marketing_url\", \r\n NEW.\"contact_email\", \r\n NEW.\"contact_number\", \r\n NEW.\"provider\", \r\n NEW.\"offer_type_id\", \r\n NEW.\"sales_manager_id\", \r\n NEW.\"provider_company_id\", \r\n NEW.\"offer_status_id\", \r\n NEW.\"license_type_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_OFFER$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_OFFER AFTER UPDATE\r\nON \"portal\".\"offers\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_OFFER\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferAssignedDocument", b => + { + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.HasKey("OfferId", "DocumentId") + .HasName("pk_offer_assigned_documents"); + + b.HasIndex("DocumentId") + .HasDatabaseName("ix_offer_assigned_documents_document_id"); + + b.ToTable("offer_assigned_documents", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferAssignedLicense", b => + { + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("OfferLicenseId") + .HasColumnType("uuid") + .HasColumnName("offer_license_id"); + + b.HasKey("OfferId", "OfferLicenseId") + .HasName("pk_offer_assigned_licenses"); + + b.HasIndex("OfferLicenseId") + .HasDatabaseName("ix_offer_assigned_licenses_offer_license_id"); + + b.ToTable("offer_assigned_licenses", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferAssignedPrivacyPolicy", b => + { + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("PrivacyPolicyId") + .HasColumnType("integer") + .HasColumnName("privacy_policy_id"); + + b.HasKey("OfferId", "PrivacyPolicyId") + .HasName("pk_offer_assigned_privacy_policies"); + + b.HasIndex("PrivacyPolicyId") + .HasDatabaseName("ix_offer_assigned_privacy_policies_privacy_policy_id"); + + b.ToTable("offer_assigned_privacy_policies", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferDescription", b => + { + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name"); + + b.Property("DescriptionLong") + .IsRequired() + .HasMaxLength(4096) + .HasColumnType("character varying(4096)") + .HasColumnName("description_long"); + + b.Property("DescriptionShort") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("description_short"); + + b.HasKey("OfferId", "LanguageShortName") + .HasName("pk_offer_descriptions"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_offer_descriptions_language_short_name"); + + b.ToTable("offer_descriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferLicense", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Licensetext") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("licensetext"); + + b.HasKey("Id") + .HasName("pk_offer_licenses"); + + b.ToTable("offer_licenses", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_offer_statuses"); + + b.ToTable("offer_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "CREATED" + }, + new + { + Id = 2, + Label = "IN_REVIEW" + }, + new + { + Id = 3, + Label = "ACTIVE" + }, + new + { + Id = 4, + Label = "INACTIVE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("Description") + .HasMaxLength(4096) + .HasColumnType("character varying(4096)") + .HasColumnName("description"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("display_name"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("OfferSubscriptionStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(1) + .HasColumnName("offer_subscription_status_id"); + + b.Property("ProcessId") + .HasColumnType("uuid") + .HasColumnName("process_id"); + + b.Property("RequesterId") + .HasColumnType("uuid") + .HasColumnName("requester_id"); + + b.HasKey("Id") + .HasName("pk_offer_subscriptions"); + + b.HasIndex("CompanyId") + .HasDatabaseName("ix_offer_subscriptions_company_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_offer_subscriptions_last_editor_id"); + + b.HasIndex("OfferId") + .HasDatabaseName("ix_offer_subscriptions_offer_id"); + + b.HasIndex("OfferSubscriptionStatusId") + .HasDatabaseName("ix_offer_subscriptions_offer_subscription_status_id"); + + b.HasIndex("ProcessId") + .IsUnique() + .HasDatabaseName("ix_offer_subscriptions_process_id"); + + b.HasIndex("RequesterId") + .HasDatabaseName("ix_offer_subscriptions_requester_id"); + + b.ToTable("offer_subscriptions", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_OFFERSUBSCRIPTION"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_OFFERSUBSCRIPTION"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_OFFERSUBSCRIPTION", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_OFFERSUBSCRIPTION\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_OFFERSUBSCRIPTION$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_offer_subscription20231115\" (\"id\", \"company_id\", \"offer_id\", \"offer_subscription_status_id\", \"display_name\", \"description\", \"requester_id\", \"last_editor_id\", \"process_id\", \"date_created\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"company_id\", \r\n NEW.\"offer_id\", \r\n NEW.\"offer_subscription_status_id\", \r\n NEW.\"display_name\", \r\n NEW.\"description\", \r\n NEW.\"requester_id\", \r\n NEW.\"last_editor_id\", \r\n NEW.\"process_id\", \r\n NEW.\"date_created\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_OFFERSUBSCRIPTION$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_OFFERSUBSCRIPTION AFTER INSERT\r\nON \"portal\".\"offer_subscriptions\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_OFFERSUBSCRIPTION\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_OFFERSUBSCRIPTION", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_OFFERSUBSCRIPTION\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_OFFERSUBSCRIPTION$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_offer_subscription20231115\" (\"id\", \"company_id\", \"offer_id\", \"offer_subscription_status_id\", \"display_name\", \"description\", \"requester_id\", \"last_editor_id\", \"process_id\", \"date_created\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"company_id\", \r\n NEW.\"offer_id\", \r\n NEW.\"offer_subscription_status_id\", \r\n NEW.\"display_name\", \r\n NEW.\"description\", \r\n NEW.\"requester_id\", \r\n NEW.\"last_editor_id\", \r\n NEW.\"process_id\", \r\n NEW.\"date_created\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_OFFERSUBSCRIPTION$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_OFFERSUBSCRIPTION AFTER UPDATE\r\nON \"portal\".\"offer_subscriptions\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_OFFERSUBSCRIPTION\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscriptionProcessData", b => + { + b.Property("OfferSubscriptionId") + .HasColumnType("uuid") + .HasColumnName("offer_subscription_id"); + + b.Property("OfferUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("offer_url"); + + b.HasKey("OfferSubscriptionId") + .HasName("pk_offer_subscriptions_process_datas"); + + b.ToTable("offer_subscriptions_process_datas", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscriptionStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_offer_subscription_statuses"); + + b.ToTable("offer_subscription_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "PENDING" + }, + new + { + Id = 2, + Label = "ACTIVE" + }, + new + { + Id = 3, + Label = "INACTIVE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferTag", b => + { + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("Name") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("tag_name") + .HasAnnotation("Relational:JsonPropertyName", "tag_name"); + + b.HasKey("OfferId", "Name") + .HasName("pk_offer_tags"); + + b.ToTable("offer_tags", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_offer_types"); + + b.ToTable("offer_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "APP" + }, + new + { + Id = 2, + Label = "CORE_COMPONENT" + }, + new + { + Id = 3, + Label = "SERVICE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OnboardingServiceProviderDetail", b => + { + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("AuthUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("auth_url"); + + b.Property("CallbackUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("callback_url"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("client_id"); + + b.Property("ClientSecret") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("client_secret"); + + b.HasKey("CompanyId") + .HasName("pk_onboarding_service_provider_details"); + + b.ToTable("onboarding_service_provider_details", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.PrivacyPolicy", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_privacy_policies"); + + b.ToTable("privacy_policies", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "COMPANY_DATA" + }, + new + { + Id = 2, + Label = "USER_DATA" + }, + new + { + Id = 3, + Label = "LOCATION" + }, + new + { + Id = 4, + Label = "BROWSER_HISTORY" + }, + new + { + Id = 5, + Label = "NONE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Process", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LockExpiryDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("lock_expiry_date"); + + b.Property("ProcessTypeId") + .HasColumnType("integer") + .HasColumnName("process_type_id"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("uuid") + .HasColumnName("version"); + + b.HasKey("Id") + .HasName("pk_processes"); + + b.HasIndex("ProcessTypeId") + .HasDatabaseName("ix_processes_process_type_id"); + + b.ToTable("processes", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessStep", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("Message") + .HasColumnType("text") + .HasColumnName("message"); + + b.Property("ProcessId") + .HasColumnType("uuid") + .HasColumnName("process_id"); + + b.Property("ProcessStepStatusId") + .HasColumnType("integer") + .HasColumnName("process_step_status_id"); + + b.Property("ProcessStepTypeId") + .HasColumnType("integer") + .HasColumnName("process_step_type_id"); + + b.HasKey("Id") + .HasName("pk_process_steps"); + + b.HasIndex("ProcessId") + .HasDatabaseName("ix_process_steps_process_id"); + + b.HasIndex("ProcessStepStatusId") + .HasDatabaseName("ix_process_steps_process_step_status_id"); + + b.HasIndex("ProcessStepTypeId") + .HasDatabaseName("ix_process_steps_process_step_type_id"); + + b.ToTable("process_steps", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessStepStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_process_step_statuses"); + + b.ToTable("process_step_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "TODO" + }, + new + { + Id = 2, + Label = "DONE" + }, + new + { + Id = 3, + Label = "SKIPPED" + }, + new + { + Id = 4, + Label = "FAILED" + }, + new + { + Id = 5, + Label = "DUPLICATE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessStepType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_process_step_types"); + + b.ToTable("process_step_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "VERIFY_REGISTRATION" + }, + new + { + Id = 2, + Label = "CREATE_BUSINESS_PARTNER_NUMBER_PUSH" + }, + new + { + Id = 3, + Label = "CREATE_BUSINESS_PARTNER_NUMBER_PULL" + }, + new + { + Id = 4, + Label = "CREATE_BUSINESS_PARTNER_NUMBER_MANUAL" + }, + new + { + Id = 5, + Label = "CREATE_IDENTITY_WALLET" + }, + new + { + Id = 6, + Label = "RETRIGGER_IDENTITY_WALLET" + }, + new + { + Id = 7, + Label = "START_CLEARING_HOUSE" + }, + new + { + Id = 8, + Label = "RETRIGGER_CLEARING_HOUSE" + }, + new + { + Id = 9, + Label = "END_CLEARING_HOUSE" + }, + new + { + Id = 10, + Label = "START_SELF_DESCRIPTION_LP" + }, + new + { + Id = 11, + Label = "RETRIGGER_SELF_DESCRIPTION_LP" + }, + new + { + Id = 12, + Label = "ACTIVATE_APPLICATION" + }, + new + { + Id = 13, + Label = "RETRIGGER_BUSINESS_PARTNER_NUMBER_PUSH" + }, + new + { + Id = 14, + Label = "RETRIGGER_BUSINESS_PARTNER_NUMBER_PULL" + }, + new + { + Id = 15, + Label = "OVERRIDE_BUSINESS_PARTNER_NUMBER" + }, + new + { + Id = 16, + Label = "TRIGGER_OVERRIDE_CLEARING_HOUSE" + }, + new + { + Id = 17, + Label = "START_OVERRIDE_CLEARING_HOUSE" + }, + new + { + Id = 18, + Label = "FINISH_SELF_DESCRIPTION_LP" + }, + new + { + Id = 19, + Label = "DECLINE_APPLICATION" + }, + new + { + Id = 100, + Label = "TRIGGER_PROVIDER" + }, + new + { + Id = 101, + Label = "START_AUTOSETUP" + }, + new + { + Id = 102, + Label = "OFFERSUBSCRIPTION_CLIENT_CREATION" + }, + new + { + Id = 103, + Label = "SINGLE_INSTANCE_SUBSCRIPTION_DETAILS_CREATION" + }, + new + { + Id = 104, + Label = "OFFERSUBSCRIPTION_TECHNICALUSER_CREATION" + }, + new + { + Id = 105, + Label = "ACTIVATE_SUBSCRIPTION" + }, + new + { + Id = 106, + Label = "TRIGGER_PROVIDER_CALLBACK" + }, + new + { + Id = 107, + Label = "RETRIGGER_PROVIDER" + }, + new + { + Id = 108, + Label = "RETRIGGER_OFFERSUBSCRIPTION_CLIENT_CREATION" + }, + new + { + Id = 109, + Label = "RETRIGGER_OFFERSUBSCRIPTION_TECHNICALUSER_CREATION" + }, + new + { + Id = 110, + Label = "RETRIGGER_PROVIDER_CALLBACK" + }, + new + { + Id = 111, + Label = "TRIGGER_ACTIVATE_SUBSCRIPTION" + }, + new + { + Id = 200, + Label = "SYNCHRONIZE_USER" + }, + new + { + Id = 201, + Label = "RETRIGGER_SYNCHRONIZE_USER" + }, + new + { + Id = 202, + Label = "TRIGGER_CALLBACK_OSP_SUBMITTED" + }, + new + { + Id = 203, + Label = "TRIGGER_CALLBACK_OSP_APPROVED" + }, + new + { + Id = 204, + Label = "TRIGGER_CALLBACK_OSP_DECLINED" + }, + new + { + Id = 205, + Label = "RETRIGGER_CALLBACK_OSP_SUBMITTED" + }, + new + { + Id = 206, + Label = "RETRIGGER_CALLBACK_OSP_APPROVED" + }, + new + { + Id = 207, + Label = "RETRIGGER_CALLBACK_OSP_DECLINED" + }, + new + { + Id = 208, + Label = "MANUAL_DECLINE_OSP" + }, + new + { + Id = 209, + Label = "REMOVE_KEYCLOAK_USERS" + }, + new + { + Id = 210, + Label = "RETRIGGER_REMOVE_KEYCLOAK_USERS" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_process_types"); + + b.ToTable("process_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "APPLICATION_CHECKLIST" + }, + new + { + Id = 3, + Label = "OFFER_SUBSCRIPTION" + }, + new + { + Id = 4, + Label = "PARTNER_REGISTRATION" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProviderCompanyDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AutoSetupCallbackUrl") + .HasColumnType("text") + .HasColumnName("auto_setup_callback_url"); + + b.Property("AutoSetupUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("auto_setup_url"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created"); + + b.Property("DateLastChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_changed"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.HasKey("Id") + .HasName("pk_provider_company_details"); + + b.HasIndex("CompanyId") + .IsUnique() + .HasDatabaseName("ix_provider_company_details_company_id"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_provider_company_details_last_editor_id"); + + b.ToTable("provider_company_details", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_PROVIDERCOMPANYDETAIL"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_PROVIDERCOMPANYDETAIL"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_PROVIDERCOMPANYDETAIL", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_PROVIDERCOMPANYDETAIL\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_PROVIDERCOMPANYDETAIL$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_provider_company_detail20231115\" (\"id\", \"date_created\", \"auto_setup_url\", \"auto_setup_callback_url\", \"company_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"auto_setup_url\", \r\n NEW.\"auto_setup_callback_url\", \r\n NEW.\"company_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_PROVIDERCOMPANYDETAIL$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_PROVIDERCOMPANYDETAIL AFTER INSERT\r\nON \"portal\".\"provider_company_details\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_PROVIDERCOMPANYDETAIL\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_PROVIDERCOMPANYDETAIL", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_PROVIDERCOMPANYDETAIL\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_PROVIDERCOMPANYDETAIL$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_provider_company_detail20231115\" (\"id\", \"date_created\", \"auto_setup_url\", \"auto_setup_callback_url\", \"company_id\", \"date_last_changed\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"date_created\", \r\n NEW.\"auto_setup_url\", \r\n NEW.\"auto_setup_callback_url\", \r\n NEW.\"company_id\", \r\n NEW.\"date_last_changed\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_PROVIDERCOMPANYDETAIL$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_PROVIDERCOMPANYDETAIL AFTER UPDATE\r\nON \"portal\".\"provider_company_details\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_PROVIDERCOMPANYDETAIL\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ServiceDetail", b => + { + b.Property("ServiceId") + .HasColumnType("uuid") + .HasColumnName("service_id"); + + b.Property("ServiceTypeId") + .HasColumnType("integer") + .HasColumnName("service_type_id"); + + b.HasKey("ServiceId", "ServiceTypeId") + .HasName("pk_service_details"); + + b.HasIndex("ServiceTypeId") + .HasDatabaseName("ix_service_details_service_type_id"); + + b.ToTable("service_details", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ServiceType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_service_types"); + + b.ToTable("service_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "DATASPACE_SERVICE" + }, + new + { + Id = 2, + Label = "CONSULTANCY_SERVICE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.TechnicalUserProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.HasKey("Id") + .HasName("pk_technical_user_profiles"); + + b.HasIndex("OfferId") + .HasDatabaseName("ix_technical_user_profiles_offer_id"); + + b.ToTable("technical_user_profiles", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.TechnicalUserProfileAssignedUserRole", b => + { + b.Property("TechnicalUserProfileId") + .HasColumnType("uuid") + .HasColumnName("technical_user_profile_id"); + + b.Property("UserRoleId") + .HasColumnType("uuid") + .HasColumnName("user_role_id"); + + b.HasKey("TechnicalUserProfileId", "UserRoleId") + .HasName("pk_technical_user_profile_assigned_user_roles"); + + b.HasIndex("UserRoleId") + .HasDatabaseName("ix_technical_user_profile_assigned_user_roles_user_role_id"); + + b.ToTable("technical_user_profile_assigned_user_roles", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UniqueIdentifier", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_unique_identifiers"); + + b.ToTable("unique_identifiers", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "COMMERCIAL_REG_NUMBER" + }, + new + { + Id = 2, + Label = "VAT_ID" + }, + new + { + Id = 3, + Label = "LEI_CODE" + }, + new + { + Id = 4, + Label = "VIES" + }, + new + { + Id = 5, + Label = "EORI" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCase", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("Shortname") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("shortname"); + + b.HasKey("Id") + .HasName("pk_use_cases"); + + b.ToTable("use_cases", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCaseDescription", b => + { + b.Property("UseCaseId") + .HasColumnType("uuid") + .HasColumnName("use_case_id"); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text") + .HasColumnName("description"); + + b.HasKey("UseCaseId", "LanguageShortName") + .HasName("pk_use_case_descriptions"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_use_case_descriptions_language_short_name"); + + b.ToTable("use_case_descriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("LastEditorId") + .HasColumnType("uuid") + .HasColumnName("last_editor_id"); + + b.Property("OfferId") + .HasColumnType("uuid") + .HasColumnName("offer_id"); + + b.Property("UserRoleText") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("user_role") + .HasAnnotation("Relational:JsonPropertyName", "user_role"); + + b.HasKey("Id") + .HasName("pk_user_roles"); + + b.HasIndex("LastEditorId") + .HasDatabaseName("ix_user_roles_last_editor_id"); + + b.HasIndex("OfferId") + .HasDatabaseName("ix_user_roles_offer_id"); + + b.ToTable("user_roles", "portal", t => + { + t.HasTrigger("LC_TRIGGER_AFTER_INSERT_USERROLE"); + + t.HasTrigger("LC_TRIGGER_AFTER_UPDATE_USERROLE"); + }); + + b + .HasAnnotation("LC_TRIGGER_AFTER_INSERT_USERROLE", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_INSERT_USERROLE\"() RETURNS trigger as $LC_TRIGGER_AFTER_INSERT_USERROLE$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_user_role20231115\" (\"id\", \"user_role\", \"offer_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"user_role\", \r\n NEW.\"offer_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 1, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_INSERT_USERROLE$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_INSERT_USERROLE AFTER INSERT\r\nON \"portal\".\"user_roles\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_INSERT_USERROLE\"();") + .HasAnnotation("LC_TRIGGER_AFTER_UPDATE_USERROLE", "CREATE FUNCTION \"portal\".\"LC_TRIGGER_AFTER_UPDATE_USERROLE\"() RETURNS trigger as $LC_TRIGGER_AFTER_UPDATE_USERROLE$\r\nBEGIN\r\n INSERT INTO \"portal\".\"audit_user_role20231115\" (\"id\", \"user_role\", \"offer_id\", \"last_editor_id\", \"audit_v1id\", \"audit_v1operation_id\", \"audit_v1date_last_changed\", \"audit_v1last_editor_id\") SELECT NEW.\"id\", \r\n NEW.\"user_role\", \r\n NEW.\"offer_id\", \r\n NEW.\"last_editor_id\", \r\n gen_random_uuid(), \r\n 2, \r\n CURRENT_TIMESTAMP, \r\n NEW.\"last_editor_id\";\r\nRETURN NEW;\r\nEND;\r\n$LC_TRIGGER_AFTER_UPDATE_USERROLE$ LANGUAGE plpgsql;\r\nCREATE TRIGGER LC_TRIGGER_AFTER_UPDATE_USERROLE AFTER UPDATE\r\nON \"portal\".\"user_roles\"\r\nFOR EACH ROW EXECUTE PROCEDURE \"portal\".\"LC_TRIGGER_AFTER_UPDATE_USERROLE\"();"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleAssignedCollection", b => + { + b.Property("UserRoleId") + .HasColumnType("uuid") + .HasColumnName("user_role_id"); + + b.Property("UserRoleCollectionId") + .HasColumnType("uuid") + .HasColumnName("user_role_collection_id"); + + b.HasKey("UserRoleId", "UserRoleCollectionId") + .HasName("pk_user_role_assigned_collections"); + + b.HasIndex("UserRoleCollectionId") + .HasDatabaseName("ix_user_role_assigned_collections_user_role_collection_id"); + + b.ToTable("user_role_assigned_collections", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleCollection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_user_role_collections"); + + b.ToTable("user_role_collections", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleCollectionDescription", b => + { + b.Property("UserRoleCollectionId") + .HasColumnType("uuid") + .HasColumnName("user_role_collection_id"); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("description"); + + b.HasKey("UserRoleCollectionId", "LanguageShortName") + .HasName("pk_user_role_collection_descriptions"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_user_role_collection_descriptions_language_short_name"); + + b.ToTable("user_role_collection_descriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleDescription", b => + { + b.Property("UserRoleId") + .HasColumnType("uuid") + .HasColumnName("user_role_id"); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("description"); + + b.HasKey("UserRoleId", "LanguageShortName") + .HasName("pk_user_role_descriptions"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_user_role_descriptions_language_short_name"); + + b.ToTable("user_role_descriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialExternalType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasColumnType("text") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_verified_credential_external_types"); + + b.ToTable("verified_credential_external_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "TRACEABILITY_CREDENTIAL" + }, + new + { + Id = 2, + Label = "PCF_CREDENTIAL" + }, + new + { + Id = 3, + Label = "BEHAVIOR_TWIN_CREDENTIAL" + }, + new + { + Id = 4, + Label = "VEHICLE_DISMANTLE" + }, + new + { + Id = 5, + Label = "SUSTAINABILITY_CREDENTIAL" + }, + new + { + Id = 6, + Label = "Quality_Credential" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialExternalTypeUseCaseDetailVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Expiry") + .HasColumnType("timestamp with time zone") + .HasColumnName("expiry"); + + b.Property("Template") + .HasColumnType("text") + .HasColumnName("template"); + + b.Property("ValidFrom") + .HasColumnType("timestamp with time zone") + .HasColumnName("valid_from"); + + b.Property("VerifiedCredentialExternalTypeId") + .HasColumnType("integer") + .HasColumnName("verified_credential_external_type_id"); + + b.Property("Version") + .IsRequired() + .HasColumnType("text") + .HasColumnName("version"); + + b.HasKey("Id") + .HasName("pk_verified_credential_external_type_use_case_detail_versions"); + + b.HasIndex("VerifiedCredentialExternalTypeId", "Version") + .IsUnique() + .HasDatabaseName("ix_verified_credential_external_type_use_case_detail_versions_"); + + b.ToTable("verified_credential_external_type_use_case_detail_versions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_verified_credential_types"); + + b.ToTable("verified_credential_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "TRACEABILITY_FRAMEWORK" + }, + new + { + Id = 2, + Label = "PCF_FRAMEWORK" + }, + new + { + Id = 3, + Label = "BEHAVIOR_TWIN_FRAMEWORK" + }, + new + { + Id = 4, + Label = "DISMANTLER_CERTIFICATE" + }, + new + { + Id = 5, + Label = "SUSTAINABILITY_FRAMEWORK" + }, + new + { + Id = 6, + Label = "FRAMEWORK_AGREEMENT_QUALITY" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedExternalType", b => + { + b.Property("VerifiedCredentialTypeId") + .HasColumnType("integer") + .HasColumnName("verified_credential_type_id"); + + b.Property("VerifiedCredentialExternalTypeId") + .HasColumnType("integer") + .HasColumnName("verified_credential_external_type_id"); + + b.HasKey("VerifiedCredentialTypeId", "VerifiedCredentialExternalTypeId") + .HasName("pk_verified_credential_type_assigned_external_types"); + + b.HasIndex("VerifiedCredentialExternalTypeId") + .HasDatabaseName("ix_verified_credential_type_assigned_external_types_verified_c"); + + b.HasIndex("VerifiedCredentialTypeId") + .IsUnique() + .HasDatabaseName("ix_verified_credential_type_assigned_external_types_verified_c1"); + + b.ToTable("verified_credential_type_assigned_external_types", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedKind", b => + { + b.Property("VerifiedCredentialTypeId") + .HasColumnType("integer") + .HasColumnName("verified_credential_type_id"); + + b.Property("VerifiedCredentialTypeKindId") + .HasColumnType("integer") + .HasColumnName("verified_credential_type_kind_id"); + + b.HasKey("VerifiedCredentialTypeId", "VerifiedCredentialTypeKindId") + .HasName("pk_verified_credential_type_assigned_kinds"); + + b.HasIndex("VerifiedCredentialTypeId") + .HasDatabaseName("ix_verified_credential_type_assigned_kinds_verified_credential"); + + b.HasIndex("VerifiedCredentialTypeKindId") + .HasDatabaseName("ix_verified_credential_type_assigned_kinds_verified_credential1"); + + b.ToTable("verified_credential_type_assigned_kinds", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedUseCase", b => + { + b.Property("VerifiedCredentialTypeId") + .HasColumnType("integer") + .HasColumnName("verified_credential_type_id"); + + b.Property("UseCaseId") + .HasColumnType("uuid") + .HasColumnName("use_case_id"); + + b.HasKey("VerifiedCredentialTypeId", "UseCaseId") + .HasName("pk_verified_credential_type_assigned_use_cases"); + + b.HasIndex("UseCaseId") + .IsUnique() + .HasDatabaseName("ix_verified_credential_type_assigned_use_cases_use_case_id"); + + b.HasIndex("VerifiedCredentialTypeId") + .IsUnique() + .HasDatabaseName("ix_verified_credential_type_assigned_use_cases_verified_creden"); + + b.ToTable("verified_credential_type_assigned_use_cases", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeKind", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_verified_credential_type_kinds"); + + b.ToTable("verified_credential_type_kinds", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "USE_CASE" + }, + new + { + Id = 2, + Label = "CERTIFICATE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.AgreementView", b => + { + b.Property("AgreementCompanyRole") + .IsRequired() + .HasColumnType("text") + .HasColumnName("agreement_company_role"); + + b.Property("AgreementId") + .HasColumnType("uuid") + .HasColumnName("agreement_id"); + + b.Property("AgreementName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("agreement_name"); + + b.Property("AgreementStatus") + .IsRequired() + .HasColumnType("text") + .HasColumnName("agreement_status"); + + b.Property("Mandatory") + .HasColumnType("boolean") + .HasColumnName("mandatory"); + + b.ToTable((string)null); + + b.ToView("agreement_view", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.CompaniesLinkedServiceAccount", b => + { + b.Property("ServiceAccountId") + .HasColumnType("uuid") + .HasColumnName("service_account_id"); + + b.Property("Owners") + .HasColumnType("uuid") + .HasColumnName("owners"); + + b.Property("Provider") + .HasColumnType("uuid") + .HasColumnName("provider"); + + b.HasKey("ServiceAccountId"); + + b.ToTable((string)null); + + b.ToView("company_linked_service_accounts", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.CompanyConnectorView", b => + { + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("company_name"); + + b.Property("ConnectorStatus") + .IsRequired() + .HasColumnType("text") + .HasColumnName("connector_status"); + + b.Property("ConnectorUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("connector_url"); + + b.ToTable((string)null); + + b.ToView("company_connector_view", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.CompanyIdpView", b => + { + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("company_name"); + + b.Property("IdpAlias") + .IsRequired() + .HasColumnType("text") + .HasColumnName("idp_alias"); + + b.ToTable((string)null); + + b.ToView("company_idp_view", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.CompanyRoleCollectionRolesView", b => + { + b.Property("ClientName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("client_name"); + + b.Property("CollectionName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("collection_name"); + + b.Property("UserRole") + .IsRequired() + .HasColumnType("text") + .HasColumnName("user_role"); + + b.ToTable((string)null); + + b.ToView("companyrole_collectionroles_view", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.CompanyUsersView", b => + { + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("company_name"); + + b.Property("FirstName") + .HasColumnType("text") + .HasColumnName("first_name"); + + b.Property("LastName") + .HasColumnType("text") + .HasColumnName("last_name"); + + b.Property("UserEmail") + .HasColumnType("text") + .HasColumnName("user_email"); + + b.Property("UserStatus") + .IsRequired() + .HasColumnType("text") + .HasColumnName("user_status"); + + b.ToTable((string)null); + + b.ToView("company_users_view", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.OfferSubscriptionView", b => + { + b.Property("AppInstance") + .HasColumnType("uuid") + .HasColumnName("app_instance"); + + b.Property("Connector") + .HasColumnType("uuid") + .HasColumnName("connector"); + + b.Property("OfferTypeId") + .HasColumnType("integer") + .HasColumnName("offer_type_id"); + + b.Property("SubscriptionId") + .HasColumnType("uuid") + .HasColumnName("subscription_id"); + + b.Property("TechnicalUser") + .HasColumnType("uuid") + .HasColumnName("technical_user"); + + b.ToTable((string)null); + + b.ToView("offer_subscription_view", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificate", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateStatus", "CompanyCertificateStatus") + .WithMany() + .HasForeignKey("CompanyCertificateStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_certificates_company_certificate_statuses_company_c"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", "CompanyCertificateType") + .WithMany("CompanyCertificates") + .HasForeignKey("CompanyCertificateTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_certificates_company_certificate_types_company_cert"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("CompanyCertificates") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_company_certificates_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", "Document") + .WithMany("CompanyCertificates") + .HasForeignKey("DocumentId") + .IsRequired() + .HasConstraintName("fk_company_certificates_documents_document_id"); + + b.Navigation("Company"); + + b.Navigation("CompanyCertificateStatus"); + + b.Navigation("CompanyCertificateType"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeAssignedStatus", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", "CompanyCertificateType") + .WithOne("CompanyCertificateTypeAssignedStatus") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeAssignedStatus", "CompanyCertificateTypeId") + .IsRequired() + .HasConstraintName("fk_company_certificate_type_assigned_statuses_company_certific"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeStatus", "CompanyCertificateTypeStatus") + .WithMany("CompanyCertificateTypeAssignedStatuses") + .HasForeignKey("CompanyCertificateTypeStatusId") + .IsRequired() + .HasConstraintName("fk_company_certificate_type_assigned_statuses_company_certific1"); + + b.Navigation("CompanyCertificateType"); + + b.Navigation("CompanyCertificateTypeStatus"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeDescription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", "CompanyCertificateType") + .WithMany() + .HasForeignKey("CompanyCertificateTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_certificate_type_descriptions_company_certificate_t"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany("CompanyCertificateTypeDescriptions") + .HasForeignKey("LanguageShortName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_certificate_type_descriptions_languages_language_te"); + + b.Navigation("CompanyCertificateType"); + + b.Navigation("Language"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Address", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Country", "Country") + .WithMany("Addresses") + .HasForeignKey("CountryAlpha2Code") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_addresses_countries_country_temp_id"); + + b.Navigation("Country"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Agreement", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementCategory", "AgreementCategory") + .WithMany("Agreements") + .HasForeignKey("AgreementCategoryId") + .IsRequired() + .HasConstraintName("fk_agreements_agreement_categories_agreement_category_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementStatus", null) + .WithMany("Agreements") + .HasForeignKey("AgreementStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_agreements_agreement_statuses_agreement_status_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", "Document") + .WithMany("Agreements") + .HasForeignKey("DocumentId") + .HasConstraintName("fk_agreements_documents_document_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "IssuerCompany") + .WithMany("Agreements") + .HasForeignKey("IssuerCompanyId") + .IsRequired() + .HasConstraintName("fk_agreements_companies_issuer_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCase", "UseCase") + .WithMany("Agreements") + .HasForeignKey("UseCaseId") + .HasConstraintName("fk_agreements_use_cases_use_case_id"); + + b.Navigation("AgreementCategory"); + + b.Navigation("Document"); + + b.Navigation("IssuerCompany"); + + b.Navigation("UseCase"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementAssignedCompanyRole", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Agreement", "Agreement") + .WithMany("AgreementAssignedCompanyRoles") + .HasForeignKey("AgreementId") + .IsRequired() + .HasConstraintName("fk_agreement_assigned_company_roles_agreements_agreement_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRole", "CompanyRole") + .WithMany("AgreementAssignedCompanyRoles") + .HasForeignKey("CompanyRoleId") + .IsRequired() + .HasConstraintName("fk_agreement_assigned_company_roles_company_roles_company_role"); + + b.Navigation("Agreement"); + + b.Navigation("CompanyRole"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementAssignedOffer", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Agreement", "Agreement") + .WithMany("AgreementAssignedOffers") + .HasForeignKey("AgreementId") + .IsRequired() + .HasConstraintName("fk_agreement_assigned_offers_agreements_agreement_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany("AgreementAssignedOffers") + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_agreement_assigned_offers_offers_offer_id"); + + b.Navigation("Agreement"); + + b.Navigation("Offer"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementAssignedOfferType", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Agreement", "Agreement") + .WithMany("AgreementAssignedOfferTypes") + .HasForeignKey("AgreementId") + .IsRequired() + .HasConstraintName("fk_agreement_assigned_offer_types_agreements_agreement_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferType", "OfferType") + .WithMany("AgreementAssignedOfferTypes") + .HasForeignKey("OfferTypeId") + .IsRequired() + .HasConstraintName("fk_agreement_assigned_offer_types_offer_types_offer_type_id"); + + b.Navigation("Agreement"); + + b.Navigation("OfferType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppAssignedUseCase", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "App") + .WithMany() + .HasForeignKey("AppId") + .IsRequired() + .HasConstraintName("fk_app_assigned_use_cases_offers_app_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCase", "UseCase") + .WithMany() + .HasForeignKey("UseCaseId") + .IsRequired() + .HasConstraintName("fk_app_assigned_use_cases_use_cases_use_case_id"); + + b.Navigation("App"); + + b.Navigation("UseCase"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstance", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "App") + .WithMany("AppInstances") + .HasForeignKey("AppId") + .OnDelete(DeleteBehavior.SetNull) + .IsRequired() + .HasConstraintName("fk_app_instances_offers_app_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IamClient", "IamClient") + .WithMany("AppInstances") + .HasForeignKey("IamClientId") + .OnDelete(DeleteBehavior.SetNull) + .IsRequired() + .HasConstraintName("fk_app_instances_iam_clients_iam_client_id"); + + b.Navigation("App"); + + b.Navigation("IamClient"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstanceAssignedCompanyServiceAccount", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstance", "AppInstance") + .WithMany("ServiceAccounts") + .HasForeignKey("AppInstanceId") + .IsRequired() + .HasConstraintName("fk_app_instance_assigned_service_accounts_app_instances_app_in"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccount", "CompanyServiceAccount") + .WithMany("AppInstances") + .HasForeignKey("CompanyServiceAccountId") + .IsRequired() + .HasConstraintName("fk_app_instance_assigned_service_accounts_company_service_acco"); + + b.Navigation("AppInstance"); + + b.Navigation("CompanyServiceAccount"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstanceSetup", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "App") + .WithOne("AppInstanceSetup") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstanceSetup", "AppId") + .IsRequired() + .HasConstraintName("fk_app_instance_setups_offers_app_id"); + + b.Navigation("App"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppLanguage", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "App") + .WithMany() + .HasForeignKey("AppId") + .IsRequired() + .HasConstraintName("fk_app_languages_offers_app_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany() + .HasForeignKey("LanguageShortName") + .IsRequired() + .HasConstraintName("fk_app_languages_languages_language_temp_id"); + + b.Navigation("App"); + + b.Navigation("Language"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppSubscriptionDetail", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstance", "AppInstance") + .WithMany("AppSubscriptionDetails") + .HasForeignKey("AppInstanceId") + .HasConstraintName("fk_app_subscription_details_app_instances_app_instance_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_app_subscription_details_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", "OfferSubscription") + .WithOne("AppSubscriptionDetail") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppSubscriptionDetail", "OfferSubscriptionId") + .IsRequired() + .HasConstraintName("fk_app_subscription_details_offer_subscriptions_offer_subscrip"); + + b.Navigation("AppInstance"); + + b.Navigation("LastEditor"); + + b.Navigation("OfferSubscription"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ApplicationChecklistEntry", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ApplicationChecklistEntryStatus", "ApplicationChecklistEntryStatus") + .WithMany("ApplicationChecklistEntries") + .HasForeignKey("ApplicationChecklistEntryStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_application_checklist_application_checklist_statuses_applic"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ApplicationChecklistEntryType", "ApplicationChecklistEntryType") + .WithMany("ApplicationChecklistEntries") + .HasForeignKey("ApplicationChecklistEntryTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_application_checklist_application_checklist_types_applicati"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplication", "Application") + .WithMany("ApplicationChecklistEntries") + .HasForeignKey("ApplicationId") + .IsRequired() + .HasConstraintName("fk_application_checklist_company_applications_application_id"); + + b.Navigation("Application"); + + b.Navigation("ApplicationChecklistEntryStatus"); + + b.Navigation("ApplicationChecklistEntryType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Address", "Address") + .WithMany("Companies") + .HasForeignKey("AddressId") + .HasConstraintName("fk_companies_addresses_address_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyStatus", "CompanyStatus") + .WithMany("Companies") + .HasForeignKey("CompanyStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_companies_company_statuses_company_status_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", "SelfDescriptionDocument") + .WithMany("Companies") + .HasForeignKey("SelfDescriptionDocumentId") + .HasConstraintName("fk_companies_documents_self_description_document_id"); + + b.Navigation("Address"); + + b.Navigation("CompanyStatus"); + + b.Navigation("SelfDescriptionDocument"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplication", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplicationStatus", "ApplicationStatus") + .WithMany("CompanyApplications") + .HasForeignKey("ApplicationStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_applications_company_application_statuses_applicati"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Process", "ChecklistProcess") + .WithOne("CompanyApplication") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplication", "ChecklistProcessId") + .HasConstraintName("fk_company_applications_processes_checklist_process_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplicationType", "CompanyApplicationType") + .WithMany("CompanyApplications") + .HasForeignKey("CompanyApplicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_applications_company_application_types_company_appl"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("CompanyApplications") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_company_applications_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_company_applications_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "OnboardingServiceProvider") + .WithMany("ProvidedApplications") + .HasForeignKey("OnboardingServiceProviderId") + .HasConstraintName("fk_company_applications_companies_onboarding_service_provider_"); + + b.Navigation("ApplicationStatus"); + + b.Navigation("ChecklistProcess"); + + b.Navigation("Company"); + + b.Navigation("CompanyApplicationType"); + + b.Navigation("LastEditor"); + + b.Navigation("OnboardingServiceProvider"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyAssignedRole", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("CompanyAssignedRoles") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_company_assigned_roles_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRole", "CompanyRole") + .WithMany("CompanyAssignedRoles") + .HasForeignKey("CompanyRoleId") + .IsRequired() + .HasConstraintName("fk_company_assigned_roles_company_roles_company_role_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_company_assigned_roles_identities_last_editor_id"); + + b.Navigation("Company"); + + b.Navigation("CompanyRole"); + + b.Navigation("LastEditor"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyAssignedUseCase", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("CompanyAssignedUseCase") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_company_assigned_use_cases_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCase", "UseCase") + .WithMany("CompanyAssignedUseCase") + .HasForeignKey("UseCaseId") + .IsRequired() + .HasConstraintName("fk_company_assigned_use_cases_use_cases_use_case_id"); + + b.Navigation("Company"); + + b.Navigation("UseCase"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyIdentifier", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("CompanyIdentifiers") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_company_identifiers_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UniqueIdentifier", "UniqueIdentifier") + .WithMany("CompanyIdentifiers") + .HasForeignKey("UniqueIdentifierId") + .IsRequired() + .HasConstraintName("fk_company_identifiers_unique_identifiers_unique_identifier_id"); + + b.Navigation("Company"); + + b.Navigation("UniqueIdentifier"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyIdentityProvider", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany() + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_company_identity_providers_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProvider", "IdentityProvider") + .WithMany("CompanyIdentityProviders") + .HasForeignKey("IdentityProviderId") + .IsRequired() + .HasConstraintName("fk_company_identity_providers_identity_providers_identity_prov"); + + b.Navigation("Company"); + + b.Navigation("IdentityProvider"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleAssignedRoleCollection", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRole", "CompanyRole") + .WithOne("CompanyRoleAssignedRoleCollection") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleAssignedRoleCollection", "CompanyRoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_role_assigned_role_collections_company_roles_compan"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleCollection", "UserRoleCollection") + .WithOne("CompanyRoleAssignedRoleCollection") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleAssignedRoleCollection", "UserRoleCollectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_role_assigned_role_collections_user_role_collection"); + + b.Navigation("CompanyRole"); + + b.Navigation("UserRoleCollection"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleDescription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRole", "CompanyRole") + .WithMany("CompanyRoleDescriptions") + .HasForeignKey("CompanyRoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_role_descriptions_company_roles_company_role_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany("CompanyRoleDescriptions") + .HasForeignKey("LanguageShortName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_role_descriptions_languages_language_temp_id2"); + + b.Navigation("CompanyRole"); + + b.Navigation("Language"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleRegistrationData", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRole", "CompanyRole") + .WithOne("CompanyRoleRegistrationData") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRoleRegistrationData", "CompanyRoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_role_registration_data_company_roles_company_role_id"); + + b.Navigation("CompanyRole"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccount", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccountType", "CompanyServiceAccountType") + .WithMany("CompanyServiceAccounts") + .HasForeignKey("CompanyServiceAccountTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_service_accounts_company_service_account_types_comp"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "Identity") + .WithOne("CompanyServiceAccount") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccount", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_service_accounts_identities_identity_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", "OfferSubscription") + .WithMany("CompanyServiceAccounts") + .HasForeignKey("OfferSubscriptionId") + .HasConstraintName("fk_company_service_accounts_offer_subscriptions_offer_subscrip"); + + b.Navigation("CompanyServiceAccountType"); + + b.Navigation("Identity"); + + b.Navigation("OfferSubscription"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanySsiDetail", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("CompanySsiDetails") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_company_ssi_details_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanySsiDetailStatus", "CompanySsiDetailStatus") + .WithMany("CompanySsiDetails") + .HasForeignKey("CompanySsiDetailStatusId") + .IsRequired() + .HasConstraintName("fk_company_ssi_details_company_ssi_detail_statuses_company_ssi"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "CreatorUser") + .WithMany("CompanySsiDetails") + .HasForeignKey("CreatorUserId") + .IsRequired() + .HasConstraintName("fk_company_ssi_details_company_users_creator_user_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", "Document") + .WithOne("CompanySsiDetail") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanySsiDetail", "DocumentId") + .IsRequired() + .HasConstraintName("fk_company_ssi_details_documents_document_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_company_ssi_details_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialExternalTypeUseCaseDetailVersion", "VerifiedCredentialExternalTypeUseCaseDetailVersion") + .WithMany("CompanySsiDetails") + .HasForeignKey("VerifiedCredentialExternalTypeUseCaseDetailId") + .HasConstraintName("fk_company_ssi_details_verified_credential_external_type_use_c"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialType", "VerifiedCredentialType") + .WithMany("CompanySsiDetails") + .HasForeignKey("VerifiedCredentialTypeId") + .IsRequired() + .HasConstraintName("fk_company_ssi_details_verified_credential_types_verified_cred"); + + b.Navigation("Company"); + + b.Navigation("CompanySsiDetailStatus"); + + b.Navigation("CreatorUser"); + + b.Navigation("Document"); + + b.Navigation("LastEditor"); + + b.Navigation("VerifiedCredentialExternalTypeUseCaseDetailVersion"); + + b.Navigation("VerifiedCredentialType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "Identity") + .WithOne("CompanyUser") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_users_identities_identity_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_company_users_identities_last_editor_id"); + + b.Navigation("Identity"); + + b.Navigation("LastEditor"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUserAssignedAppFavourite", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "App") + .WithMany() + .HasForeignKey("AppId") + .IsRequired() + .HasConstraintName("fk_company_user_assigned_app_favourites_offers_app_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "CompanyUser") + .WithMany() + .HasForeignKey("CompanyUserId") + .IsRequired() + .HasConstraintName("fk_company_user_assigned_app_favourites_company_users_company_"); + + b.Navigation("App"); + + b.Navigation("CompanyUser"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUserAssignedBusinessPartner", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "CompanyUser") + .WithMany("CompanyUserAssignedBusinessPartners") + .HasForeignKey("CompanyUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_user_assigned_business_partners_company_users_compa"); + + b.Navigation("CompanyUser"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUserAssignedIdentityProvider", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "CompanyUser") + .WithMany("CompanyUserAssignedIdentityProviders") + .HasForeignKey("CompanyUserId") + .IsRequired() + .HasConstraintName("fk_company_user_assigned_identity_providers_company_users_comp"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProvider", "IdentityProvider") + .WithMany("CompanyUserAssignedIdentityProviders") + .HasForeignKey("IdentityProviderId") + .IsRequired() + .HasConstraintName("fk_company_user_assigned_identity_providers_identity_providers"); + + b.Navigation("CompanyUser"); + + b.Navigation("IdentityProvider"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Connector", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccount", "CompanyServiceAccount") + .WithOne("Connector") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Connector", "CompanyServiceAccountId") + .HasConstraintName("fk_connectors_company_service_accounts_company_service_account"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Host") + .WithMany("HostedConnectors") + .HasForeignKey("HostId") + .HasConstraintName("fk_connectors_companies_host_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_connectors_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Country", "Location") + .WithMany("Connectors") + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_connectors_countries_location_temp_id1"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Provider") + .WithMany("ProvidedConnectors") + .HasForeignKey("ProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_connectors_companies_provider_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", "SelfDescriptionDocument") + .WithOne("Connector") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Connector", "SelfDescriptionDocumentId") + .HasConstraintName("fk_connectors_documents_self_description_document_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConnectorStatus", "Status") + .WithMany("Connectors") + .HasForeignKey("StatusId") + .IsRequired() + .HasConstraintName("fk_connectors_connector_statuses_status_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConnectorType", "Type") + .WithMany("Connectors") + .HasForeignKey("TypeId") + .IsRequired() + .HasConstraintName("fk_connectors_connector_types_type_id"); + + b.Navigation("CompanyServiceAccount"); + + b.Navigation("Host"); + + b.Navigation("LastEditor"); + + b.Navigation("Location"); + + b.Navigation("Provider"); + + b.Navigation("SelfDescriptionDocument"); + + b.Navigation("Status"); + + b.Navigation("Type"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConnectorAssignedOfferSubscription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Connector", "Connector") + .WithMany("ConnectorAssignedOfferSubscriptions") + .HasForeignKey("ConnectorId") + .IsRequired() + .HasConstraintName("fk_connector_assigned_offer_subscriptions_connectors_connector"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", "OfferSubscription") + .WithMany("ConnectorAssignedOfferSubscriptions") + .HasForeignKey("OfferSubscriptionId") + .IsRequired() + .HasConstraintName("fk_connector_assigned_offer_subscriptions_offer_subscriptions_"); + + b.Navigation("Connector"); + + b.Navigation("OfferSubscription"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Consent", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Agreement", "Agreement") + .WithMany("Consents") + .HasForeignKey("AgreementId") + .IsRequired() + .HasConstraintName("fk_consents_agreements_agreement_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("Consents") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_consents_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "CompanyUser") + .WithMany("Consents") + .HasForeignKey("CompanyUserId") + .IsRequired() + .HasConstraintName("fk_consents_company_users_company_user_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConsentStatus", "ConsentStatus") + .WithMany("Consents") + .HasForeignKey("ConsentStatusId") + .IsRequired() + .HasConstraintName("fk_consents_consent_statuses_consent_status_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", "Document") + .WithMany("Consents") + .HasForeignKey("DocumentId") + .HasConstraintName("fk_consents_documents_document_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_consents_identities_last_editor_id"); + + b.Navigation("Agreement"); + + b.Navigation("Company"); + + b.Navigation("CompanyUser"); + + b.Navigation("ConsentStatus"); + + b.Navigation("Document"); + + b.Navigation("LastEditor"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConsentAssignedOffer", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Consent", "Consent") + .WithMany("ConsentAssignedOffers") + .HasForeignKey("ConsentId") + .IsRequired() + .HasConstraintName("fk_consent_assigned_offers_consents_consent_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany("ConsentAssignedOffers") + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_consent_assigned_offers_offers_offer_id"); + + b.Navigation("Consent"); + + b.Navigation("Offer"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConsentAssignedOfferSubscription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Consent", "Consent") + .WithMany("ConsentAssignedOfferSubscriptions") + .HasForeignKey("ConsentId") + .IsRequired() + .HasConstraintName("fk_consent_assigned_offer_subscriptions_consents_consent_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", "OfferSubscription") + .WithMany("ConsentAssignedOfferSubscriptions") + .HasForeignKey("OfferSubscriptionId") + .IsRequired() + .HasConstraintName("fk_consent_assigned_offer_subscriptions_offer_subscriptions_of"); + + b.Navigation("Consent"); + + b.Navigation("OfferSubscription"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CountryAssignedIdentifier", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.BpdmIdentifier", "BpdmIdentifier") + .WithMany("CountryAssignedIdentifiers") + .HasForeignKey("BpdmIdentifierId") + .HasConstraintName("fk_country_assigned_identifiers_bpdm_identifiers_bpdm_identifi"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Country", "Country") + .WithMany("CountryAssignedIdentifiers") + .HasForeignKey("CountryAlpha2Code") + .IsRequired() + .HasConstraintName("fk_country_assigned_identifiers_countries_country_alpha2code"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UniqueIdentifier", "UniqueIdentifier") + .WithMany("CountryAssignedIdentifiers") + .HasForeignKey("UniqueIdentifierId") + .IsRequired() + .HasConstraintName("fk_country_assigned_identifiers_unique_identifiers_unique_iden"); + + b.Navigation("BpdmIdentifier"); + + b.Navigation("Country"); + + b.Navigation("UniqueIdentifier"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CountryLongName", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Country", "Country") + .WithMany("CountryLongNames") + .HasForeignKey("Alpha2Code") + .IsRequired() + .HasConstraintName("fk_country_long_names_countries_country_alpha2code"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany("CountryLongNames") + .HasForeignKey("ShortName") + .IsRequired() + .HasConstraintName("fk_country_long_names_languages_language_temp_id3"); + + b.Navigation("Country"); + + b.Navigation("Language"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "CompanyUser") + .WithMany("Documents") + .HasForeignKey("CompanyUserId") + .HasConstraintName("fk_documents_company_users_company_user_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.DocumentStatus", "DocumentStatus") + .WithMany("Documents") + .HasForeignKey("DocumentStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_documents_document_status_document_status_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.DocumentType", "DocumentType") + .WithMany("Documents") + .HasForeignKey("DocumentTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_documents_document_types_document_type_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.MediaType", "MediaType") + .WithMany("Documents") + .HasForeignKey("MediaTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_documents_media_types_media_type_id"); + + b.Navigation("CompanyUser"); + + b.Navigation("DocumentStatus"); + + b.Navigation("DocumentType"); + + b.Navigation("MediaType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IamIdentityProvider", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProvider", "IdentityProvider") + .WithOne("IamIdentityProvider") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IamIdentityProvider", "IdentityProviderId") + .IsRequired() + .HasConstraintName("fk_iam_identity_providers_identity_providers_identity_provider"); + + b.Navigation("IdentityProvider"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("Identities") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_identities_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityType", "IdentityType") + .WithMany("Identities") + .HasForeignKey("IdentityTypeId") + .IsRequired() + .HasConstraintName("fk_identities_identity_type_identity_type_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_identities_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityUserStatus", "IdentityStatus") + .WithMany("Identities") + .HasForeignKey("UserStatusId") + .IsRequired() + .HasConstraintName("fk_identities_identity_user_statuses_identity_status_id"); + + b.Navigation("Company"); + + b.Navigation("IdentityStatus"); + + b.Navigation("IdentityType"); + + b.Navigation("LastEditor"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityAssignedRole", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "Identity") + .WithMany("IdentityAssignedRoles") + .HasForeignKey("IdentityId") + .IsRequired() + .HasConstraintName("fk_identity_assigned_roles_identities_identity_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_identity_assigned_roles_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRole", "UserRole") + .WithMany("IdentityAssignedRoles") + .HasForeignKey("UserRoleId") + .IsRequired() + .HasConstraintName("fk_identity_assigned_roles_user_roles_user_role_id"); + + b.Navigation("Identity"); + + b.Navigation("LastEditor"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProvider", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProviderCategory", "IdentityProviderCategory") + .WithMany("IdentityProviders") + .HasForeignKey("IdentityProviderCategoryId") + .IsRequired() + .HasConstraintName("fk_identity_providers_identity_provider_categories_identity_pr"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProviderType", "IdentityProviderType") + .WithMany("IdentityProviders") + .HasForeignKey("IdentityProviderTypeId") + .IsRequired() + .HasConstraintName("fk_identity_providers_identity_provider_types_identity_provide"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Owner") + .WithMany("OwnedIdentityProviders") + .HasForeignKey("OwnerId") + .IsRequired() + .HasConstraintName("fk_identity_providers_companies_owner_id"); + + b.Navigation("IdentityProviderCategory"); + + b.Navigation("IdentityProviderType"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Invitation", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplication", "CompanyApplication") + .WithMany("Invitations") + .HasForeignKey("CompanyApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_invitations_company_applications_company_application_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "CompanyUser") + .WithMany("Invitations") + .HasForeignKey("CompanyUserId") + .IsRequired() + .HasConstraintName("fk_invitations_company_users_company_user_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.InvitationStatus", "InvitationStatus") + .WithMany("Invitations") + .HasForeignKey("InvitationStatusId") + .IsRequired() + .HasConstraintName("fk_invitations_invitation_statuses_invitation_status_id"); + + b.Navigation("CompanyApplication"); + + b.Navigation("CompanyUser"); + + b.Navigation("InvitationStatus"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.LanguageLongName", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "LongNameLanguage") + .WithMany("LanguageLongNameLanguages") + .HasForeignKey("LanguageShortName") + .IsRequired() + .HasConstraintName("fk_language_long_names_languages_long_name_language_short_name"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany("LanguageLongNames") + .HasForeignKey("ShortName") + .IsRequired() + .HasConstraintName("fk_language_long_names_languages_language_short_name"); + + b.Navigation("Language"); + + b.Navigation("LongNameLanguage"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NetworkRegistration", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplication", "CompanyApplication") + .WithOne("NetworkRegistration") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NetworkRegistration", "ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_network_registrations_company_applications_application_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithOne("NetworkRegistration") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NetworkRegistration", "CompanyId") + .IsRequired() + .HasConstraintName("fk_network_registrations_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "OnboardingServiceProvider") + .WithMany("OnboardedNetworkRegistrations") + .HasForeignKey("OnboardingServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_network_registrations_companies_onboarding_service_provider"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Process", "Process") + .WithOne("NetworkRegistration") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NetworkRegistration", "ProcessId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_network_registrations_processes_process_id"); + + b.Navigation("Company"); + + b.Navigation("CompanyApplication"); + + b.Navigation("OnboardingServiceProvider"); + + b.Navigation("Process"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Notification", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "Creator") + .WithMany("CreatedNotifications") + .HasForeignKey("CreatorUserId") + .HasConstraintName("fk_notifications_identities_creator_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationType", "NotificationType") + .WithMany("Notifications") + .HasForeignKey("NotificationTypeId") + .IsRequired() + .HasConstraintName("fk_notifications_notification_type_notification_type_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "Receiver") + .WithMany("Notifications") + .HasForeignKey("ReceiverUserId") + .IsRequired() + .HasConstraintName("fk_notifications_company_users_receiver_id"); + + b.Navigation("Creator"); + + b.Navigation("NotificationType"); + + b.Navigation("Receiver"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationTypeAssignedTopic", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationTopic", "NotificationTopic") + .WithMany("NotificationTypeAssignedTopics") + .HasForeignKey("NotificationTopicId") + .IsRequired() + .HasConstraintName("fk_notification_type_assigned_topics_notification_topic_notifi"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationType", "NotificationType") + .WithOne("NotificationTypeAssignedTopic") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationTypeAssignedTopic", "NotificationTypeId") + .IsRequired() + .HasConstraintName("fk_notification_type_assigned_topics_notification_type_notific"); + + b.Navigation("NotificationTopic"); + + b.Navigation("NotificationType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_offers_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.LicenseType", "LicenseType") + .WithMany("Offers") + .HasForeignKey("LicenseTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_offers_license_types_license_type_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferStatus", "OfferStatus") + .WithMany("Offers") + .HasForeignKey("OfferStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_offers_offer_statuses_offer_status_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferType", "OfferType") + .WithMany("Offers") + .HasForeignKey("OfferTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_offers_offer_types_offer_type_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "ProviderCompany") + .WithMany("ProvidedOffers") + .HasForeignKey("ProviderCompanyId") + .HasConstraintName("fk_offers_companies_provider_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "SalesManager") + .WithMany("SalesManagerOfOffers") + .HasForeignKey("SalesManagerId") + .HasConstraintName("fk_offers_company_users_sales_manager_id"); + + b.Navigation("LastEditor"); + + b.Navigation("LicenseType"); + + b.Navigation("OfferStatus"); + + b.Navigation("OfferType"); + + b.Navigation("ProviderCompany"); + + b.Navigation("SalesManager"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferAssignedDocument", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", "Document") + .WithMany() + .HasForeignKey("DocumentId") + .IsRequired() + .HasConstraintName("fk_offer_assigned_documents_documents_document_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany() + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_offer_assigned_documents_offers_offer_id"); + + b.Navigation("Document"); + + b.Navigation("Offer"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferAssignedLicense", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany() + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_offer_assigned_licenses_offers_offer_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferLicense", "OfferLicense") + .WithMany() + .HasForeignKey("OfferLicenseId") + .IsRequired() + .HasConstraintName("fk_offer_assigned_licenses_offer_licenses_offer_license_id"); + + b.Navigation("Offer"); + + b.Navigation("OfferLicense"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferAssignedPrivacyPolicy", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany("OfferAssignedPrivacyPolicies") + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_offer_assigned_privacy_policies_offers_offer_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.PrivacyPolicy", "PrivacyPolicy") + .WithMany("OfferAssignedPrivacyPolicies") + .HasForeignKey("PrivacyPolicyId") + .IsRequired() + .HasConstraintName("fk_offer_assigned_privacy_policies_privacy_policies_privacy_po"); + + b.Navigation("Offer"); + + b.Navigation("PrivacyPolicy"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferDescription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany("AppDescriptions") + .HasForeignKey("LanguageShortName") + .IsRequired() + .HasConstraintName("fk_offer_descriptions_languages_language_short_name"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany("OfferDescriptions") + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_offer_descriptions_offers_offer_id"); + + b.Navigation("Language"); + + b.Navigation("Offer"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("OfferSubscriptions") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_offer_subscriptions_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_offer_subscriptions_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany("OfferSubscriptions") + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_offer_subscriptions_offers_offer_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscriptionStatus", "OfferSubscriptionStatus") + .WithMany("OfferSubscriptions") + .HasForeignKey("OfferSubscriptionStatusId") + .IsRequired() + .HasConstraintName("fk_offer_subscriptions_offer_subscription_statuses_offer_subsc"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Process", "Process") + .WithOne("OfferSubscription") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", "ProcessId") + .HasConstraintName("fk_offer_subscriptions_processes_process_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", "Requester") + .WithMany("RequestedSubscriptions") + .HasForeignKey("RequesterId") + .IsRequired() + .HasConstraintName("fk_offer_subscriptions_company_users_requester_id"); + + b.Navigation("Company"); + + b.Navigation("LastEditor"); + + b.Navigation("Offer"); + + b.Navigation("OfferSubscriptionStatus"); + + b.Navigation("Process"); + + b.Navigation("Requester"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscriptionProcessData", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", "OfferSubscription") + .WithOne("OfferSubscriptionProcessData") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscriptionProcessData", "OfferSubscriptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_offer_subscriptions_process_datas_offer_subscriptions_offer"); + + b.Navigation("OfferSubscription"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferTag", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany("Tags") + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_offer_tags_offers_offer_id"); + + b.Navigation("Offer"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OnboardingServiceProviderDetail", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithOne("OnboardingServiceProviderDetail") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OnboardingServiceProviderDetail", "CompanyId") + .IsRequired() + .HasConstraintName("fk_onboarding_service_provider_details_companies_company_id"); + + b.Navigation("Company"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Process", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessType", "ProcessType") + .WithMany("Processes") + .HasForeignKey("ProcessTypeId") + .IsRequired() + .HasConstraintName("fk_processes_process_types_process_type_id"); + + b.Navigation("ProcessType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessStep", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Process", "Process") + .WithMany("ProcessSteps") + .HasForeignKey("ProcessId") + .IsRequired() + .HasConstraintName("fk_process_steps_processes_process_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessStepStatus", "ProcessStepStatus") + .WithMany("ProcessSteps") + .HasForeignKey("ProcessStepStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_process_steps_process_step_statuses_process_step_status_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessStepType", "ProcessStepType") + .WithMany("ProcessSteps") + .HasForeignKey("ProcessStepTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_process_steps_process_step_types_process_step_type_id"); + + b.Navigation("Process"); + + b.Navigation("ProcessStepStatus"); + + b.Navigation("ProcessStepType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProviderCompanyDetail", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithOne("ProviderCompanyDetail") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProviderCompanyDetail", "CompanyId") + .IsRequired() + .HasConstraintName("fk_provider_company_details_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_provider_company_details_identities_last_editor_id"); + + b.Navigation("Company"); + + b.Navigation("LastEditor"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ServiceDetail", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Service") + .WithMany("ServiceDetails") + .HasForeignKey("ServiceId") + .IsRequired() + .HasConstraintName("fk_service_details_offers_service_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ServiceType", "ServiceType") + .WithMany("ServiceDetails") + .HasForeignKey("ServiceTypeId") + .IsRequired() + .HasConstraintName("fk_service_details_service_types_service_type_id"); + + b.Navigation("Service"); + + b.Navigation("ServiceType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.TechnicalUserProfile", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany("TechnicalUserProfiles") + .HasForeignKey("OfferId") + .IsRequired() + .HasConstraintName("fk_technical_user_profiles_offers_offer_id"); + + b.Navigation("Offer"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.TechnicalUserProfileAssignedUserRole", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.TechnicalUserProfile", "TechnicalUserProfile") + .WithMany("TechnicalUserProfileAssignedUserRoles") + .HasForeignKey("TechnicalUserProfileId") + .IsRequired() + .HasConstraintName("fk_technical_user_profile_assigned_user_roles_technical_user_p"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRole", "UserRole") + .WithMany("TechnicalUserProfileAssignedUserRole") + .HasForeignKey("UserRoleId") + .IsRequired() + .HasConstraintName("fk_technical_user_profile_assigned_user_roles_user_roles_user_r"); + + b.Navigation("TechnicalUserProfile"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCaseDescription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany("UseCases") + .HasForeignKey("LanguageShortName") + .IsRequired() + .HasConstraintName("fk_use_case_descriptions_languages_language_short_name"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCase", "UseCase") + .WithMany("UseCaseDescriptions") + .HasForeignKey("UseCaseId") + .IsRequired() + .HasConstraintName("fk_use_case_descriptions_use_cases_use_case_id"); + + b.Navigation("Language"); + + b.Navigation("UseCase"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRole", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", "LastEditor") + .WithMany() + .HasForeignKey("LastEditorId") + .HasConstraintName("fk_user_roles_identities_last_editor_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", "Offer") + .WithMany("UserRoles") + .HasForeignKey("OfferId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_roles_offers_offer_id"); + + b.Navigation("LastEditor"); + + b.Navigation("Offer"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleAssignedCollection", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleCollection", "UserRoleCollection") + .WithMany() + .HasForeignKey("UserRoleCollectionId") + .IsRequired() + .HasConstraintName("fk_user_role_assigned_collections_user_role_collections_user_r"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRole", "UserRole") + .WithMany() + .HasForeignKey("UserRoleId") + .IsRequired() + .HasConstraintName("fk_user_role_assigned_collections_user_roles_user_role_id"); + + b.Navigation("UserRole"); + + b.Navigation("UserRoleCollection"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleCollectionDescription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany() + .HasForeignKey("LanguageShortName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_role_collection_descriptions_languages_language_short_"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleCollection", "UserRoleCollection") + .WithMany("UserRoleCollectionDescriptions") + .HasForeignKey("UserRoleCollectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_role_collection_descriptions_user_role_collections_use"); + + b.Navigation("Language"); + + b.Navigation("UserRoleCollection"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleDescription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany("UserRoleDescriptions") + .HasForeignKey("LanguageShortName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_role_descriptions_languages_language_short_name"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRole", "UserRole") + .WithMany("UserRoleDescriptions") + .HasForeignKey("UserRoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_role_descriptions_user_roles_user_role_id"); + + b.Navigation("Language"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialExternalTypeUseCaseDetailVersion", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialExternalType", "VerifiedCredentialExternalType") + .WithMany("VerifiedCredentialExternalTypeUseCaseDetailVersions") + .HasForeignKey("VerifiedCredentialExternalTypeId") + .IsRequired() + .HasConstraintName("fk_verified_credential_external_type_use_case_detail_versions_"); + + b.Navigation("VerifiedCredentialExternalType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedExternalType", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialExternalType", "VerifiedCredentialExternalType") + .WithMany("VerifiedCredentialTypeAssignedExternalTypes") + .HasForeignKey("VerifiedCredentialExternalTypeId") + .IsRequired() + .HasConstraintName("fk_verified_credential_type_assigned_external_types_verified_c"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialType", "VerifiedCredentialType") + .WithOne("VerifiedCredentialTypeAssignedExternalType") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedExternalType", "VerifiedCredentialTypeId") + .IsRequired() + .HasConstraintName("fk_verified_credential_type_assigned_external_types_verified_c1"); + + b.Navigation("VerifiedCredentialExternalType"); + + b.Navigation("VerifiedCredentialType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedKind", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialType", "VerifiedCredentialType") + .WithOne("VerifiedCredentialTypeAssignedKind") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedKind", "VerifiedCredentialTypeId") + .IsRequired() + .HasConstraintName("fk_verified_credential_type_assigned_kinds_verified_credential"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeKind", "VerifiedCredentialTypeKind") + .WithMany("VerifiedCredentialTypeAssignedKinds") + .HasForeignKey("VerifiedCredentialTypeKindId") + .IsRequired() + .HasConstraintName("fk_verified_credential_type_assigned_kinds_verified_credential1"); + + b.Navigation("VerifiedCredentialType"); + + b.Navigation("VerifiedCredentialTypeKind"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedUseCase", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCase", "UseCase") + .WithOne("VerifiedCredentialAssignedUseCase") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedUseCase", "UseCaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_verified_credential_type_assigned_use_cases_use_cases_use_c"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialType", "VerifiedCredentialType") + .WithOne("VerifiedCredentialTypeAssignedUseCase") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeAssignedUseCase", "VerifiedCredentialTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_verified_credential_type_assigned_use_cases_verified_creden"); + + b.Navigation("UseCase"); + + b.Navigation("VerifiedCredentialType"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.CompaniesLinkedServiceAccount", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccount", "CompanyServiceAccount") + .WithOne("CompaniesLinkedServiceAccount") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Views.CompaniesLinkedServiceAccount", "ServiceAccountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_linked_service_accounts_company_service_accounts_co"); + + b.Navigation("CompanyServiceAccount"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", b => + { + b.Navigation("CompanyCertificateTypeAssignedStatus"); + + b.Navigation("CompanyCertificates"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeStatus", b => + { + b.Navigation("CompanyCertificateTypeAssignedStatuses"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Address", b => + { + b.Navigation("Companies"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Agreement", b => + { + b.Navigation("AgreementAssignedCompanyRoles"); + + b.Navigation("AgreementAssignedOfferTypes"); + + b.Navigation("AgreementAssignedOffers"); + + b.Navigation("Consents"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementCategory", b => + { + b.Navigation("Agreements"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AgreementStatus", b => + { + b.Navigation("Agreements"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.AppInstance", b => + { + b.Navigation("AppSubscriptionDetails"); + + b.Navigation("ServiceAccounts"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ApplicationChecklistEntryStatus", b => + { + b.Navigation("ApplicationChecklistEntries"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ApplicationChecklistEntryType", b => + { + b.Navigation("ApplicationChecklistEntries"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.BpdmIdentifier", b => + { + b.Navigation("CountryAssignedIdentifiers"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", b => + { + b.Navigation("Agreements"); + + b.Navigation("CompanyApplications"); + + b.Navigation("CompanyAssignedRoles"); + + b.Navigation("CompanyAssignedUseCase"); + + b.Navigation("CompanyCertificates"); + + b.Navigation("CompanyIdentifiers"); + + b.Navigation("CompanySsiDetails"); + + b.Navigation("Consents"); + + b.Navigation("HostedConnectors"); + + b.Navigation("Identities"); + + b.Navigation("NetworkRegistration"); + + b.Navigation("OfferSubscriptions"); + + b.Navigation("OnboardedNetworkRegistrations"); + + b.Navigation("OnboardingServiceProviderDetail"); + + b.Navigation("OwnedIdentityProviders"); + + b.Navigation("ProvidedApplications"); + + b.Navigation("ProvidedConnectors"); + + b.Navigation("ProvidedOffers"); + + b.Navigation("ProviderCompanyDetail"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplication", b => + { + b.Navigation("ApplicationChecklistEntries"); + + b.Navigation("Invitations"); + + b.Navigation("NetworkRegistration"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplicationStatus", b => + { + b.Navigation("CompanyApplications"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyApplicationType", b => + { + b.Navigation("CompanyApplications"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyRole", b => + { + b.Navigation("AgreementAssignedCompanyRoles"); + + b.Navigation("CompanyAssignedRoles"); + + b.Navigation("CompanyRoleAssignedRoleCollection"); + + b.Navigation("CompanyRoleDescriptions"); + + b.Navigation("CompanyRoleRegistrationData"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccount", b => + { + b.Navigation("AppInstances"); + + b.Navigation("CompaniesLinkedServiceAccount"); + + b.Navigation("Connector"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyServiceAccountType", b => + { + b.Navigation("CompanyServiceAccounts"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanySsiDetailStatus", b => + { + b.Navigation("CompanySsiDetails"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyStatus", b => + { + b.Navigation("Companies"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.CompanyUser", b => + { + b.Navigation("CompanySsiDetails"); + + b.Navigation("CompanyUserAssignedBusinessPartners"); + + b.Navigation("CompanyUserAssignedIdentityProviders"); + + b.Navigation("Consents"); + + b.Navigation("Documents"); + + b.Navigation("Invitations"); + + b.Navigation("Notifications"); + + b.Navigation("RequestedSubscriptions"); + + b.Navigation("SalesManagerOfOffers"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Connector", b => + { + b.Navigation("ConnectorAssignedOfferSubscriptions"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConnectorStatus", b => + { + b.Navigation("Connectors"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConnectorType", b => + { + b.Navigation("Connectors"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Consent", b => + { + b.Navigation("ConsentAssignedOfferSubscriptions"); + + b.Navigation("ConsentAssignedOffers"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ConsentStatus", b => + { + b.Navigation("Consents"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Country", b => + { + b.Navigation("Addresses"); + + b.Navigation("Connectors"); + + b.Navigation("CountryAssignedIdentifiers"); + + b.Navigation("CountryLongNames"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", b => + { + b.Navigation("Agreements"); + + b.Navigation("Companies"); + + b.Navigation("CompanyCertificates"); + + b.Navigation("CompanySsiDetail"); + + b.Navigation("Connector"); + + b.Navigation("Consents"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.DocumentStatus", b => + { + b.Navigation("Documents"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.DocumentType", b => + { + b.Navigation("Documents"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IamClient", b => + { + b.Navigation("AppInstances"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Identity", b => + { + b.Navigation("CompanyServiceAccount"); + + b.Navigation("CompanyUser"); + + b.Navigation("CreatedNotifications"); + + b.Navigation("IdentityAssignedRoles"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProvider", b => + { + b.Navigation("CompanyIdentityProviders"); + + b.Navigation("CompanyUserAssignedIdentityProviders"); + + b.Navigation("IamIdentityProvider"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProviderCategory", b => + { + b.Navigation("IdentityProviders"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityProviderType", b => + { + b.Navigation("IdentityProviders"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityType", b => + { + b.Navigation("Identities"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.IdentityUserStatus", b => + { + b.Navigation("Identities"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.InvitationStatus", b => + { + b.Navigation("Invitations"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", b => + { + b.Navigation("AppDescriptions"); + + b.Navigation("CompanyCertificateTypeDescriptions"); + + b.Navigation("CompanyRoleDescriptions"); + + b.Navigation("CountryLongNames"); + + b.Navigation("LanguageLongNameLanguages"); + + b.Navigation("LanguageLongNames"); + + b.Navigation("UseCases"); + + b.Navigation("UserRoleDescriptions"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.LicenseType", b => + { + b.Navigation("Offers"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.MediaType", b => + { + b.Navigation("Documents"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationTopic", b => + { + b.Navigation("NotificationTypeAssignedTopics"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.NotificationType", b => + { + b.Navigation("NotificationTypeAssignedTopic"); + + b.Navigation("Notifications"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Offer", b => + { + b.Navigation("AgreementAssignedOffers"); + + b.Navigation("AppInstanceSetup"); + + b.Navigation("AppInstances"); + + b.Navigation("ConsentAssignedOffers"); + + b.Navigation("OfferAssignedPrivacyPolicies"); + + b.Navigation("OfferDescriptions"); + + b.Navigation("OfferSubscriptions"); + + b.Navigation("ServiceDetails"); + + b.Navigation("Tags"); + + b.Navigation("TechnicalUserProfiles"); + + b.Navigation("UserRoles"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferStatus", b => + { + b.Navigation("Offers"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscription", b => + { + b.Navigation("AppSubscriptionDetail"); + + b.Navigation("CompanyServiceAccounts"); + + b.Navigation("ConnectorAssignedOfferSubscriptions"); + + b.Navigation("ConsentAssignedOfferSubscriptions"); + + b.Navigation("OfferSubscriptionProcessData"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferSubscriptionStatus", b => + { + b.Navigation("OfferSubscriptions"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.OfferType", b => + { + b.Navigation("AgreementAssignedOfferTypes"); + + b.Navigation("Offers"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.PrivacyPolicy", b => + { + b.Navigation("OfferAssignedPrivacyPolicies"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Process", b => + { + b.Navigation("CompanyApplication"); + + b.Navigation("NetworkRegistration"); + + b.Navigation("OfferSubscription"); + + b.Navigation("ProcessSteps"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessStepStatus", b => + { + b.Navigation("ProcessSteps"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessStepType", b => + { + b.Navigation("ProcessSteps"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ProcessType", b => + { + b.Navigation("Processes"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.ServiceType", b => + { + b.Navigation("ServiceDetails"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.TechnicalUserProfile", b => + { + b.Navigation("TechnicalUserProfileAssignedUserRoles"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UniqueIdentifier", b => + { + b.Navigation("CompanyIdentifiers"); + + b.Navigation("CountryAssignedIdentifiers"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UseCase", b => + { + b.Navigation("Agreements"); + + b.Navigation("CompanyAssignedUseCase"); + + b.Navigation("UseCaseDescriptions"); + + b.Navigation("VerifiedCredentialAssignedUseCase"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRole", b => + { + b.Navigation("IdentityAssignedRoles"); + + b.Navigation("TechnicalUserProfileAssignedUserRole"); + + b.Navigation("UserRoleDescriptions"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.UserRoleCollection", b => + { + b.Navigation("CompanyRoleAssignedRoleCollection"); + + b.Navigation("UserRoleCollectionDescriptions"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialExternalType", b => + { + b.Navigation("VerifiedCredentialExternalTypeUseCaseDetailVersions"); + + b.Navigation("VerifiedCredentialTypeAssignedExternalTypes"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialExternalTypeUseCaseDetailVersion", b => + { + b.Navigation("CompanySsiDetails"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialType", b => + { + b.Navigation("CompanySsiDetails"); + + b.Navigation("VerifiedCredentialTypeAssignedExternalType"); + + b.Navigation("VerifiedCredentialTypeAssignedKind"); + + b.Navigation("VerifiedCredentialTypeAssignedUseCase"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.VerifiedCredentialTypeKind", b => + { + b.Navigation("VerifiedCredentialTypeAssignedKinds"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/portalbackend/PortalBackend.Migrations/Migrations/20240206012951_1.8.0-rc5.cs b/src/portalbackend/PortalBackend.Migrations/Migrations/20240206012951_1.8.0-rc5.cs new file mode 100644 index 0000000000..d3397610b1 --- /dev/null +++ b/src/portalbackend/PortalBackend.Migrations/Migrations/20240206012951_1.8.0-rc5.cs @@ -0,0 +1,358 @@ +/******************************************************************************** + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.Migrations.Migrations +{ + /// + public partial class _180rc5 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "fk_company_role_descriptions_languages_language_temp_id1", + schema: "portal", + table: "company_role_descriptions"); + + migrationBuilder.DropForeignKey( + name: "fk_country_long_names_languages_language_temp_id2", + schema: "portal", + table: "country_long_names"); + + migrationBuilder.AddColumn( + name: "metadata_url", + schema: "portal", + table: "iam_identity_providers", + type: "text", + nullable: true); + + migrationBuilder.CreateTable( + name: "company_certificate_statuses", + schema: "portal", + columns: table => new + { + id = table.Column(type: "integer", nullable: false), + label = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_company_certificate_statuses", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "company_certificate_type_statuses", + schema: "portal", + columns: table => new + { + id = table.Column(type: "integer", nullable: false), + label = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_company_certificate_type_statuses", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "company_certificate_types", + schema: "portal", + columns: table => new + { + id = table.Column(type: "integer", nullable: false), + label = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_company_certificate_types", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "company_certificate_type_assigned_statuses", + schema: "portal", + columns: table => new + { + company_certificate_type_id = table.Column(type: "integer", nullable: false), + company_certificate_type_status_id = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_company_certificate_type_assigned_statuses", x => x.company_certificate_type_id); + table.ForeignKey( + name: "fk_company_certificate_type_assigned_statuses_company_certific", + column: x => x.company_certificate_type_id, + principalSchema: "portal", + principalTable: "company_certificate_types", + principalColumn: "id"); + table.ForeignKey( + name: "fk_company_certificate_type_assigned_statuses_company_certific1", + column: x => x.company_certificate_type_status_id, + principalSchema: "portal", + principalTable: "company_certificate_type_statuses", + principalColumn: "id"); + }); + + migrationBuilder.CreateTable( + name: "company_certificate_type_descriptions", + schema: "portal", + columns: table => new + { + company_certificate_type_id = table.Column(type: "integer", nullable: false), + language_short_name = table.Column(type: "character(2)", maxLength: 2, nullable: false), + description = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_company_certificate_type_descriptions", x => new { x.company_certificate_type_id, x.language_short_name }); + table.ForeignKey( + name: "fk_company_certificate_type_descriptions_company_certificate_t", + column: x => x.company_certificate_type_id, + principalSchema: "portal", + principalTable: "company_certificate_types", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "fk_company_certificate_type_descriptions_languages_language_te", + column: x => x.language_short_name, + principalSchema: "portal", + principalTable: "languages", + principalColumn: "short_name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "company_certificates", + schema: "portal", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + valid_from = table.Column(type: "timestamp with time zone", nullable: false), + valid_till = table.Column(type: "timestamp with time zone", nullable: true), + company_certificate_type_id = table.Column(type: "integer", nullable: false), + company_certificate_status_id = table.Column(type: "integer", nullable: false), + company_id = table.Column(type: "uuid", nullable: false), + document_id = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_company_certificates", x => x.id); + table.ForeignKey( + name: "fk_company_certificates_companies_company_id", + column: x => x.company_id, + principalSchema: "portal", + principalTable: "companies", + principalColumn: "id"); + table.ForeignKey( + name: "fk_company_certificates_company_certificate_statuses_company_c", + column: x => x.company_certificate_status_id, + principalSchema: "portal", + principalTable: "company_certificate_statuses", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "fk_company_certificates_company_certificate_types_company_cert", + column: x => x.company_certificate_type_id, + principalSchema: "portal", + principalTable: "company_certificate_types", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "fk_company_certificates_documents_document_id", + column: x => x.document_id, + principalSchema: "portal", + principalTable: "documents", + principalColumn: "id"); + }); + + migrationBuilder.InsertData( + schema: "portal", + table: "company_certificate_statuses", + columns: new[] { "id", "label" }, + values: new object[,] + { + { 1, "IN_REVIEW" }, + { 2, "ACTIVE" }, + { 3, "INACTVIE" } + }); + + migrationBuilder.InsertData( + schema: "portal", + table: "company_certificate_type_statuses", + columns: new[] { "id", "label" }, + values: new object[,] + { + { 1, "ACTIVE" }, + { 2, "INACTVIE" } + }); + + migrationBuilder.InsertData( + schema: "portal", + table: "company_certificate_types", + columns: new[] { "id", "label" }, + values: new object[,] + { + { 1, "AEO_CTPAT_Security_Declaration" }, + { 2, "ISO_9001" }, + { 3, "IATF_16949" }, + { 4, "ISO_14001_EMAS_or_national_certification" }, + { 5, "ISO_45001_OHSAS_18001_or_national_certification" }, + { 6, "ISO_IEC_27001" }, + { 7, "ISO_50001_or_national_certification" }, + { 8, "ISO_IEC_17025" }, + { 9, "ISO_15504_SPICE" }, + { 10, "B_BBEE_Certificate_of_South_Africa" }, + { 11, "IATF" }, + { 12, "TISAX" } + }); + + migrationBuilder.InsertData( + schema: "portal", + table: "document_types", + columns: new[] { "id", "label" }, + values: new object[] { 15, "COMPANY_CERTIFICATE" }); + + migrationBuilder.CreateIndex( + name: "ix_company_certificate_type_assigned_statuses_company_certific", + schema: "portal", + table: "company_certificate_type_assigned_statuses", + column: "company_certificate_type_status_id"); + + migrationBuilder.CreateIndex( + name: "ix_company_certificate_type_descriptions_language_short_name", + schema: "portal", + table: "company_certificate_type_descriptions", + column: "language_short_name"); + + migrationBuilder.CreateIndex( + name: "ix_company_certificates_company_certificate_status_id", + schema: "portal", + table: "company_certificates", + column: "company_certificate_status_id"); + + migrationBuilder.CreateIndex( + name: "ix_company_certificates_company_certificate_type_id", + schema: "portal", + table: "company_certificates", + column: "company_certificate_type_id"); + + migrationBuilder.CreateIndex( + name: "ix_company_certificates_company_id", + schema: "portal", + table: "company_certificates", + column: "company_id"); + + migrationBuilder.CreateIndex( + name: "ix_company_certificates_document_id", + schema: "portal", + table: "company_certificates", + column: "document_id"); + + migrationBuilder.AddForeignKey( + name: "fk_company_role_descriptions_languages_language_temp_id2", + schema: "portal", + table: "company_role_descriptions", + column: "language_short_name", + principalSchema: "portal", + principalTable: "languages", + principalColumn: "short_name", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_country_long_names_languages_language_temp_id3", + schema: "portal", + table: "country_long_names", + column: "short_name", + principalSchema: "portal", + principalTable: "languages", + principalColumn: "short_name"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "fk_company_role_descriptions_languages_language_temp_id2", + schema: "portal", + table: "company_role_descriptions"); + + migrationBuilder.DropForeignKey( + name: "fk_country_long_names_languages_language_temp_id3", + schema: "portal", + table: "country_long_names"); + + migrationBuilder.DropTable( + name: "company_certificate_type_assigned_statuses", + schema: "portal"); + + migrationBuilder.DropTable( + name: "company_certificate_type_descriptions", + schema: "portal"); + + migrationBuilder.DropTable( + name: "company_certificates", + schema: "portal"); + + migrationBuilder.DropTable( + name: "company_certificate_type_statuses", + schema: "portal"); + + migrationBuilder.DropTable( + name: "company_certificate_statuses", + schema: "portal"); + + migrationBuilder.DropTable( + name: "company_certificate_types", + schema: "portal"); + + migrationBuilder.DeleteData( + schema: "portal", + table: "document_types", + keyColumn: "id", + keyValue: 15); + + migrationBuilder.DropColumn( + name: "metadata_url", + schema: "portal", + table: "iam_identity_providers"); + + migrationBuilder.AddForeignKey( + name: "fk_company_role_descriptions_languages_language_temp_id1", + schema: "portal", + table: "company_role_descriptions", + column: "language_short_name", + principalSchema: "portal", + principalTable: "languages", + principalColumn: "short_name", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_country_long_names_languages_language_temp_id2", + schema: "portal", + table: "country_long_names", + column: "short_name", + principalSchema: "portal", + principalTable: "languages", + principalColumn: "short_name"); + } + } +} diff --git a/src/portalbackend/PortalBackend.Migrations/Migrations/PortalDbContextModelSnapshot.cs b/src/portalbackend/PortalBackend.Migrations/Migrations/PortalDbContextModelSnapshot.cs index dba85e96b0..d99f776315 100644 --- a/src/portalbackend/PortalBackend.Migrations/Migrations/PortalDbContextModelSnapshot.cs +++ b/src/portalbackend/PortalBackend.Migrations/Migrations/PortalDbContextModelSnapshot.cs @@ -2138,6 +2138,244 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("audit_user_role20231115", "portal"); }); + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompanyCertificateStatusId") + .HasColumnType("integer") + .HasColumnName("company_certificate_status_id"); + + b.Property("CompanyCertificateTypeId") + .HasColumnType("integer") + .HasColumnName("company_certificate_type_id"); + + b.Property("CompanyId") + .HasColumnType("uuid") + .HasColumnName("company_id"); + + b.Property("DocumentId") + .HasColumnType("uuid") + .HasColumnName("document_id"); + + b.Property("ValidFrom") + .HasColumnType("timestamp with time zone") + .HasColumnName("valid_from"); + + b.Property("ValidTill") + .HasColumnType("timestamp with time zone") + .HasColumnName("valid_till"); + + b.HasKey("Id") + .HasName("pk_company_certificates"); + + b.HasIndex("CompanyCertificateStatusId") + .HasDatabaseName("ix_company_certificates_company_certificate_status_id"); + + b.HasIndex("CompanyCertificateTypeId") + .HasDatabaseName("ix_company_certificates_company_certificate_type_id"); + + b.HasIndex("CompanyId") + .HasDatabaseName("ix_company_certificates_company_id"); + + b.HasIndex("DocumentId") + .HasDatabaseName("ix_company_certificates_document_id"); + + b.ToTable("company_certificates", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_certificate_statuses"); + + b.ToTable("company_certificate_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "IN_REVIEW" + }, + new + { + Id = 2, + Label = "ACTIVE" + }, + new + { + Id = 3, + Label = "INACTVIE" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_certificate_types"); + + b.ToTable("company_certificate_types", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "AEO_CTPAT_Security_Declaration" + }, + new + { + Id = 2, + Label = "ISO_9001" + }, + new + { + Id = 3, + Label = "IATF_16949" + }, + new + { + Id = 4, + Label = "ISO_14001_EMAS_or_national_certification" + }, + new + { + Id = 5, + Label = "ISO_45001_OHSAS_18001_or_national_certification" + }, + new + { + Id = 6, + Label = "ISO_IEC_27001" + }, + new + { + Id = 7, + Label = "ISO_50001_or_national_certification" + }, + new + { + Id = 8, + Label = "ISO_IEC_17025" + }, + new + { + Id = 9, + Label = "ISO_15504_SPICE" + }, + new + { + Id = 10, + Label = "B_BBEE_Certificate_of_South_Africa" + }, + new + { + Id = 11, + Label = "IATF" + }, + new + { + Id = 12, + Label = "TISAX" + }); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeAssignedStatus", b => + { + b.Property("CompanyCertificateTypeId") + .HasColumnType("integer") + .HasColumnName("company_certificate_type_id"); + + b.Property("CompanyCertificateTypeStatusId") + .HasColumnType("integer") + .HasColumnName("company_certificate_type_status_id"); + + b.HasKey("CompanyCertificateTypeId") + .HasName("pk_company_certificate_type_assigned_statuses"); + + b.HasIndex("CompanyCertificateTypeStatusId") + .HasDatabaseName("ix_company_certificate_type_assigned_statuses_company_certific"); + + b.ToTable("company_certificate_type_assigned_statuses", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeDescription", b => + { + b.Property("CompanyCertificateTypeId") + .HasColumnType("integer") + .HasColumnName("company_certificate_type_id"); + + b.Property("LanguageShortName") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("language_short_name"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text") + .HasColumnName("description"); + + b.HasKey("CompanyCertificateTypeId", "LanguageShortName") + .HasName("pk_company_certificate_type_descriptions"); + + b.HasIndex("LanguageShortName") + .HasDatabaseName("ix_company_certificate_type_descriptions_language_short_name"); + + b.ToTable("company_certificate_type_descriptions", "portal"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeStatus", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("label"); + + b.HasKey("Id") + .HasName("pk_company_certificate_type_statuses"); + + b.ToTable("company_certificate_type_statuses", "portal"); + + b.HasData( + new + { + Id = 1, + Label = "ACTIVE" + }, + new + { + Id = 2, + Label = "INACTVIE" + }); + }); + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Address", b => { b.Property("Id") @@ -4244,6 +4482,11 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 14, Label = "PRESENTATION" + }, + new + { + Id = 15, + Label = "COMPANY_CERTIFICATE" }); }); @@ -4281,6 +4524,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("uuid") .HasColumnName("identity_provider_id"); + b.Property("MetadataUrl") + .HasColumnType("text") + .HasColumnName("metadata_url"); + b.HasKey("IamIdpAlias") .HasName("pk_iam_identity_providers"); @@ -6789,6 +7036,83 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToView("offer_subscription_view", "portal"); }); + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificate", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateStatus", "CompanyCertificateStatus") + .WithMany() + .HasForeignKey("CompanyCertificateStatusId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_certificates_company_certificate_statuses_company_c"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", "CompanyCertificateType") + .WithMany("CompanyCertificates") + .HasForeignKey("CompanyCertificateTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_certificates_company_certificate_types_company_cert"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Company", "Company") + .WithMany("CompanyCertificates") + .HasForeignKey("CompanyId") + .IsRequired() + .HasConstraintName("fk_company_certificates_companies_company_id"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document", "Document") + .WithMany("CompanyCertificates") + .HasForeignKey("DocumentId") + .IsRequired() + .HasConstraintName("fk_company_certificates_documents_document_id"); + + b.Navigation("Company"); + + b.Navigation("CompanyCertificateStatus"); + + b.Navigation("CompanyCertificateType"); + + b.Navigation("Document"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeAssignedStatus", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", "CompanyCertificateType") + .WithOne("CompanyCertificateTypeAssignedStatus") + .HasForeignKey("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeAssignedStatus", "CompanyCertificateTypeId") + .IsRequired() + .HasConstraintName("fk_company_certificate_type_assigned_statuses_company_certific"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeStatus", "CompanyCertificateTypeStatus") + .WithMany("CompanyCertificateTypeAssignedStatuses") + .HasForeignKey("CompanyCertificateTypeStatusId") + .IsRequired() + .HasConstraintName("fk_company_certificate_type_assigned_statuses_company_certific1"); + + b.Navigation("CompanyCertificateType"); + + b.Navigation("CompanyCertificateTypeStatus"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeDescription", b => + { + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", "CompanyCertificateType") + .WithMany() + .HasForeignKey("CompanyCertificateTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_certificate_type_descriptions_company_certificate_t"); + + b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Language", "Language") + .WithMany("CompanyCertificateTypeDescriptions") + .HasForeignKey("LanguageShortName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_company_certificate_type_descriptions_languages_language_te"); + + b.Navigation("CompanyCertificateType"); + + b.Navigation("Language"); + }); + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Address", b => { b.HasOne("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Country", "Country") @@ -7235,7 +7559,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasForeignKey("LanguageShortName") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_company_role_descriptions_languages_language_temp_id1"); + .HasConstraintName("fk_company_role_descriptions_languages_language_temp_id2"); b.Navigation("CompanyRole"); @@ -7617,7 +7941,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany("CountryLongNames") .HasForeignKey("ShortName") .IsRequired() - .HasConstraintName("fk_country_long_names_languages_language_temp_id2"); + .HasConstraintName("fk_country_long_names_languages_language_temp_id3"); b.Navigation("Country"); @@ -8387,6 +8711,18 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("CompanyServiceAccount"); }); + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateType", b => + { + b.Navigation("CompanyCertificateTypeAssignedStatus"); + + b.Navigation("CompanyCertificates"); + }); + + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.CompanyCertificateTypeStatus", b => + { + b.Navigation("CompanyCertificateTypeAssignedStatuses"); + }); + modelBuilder.Entity("Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Address", b => { b.Navigation("Companies"); @@ -8445,6 +8781,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("CompanyAssignedUseCase"); + b.Navigation("CompanyCertificates"); + b.Navigation("CompanyIdentifiers"); b.Navigation("CompanySsiDetails"); @@ -8595,6 +8933,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("Companies"); + b.Navigation("CompanyCertificates"); + b.Navigation("CompanySsiDetail"); b.Navigation("Connector"); @@ -8666,6 +9006,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) { b.Navigation("AppDescriptions"); + b.Navigation("CompanyCertificateTypeDescriptions"); + b.Navigation("CompanyRoleDescriptions"); b.Navigation("CountryLongNames"); diff --git a/src/portalbackend/PortalBackend.Migrations/PortalBackend.Migrations.csproj b/src/portalbackend/PortalBackend.Migrations/PortalBackend.Migrations.csproj index 446692f633..c0096843dc 100644 --- a/src/portalbackend/PortalBackend.Migrations/PortalBackend.Migrations.csproj +++ b/src/portalbackend/PortalBackend.Migrations/PortalBackend.Migrations.csproj @@ -40,15 +40,14 @@ - - + + - diff --git a/src/portalbackend/PortalBackend.Migrations/Program.cs b/src/portalbackend/PortalBackend.Migrations/Program.cs index f5ee9516ba..245fbc9956 100644 --- a/src/portalbackend/PortalBackend.Migrations/Program.cs +++ b/src/portalbackend/PortalBackend.Migrations/Program.cs @@ -25,10 +25,10 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Auditing; +using Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity.DependencyInjection; using Serilog; using System.Reflection; diff --git a/src/portalbackend/PortalBackend.Migrations/Seeder/BatchInsertSeeder.cs b/src/portalbackend/PortalBackend.Migrations/Seeder/BatchInsertSeeder.cs index 15cb430458..3e8471970f 100644 --- a/src/portalbackend/PortalBackend.Migrations/Seeder/BatchInsertSeeder.cs +++ b/src/portalbackend/PortalBackend.Migrations/Seeder/BatchInsertSeeder.cs @@ -81,6 +81,8 @@ public async Task ExecuteAsync(CancellationToken cancellationToken) await SeedTable("company_role_descriptions", x => new { x.CompanyRoleId, x.LanguageShortName }, cancellationToken).ConfigureAwait(false); await SeedTable("company_user_assigned_app_favourites", x => new { x.CompanyUserId, x.AppId }, cancellationToken).ConfigureAwait(false); await SeedTable("company_user_assigned_business_partners", x => new { x.CompanyUserId, x.BusinessPartnerNumber }, cancellationToken).ConfigureAwait(false); + await SeedTable("company_certificate_type_assigned_statuses", x => new { x.CompanyCertificateTypeId, x.CompanyCertificateTypeStatusId }, cancellationToken).ConfigureAwait(false); + await SeedTable("company_certificate_type_descriptions", x => new { x.CompanyCertificateTypeId, x.LanguageShortName }, cancellationToken).ConfigureAwait(false); await SeedTable("identity_assigned_roles", x => new { x.IdentityId, x.UserRoleId }, cancellationToken).ConfigureAwait(false); await SeedTable("consent_assigned_offers", x => new { x.OfferId, x.ConsentId }, cancellationToken).ConfigureAwait(false); await SeedTable("consent_assigned_offer_subscriptions", x => new { x.OfferSubscriptionId, x.ConsentId }, cancellationToken).ConfigureAwait(false); diff --git a/src/portalbackend/PortalBackend.Migrations/Seeder/BatchUpdateSeeder.cs b/src/portalbackend/PortalBackend.Migrations/Seeder/BatchUpdateSeeder.cs index e8eed6d585..40d43a5ae8 100644 --- a/src/portalbackend/PortalBackend.Migrations/Seeder/BatchUpdateSeeder.cs +++ b/src/portalbackend/PortalBackend.Migrations/Seeder/BatchUpdateSeeder.cs @@ -88,6 +88,24 @@ await SeedTable( dbEntry.Description = entry.Description; }, cancellationToken).ConfigureAwait(false); + await SeedTable( + "company_certificate_type_assigned_statuses", + x => new { x.CompanyCertificateTypeId, x.CompanyCertificateTypeStatusId }, + x => x.dbEntity.CompanyCertificateTypeStatusId != x.dataEntity.CompanyCertificateTypeStatusId, + (dbEntry, entry) => + { + dbEntry.CompanyCertificateTypeStatusId = entry.CompanyCertificateTypeStatusId; + }, cancellationToken).ConfigureAwait(false); + + await SeedTable( + "company_certificate_type_descriptions", + x => new { x.CompanyCertificateTypeId, x.LanguageShortName }, + x => x.dbEntity.Description != x.dataEntity.Description, + (dbEntry, entry) => + { + dbEntry.Description = entry.Description; + }, cancellationToken).ConfigureAwait(false); + await SeedTable( "countries", x => x.Alpha2Code, diff --git a/src/portalbackend/PortalBackend.Migrations/Seeder/Data/company_certificate_type_assigned_statuses.json b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/company_certificate_type_assigned_statuses.json new file mode 100644 index 0000000000..8a2788886b --- /dev/null +++ b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/company_certificate_type_assigned_statuses.json @@ -0,0 +1,50 @@ +[ + { + "company_certificate_type_id": 1, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 2, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 3, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 4, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 5, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 6, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 7, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 8, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 9, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 10, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 11, + "company_certificate_type_status_id": 1 + }, + { + "company_certificate_type_id": 12, + "company_certificate_type_status_id": 1 + } +] diff --git a/src/portalbackend/PortalBackend.Migrations/Seeder/Data/company_certificate_type_descriptions.json b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/company_certificate_type_descriptions.json new file mode 100644 index 0000000000..718d5fa1cb --- /dev/null +++ b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/company_certificate_type_descriptions.json @@ -0,0 +1,122 @@ +[ + { + "company_certificate_type_id": 1, + "language_short_name": "de", + "description": "Internationales Gütesiegel, das von der Zollbehörde an Unternehmen verliehen wird, die in der internationalen Lieferkette tätig sind." + }, + { + "company_certificate_type_id": 1, + "language_short_name": "en", + "description": "International seal of quality awarded by customs authorities to companies active in the international supply chain." + }, + { + "company_certificate_type_id": 2, + "language_short_name": "de", + "description": "Internationaler Standard, der Anforderungen an ein Qualitätsmanagementsystem (QMS) festlegt." + }, + { + "company_certificate_type_id": 2, + "language_short_name": "en", + "description": "International standard that specifies requirements for a quality management system (QMS)." + }, + { + "company_certificate_type_id": 3, + "language_short_name": "de", + "description": "Zeigt, dass Ihr Unternehmen umfangreiche Anforderungen zur Schaffung eines kontinuierlichen Verbesserungsprozesses mit Schwerpunkt auf Fehlervermeidung und Reduzierung von Abweichungen und Verschwendung in der Lieferkette erfüllt hat." + }, + { + "company_certificate_type_id": 3, + "language_short_name": "en", + "description": "Demonstrates that your company has met extensive requirements to create a process of continuous improvement with an emphasis on defect prevention and reduction of variation and waste in the supply chain." + }, + { + "company_certificate_type_id": 4, + "language_short_name": "de", + "description": "Stellt Anforderungen mit Anwendungshinweisen bereit, die sich auf Umweltmanagementsysteme beziehen." + }, + { + "company_certificate_type_id": 4, + "language_short_name": "en", + "description": "Provides requirements with guidance for use that relate to environmental management systems." + }, + { + "company_certificate_type_id": 5, + "language_short_name": "de", + "description": "Internationaler Standard für Gesundheit und Sicherheit am Arbeitsplatz, herausgegeben zum Schutz von Mitarbeitern und Besuchern vor arbeitsbedingten Unfällen und Krankheiten." + }, + { + "company_certificate_type_id": 5, + "language_short_name": "en", + "description": "International standard for occupational health and safety, issued to protect employees and visitors from work-related accidents and diseases." + }, + { + "company_certificate_type_id": 6, + "language_short_name": "de", + "description": "Internationaler Standard für Informationssicherheit. Es legt die Vorgaben für ein wirksames ISMS (Informationssicherheitsmanagementsystem) fest." + }, + { + "company_certificate_type_id": 6, + "language_short_name": "en", + "description": "International standard for information security. It sets out the specification for an effective ISMS (information security management system)." + }, + { + "company_certificate_type_id": 7, + "language_short_name": "de", + "description": "Freiwilliger Standard – erleichtert die Integration des Energiemanagements in die Gesamtbemühungen zur Verbesserung des Qualitäts- und Umweltmanagements." + }, + { + "company_certificate_type_id": 7, + "language_short_name": "en", + "description": "Voluntary standard - ease integration of energy management into overall efforts to improve quality and environmental management." + }, + { + "company_certificate_type_id": 8, + "language_short_name": "de", + "description": "Internationale Norm, die Anforderungen an Qualität und Kompetenz in Prüf- und Kalibrierlaboratorien festlegt." + }, + { + "company_certificate_type_id": 8, + "language_short_name": "en", + "description": "International standard specifying requirements for quality and competence in testing and calibration laboratories." + }, + { + "company_certificate_type_id": 9, + "language_short_name": "de", + "description": "Internationaler Standard zur Bewertung von Geschäftsprozessen durch entsprechende Assessments." + }, + { + "company_certificate_type_id": 9, + "language_short_name": "en", + "description": "International standard for the evaluation of business processes through corresponding assessments." + }, + { + "company_certificate_type_id": 10, + "language_short_name": "de", + "description": "Zertifikat zur Bestätigung der Unternehmensleistung im Hinblick auf die wirtschaftliche Stärkung der Schwarzen in Südafrika." + }, + { + "company_certificate_type_id": 10, + "language_short_name": "en", + "description": "Certificate verifying business' performance with regards to black economic empowerment in South Africa." + }, + { + "company_certificate_type_id": 11, + "language_short_name": "de", + "description": "Eine verbindliche Branchenanforderung, die Qualitätsmanagementsysteme für die Automobilindustrie weltweit anpasst." + }, + { + "company_certificate_type_id": 11, + "language_short_name": "en", + "description": "A mandatory industry requirement which aligns automotive quality management systems throughout the world." + }, + { + "company_certificate_type_id": 12, + "language_short_name": "de", + "description": "TISAX ist ein Bewertungs- und Austauschmechanismus für die Informationssicherheit von Unternehmen und ermöglicht die Anerkennung von Bewertungsergebnissen unter den Teilnehmern." + }, + { + "company_certificate_type_id": 12, + "language_short_name": "en", + "description": "TISAX is an assessment and exchange mechanism for the information security of enterprises and allows recognition of assessment results among the participants." + } +] diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/Company.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/Company.cs index 3c0f05cfbc..c8aaea5c88 100644 --- a/src/portalbackend/PortalBackend.PortalEntities/Entities/Company.cs +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/Company.cs @@ -1,6 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -46,6 +45,7 @@ private Company() OwnedIdentityProviders = new HashSet(); ProvidedApplications = new HashSet(); OnboardedNetworkRegistrations = new HashSet(); + CompanyCertificates = new HashSet(); } public Company(Guid id, string name, CompanyStatusId companyStatusId, DateTimeOffset dateCreated) : this() @@ -99,4 +99,5 @@ public Company(Guid id, string name, CompanyStatusId companyStatusId, DateTimeOf public virtual ICollection OwnedIdentityProviders { get; private set; } public virtual ICollection ProvidedApplications { get; private set; } public virtual ICollection OnboardedNetworkRegistrations { get; private set; } + public virtual ICollection CompanyCertificates { get; private set; } } diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificate.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificate.cs new file mode 100644 index 0000000000..622c19ad02 --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificate.cs @@ -0,0 +1,53 @@ +/******************************************************************************** + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities; +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Document = Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities.Document; + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; + +public class CompanyCertificate +{ + private CompanyCertificate() { } + + public CompanyCertificate(Guid id, DateTimeOffset validFrom, CompanyCertificateTypeId companyCertificateTypeId, CompanyCertificateStatusId companyCertificateStatusId, Guid companyId, Guid documentId) : this() + { + Id = id; + ValidFrom = validFrom; + CompanyCertificateTypeId = companyCertificateTypeId; + CompanyCertificateStatusId = companyCertificateStatusId; + CompanyId = companyId; + DocumentId = documentId; + } + + public Guid Id { get; private set; } + public DateTimeOffset ValidFrom { get; private set; } + public DateTimeOffset? ValidTill { get; set; } + public CompanyCertificateTypeId CompanyCertificateTypeId { get; private set; } + public CompanyCertificateStatusId CompanyCertificateStatusId { get; set; } + public Guid CompanyId { get; private set; } + public Guid DocumentId { get; private set; } + + // Navigation Properties + public virtual Company? Company { get; private set; } + public virtual Document? Document { get; private set; } + public virtual CompanyCertificateType? CompanyCertificateType { get; private set; } + public virtual CompanyCertificateStatus? CompanyCertificateStatus { get; private set; } +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateStatus.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateStatus.cs new file mode 100644 index 0000000000..2c29495500 --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateStatus.cs @@ -0,0 +1,42 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using System.ComponentModel.DataAnnotations; + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; + +public class CompanyCertificateStatus +{ + private CompanyCertificateStatus() + { + Label = null!; + } + + public CompanyCertificateStatus(CompanyCertificateStatusId certificateStatusId) : this() + { + Id = certificateStatusId; + Label = certificateStatusId.ToString(); + } + + public CompanyCertificateStatusId Id { get; private set; } + + [MaxLength(255)] + public string Label { get; private set; } +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateType.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateType.cs new file mode 100644 index 0000000000..74afb573cf --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateType.cs @@ -0,0 +1,48 @@ +/******************************************************************************** + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using System.ComponentModel.DataAnnotations; + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; + +public class CompanyCertificateType +{ + private CompanyCertificateType() + { + Label = null!; + CompanyCertificates = new HashSet(); + } + + public CompanyCertificateType(CompanyCertificateTypeId companyCertificateTypeId) : this() + { + Id = companyCertificateTypeId; + Label = companyCertificateTypeId.ToString(); + } + + public CompanyCertificateTypeId Id { get; private set; } + + [MaxLength(255)] + public string Label { get; private set; } + + // Navigation Properties + + public virtual CompanyCertificateTypeAssignedStatus? CompanyCertificateTypeAssignedStatus { get; set; } + public virtual ICollection CompanyCertificates { get; private set; } +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeAssignedStatus.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeAssignedStatus.cs new file mode 100644 index 0000000000..75b36ef559 --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeAssignedStatus.cs @@ -0,0 +1,41 @@ +/******************************************************************************** + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using System.ComponentModel.DataAnnotations; + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; + +public class CompanyCertificateTypeAssignedStatus +{ + public CompanyCertificateTypeAssignedStatus(CompanyCertificateTypeId companyCertificateTypeId, CompanyCertificateTypeStatusId companyCertificateTypeStatusId) + { + CompanyCertificateTypeId = companyCertificateTypeId; + CompanyCertificateTypeStatusId = companyCertificateTypeStatusId; + } + + [Key] + public CompanyCertificateTypeId CompanyCertificateTypeId { get; private set; } + public CompanyCertificateTypeStatusId CompanyCertificateTypeStatusId { get; set; } + + // Navigation Properties + + public virtual CompanyCertificateType? CompanyCertificateType { get; private set; } + public virtual CompanyCertificateTypeStatus? CompanyCertificateTypeStatus { get; set; } +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeDescription.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeDescription.cs new file mode 100644 index 0000000000..39b6216a90 --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeDescription.cs @@ -0,0 +1,52 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities; +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using System.ComponentModel.DataAnnotations; + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; + +public class CompanyCertificateTypeDescription +{ + private CompanyCertificateTypeDescription() + { + LanguageShortName = null!; + Description = null!; + } + + public CompanyCertificateTypeDescription(CompanyCertificateTypeId companyCertificateTypeId, string languageShortName, string description) : this() + { + CompanyCertificateTypeId = companyCertificateTypeId; + LanguageShortName = languageShortName; + Description = description; + } + + public CompanyCertificateTypeId CompanyCertificateTypeId { get; private set; } + + [StringLength(2, MinimumLength = 2)] + public string LanguageShortName { get; private set; } + + public string Description { get; set; } + + // Navigation Properties + public virtual Language? Language { get; private set; } + + public virtual CompanyCertificateType? CompanyCertificateType { get; private set; } +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeStatus.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeStatus.cs new file mode 100644 index 0000000000..89d958dbac --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/CompanyCertificateTypeStatus.cs @@ -0,0 +1,46 @@ +/******************************************************************************** + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using System.ComponentModel.DataAnnotations; + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; + +public class CompanyCertificateTypeStatus +{ + private CompanyCertificateTypeStatus() + { + Label = null!; + } + + public CompanyCertificateTypeStatus(CompanyCertificateTypeStatusId companyCertificateTypeStatusId) + { + Id = companyCertificateTypeStatusId; + Label = companyCertificateTypeStatusId.ToString(); + } + + public CompanyCertificateTypeStatusId Id { get; private set; } + + [MaxLength(255)] + public string Label { get; private set; } + + // Navigation Properties + + public virtual ICollection? CompanyCertificateTypeAssignedStatuses { get; private set; } +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/Document.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/Document.cs index 39676b77ee..0cda62aaf9 100644 --- a/src/portalbackend/PortalBackend.PortalEntities/Entities/Document.cs +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/Document.cs @@ -38,6 +38,7 @@ private Document() Consents = new HashSet(); Offers = new HashSet(); Companies = new HashSet(); + CompanyCertificates = new HashSet(); } public Document(Guid id, byte[] documentContent, byte[] documentHash, string documentName, MediaTypeId mediaTypeId, DateTimeOffset dateCreated, DocumentStatusId documentStatusId, DocumentTypeId documentTypeId) @@ -95,4 +96,5 @@ public Document(Guid id, byte[] documentContent, byte[] documentHash, string doc public virtual ICollection Consents { get; private set; } public virtual ICollection Offers { get; private set; } public virtual ICollection Companies { get; private set; } + public virtual ICollection CompanyCertificates { get; private set; } } diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/IamIdentityProvider.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/IamIdentityProvider.cs index a495125dfc..6d25757512 100644 --- a/src/portalbackend/PortalBackend.PortalEntities/Entities/IamIdentityProvider.cs +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/IamIdentityProvider.cs @@ -41,6 +41,8 @@ public IamIdentityProvider(string iamIdpAlias, Guid identityProviderId) [MaxLength(255)] public string IamIdpAlias { get; private set; } + public string? MetadataUrl { get; set; } + // Navigation properties public virtual IdentityProvider? IdentityProvider { get; private set; } } diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/Language.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/Language.cs index fce573e21d..bb32558422 100644 --- a/src/portalbackend/PortalBackend.PortalEntities/Entities/Language.cs +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/Language.cs @@ -35,6 +35,7 @@ private Language() LanguageLongNameLanguages = new HashSet(); UseCases = new HashSet(); CountryLongNames = new HashSet(); + CompanyCertificateTypeDescriptions = new HashSet(); } public Language(string shortName) : this() @@ -55,4 +56,6 @@ public Language(string shortName) : this() public virtual ICollection LanguageLongNameLanguages { get; private set; } public virtual ICollection UseCases { get; private set; } public virtual ICollection CountryLongNames { get; private set; } + + public virtual ICollection CompanyCertificateTypeDescriptions { get; private set; } } diff --git a/src/portalbackend/PortalBackend.PortalEntities/Entities/VerifiedCredentialTypeKind.cs b/src/portalbackend/PortalBackend.PortalEntities/Entities/VerifiedCredentialTypeKind.cs index 688cd4e96d..c90d3b7a71 100644 --- a/src/portalbackend/PortalBackend.PortalEntities/Entities/VerifiedCredentialTypeKind.cs +++ b/src/portalbackend/PortalBackend.PortalEntities/Entities/VerifiedCredentialTypeKind.cs @@ -1,6 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -36,7 +35,6 @@ public VerifiedCredentialTypeKind(VerifiedCredentialTypeKindId verifiedCredentia { Id = verifiedCredentialTypeKindId; Label = verifiedCredentialTypeKindId.ToString(); - VerifiedCredentialTypeAssignedKinds = new HashSet(); } public VerifiedCredentialTypeKindId Id { get; private set; } diff --git a/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateStatusId.cs b/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateStatusId.cs new file mode 100644 index 0000000000..5829b040c1 --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateStatusId.cs @@ -0,0 +1,27 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; + +public enum CompanyCertificateStatusId +{ + IN_REVIEW = 1, + ACTIVE = 2, + INACTVIE = 3 +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateTypeId.cs b/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateTypeId.cs new file mode 100644 index 0000000000..7cb1d70426 --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateTypeId.cs @@ -0,0 +1,38 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 BMW Group AG + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; + +public enum CompanyCertificateTypeId +{ + AEO_CTPAT_Security_Declaration = 1, + ISO_9001 = 2, + IATF_16949 = 3, + ISO_14001_EMAS_or_national_certification = 4, + ISO_45001_OHSAS_18001_or_national_certification = 5, + ISO_IEC_27001 = 6, + ISO_50001_or_national_certification = 7, + ISO_IEC_17025 = 8, + ISO_15504_SPICE = 9, + B_BBEE_Certificate_of_South_Africa = 10, + IATF = 11, + TISAX = 12 + +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateTypeStatusId.cs b/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateTypeStatusId.cs new file mode 100644 index 0000000000..1ade6204b0 --- /dev/null +++ b/src/portalbackend/PortalBackend.PortalEntities/Enums/CompanyCertificateTypeStatusId.cs @@ -0,0 +1,27 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 BMW Group AG + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; + +public enum CompanyCertificateTypeStatusId +{ + ACTIVE = 1, + INACTVIE = 2 +} diff --git a/src/portalbackend/PortalBackend.PortalEntities/Enums/DocumentTypeId.cs b/src/portalbackend/PortalBackend.PortalEntities/Enums/DocumentTypeId.cs index d7c5551b6e..5b32a34912 100644 --- a/src/portalbackend/PortalBackend.PortalEntities/Enums/DocumentTypeId.cs +++ b/src/portalbackend/PortalBackend.PortalEntities/Enums/DocumentTypeId.cs @@ -35,5 +35,6 @@ public enum DocumentTypeId CONFORMITY_APPROVAL_BUSINESS_APPS = 11, CONFORMITY_APPROVAL_SERVICES = 12, SERVICE_LEADIMAGE = 13, - PRESENTATION = 14 + PRESENTATION = 14, + COMPANY_CERTIFICATE = 15, } diff --git a/src/portalbackend/PortalBackend.PortalEntities/PortalBackend.PortalEntities.csproj b/src/portalbackend/PortalBackend.PortalEntities/PortalBackend.PortalEntities.csproj index bef196a85d..3ab5df938e 100644 --- a/src/portalbackend/PortalBackend.PortalEntities/PortalBackend.PortalEntities.csproj +++ b/src/portalbackend/PortalBackend.PortalEntities/PortalBackend.PortalEntities.csproj @@ -1,51 +1,51 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities - Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities - net7.0 - enable - enable - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - **/PortalDbContext.cs - **/AuditEntities/*.cs - - - - - - - - - - + + + + + Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities + Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities + net7.0 + enable + enable + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + **/PortalDbContext.cs + **/AuditEntities/*.cs + + + + + + + + + + diff --git a/src/portalbackend/PortalBackend.PortalEntities/PortalDbContext.cs b/src/portalbackend/PortalBackend.PortalEntities/PortalDbContext.cs index 15233583ed..1780d1eda5 100644 --- a/src/portalbackend/PortalBackend.PortalEntities/PortalDbContext.cs +++ b/src/portalbackend/PortalBackend.PortalEntities/PortalDbContext.cs @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -104,6 +104,12 @@ public PortalDbContext(DbContextOptions options, IAuditHandler public virtual DbSet CompanyApplications { get; set; } = default!; public virtual DbSet CompanyApplicationStatuses { get; set; } = default!; public virtual DbSet CompanyApplicationTypes { get; set; } = default!; + public virtual DbSet CompanyCertificates { get; set; } = default!; + public virtual DbSet CompanyCertificateStatuses { get; set; } = default!; + public virtual DbSet CompanyCertificateTypes { get; set; } = default!; + public virtual DbSet CompanyCertificateTypeStatuses { get; set; } = default!; + public virtual DbSet CompanyCertificateTypeAssignedStatuses { get; set; } = default!; + public virtual DbSet CompanyCertificateTypeDescriptions { get; set; } = default!; public virtual DbSet CompanyAssignedRoles { get; set; } = default!; public virtual DbSet CompanyAssignedUseCases { get; set; } = default!; public virtual DbSet CompanyIdentifiers { get; set; } = default!; @@ -619,6 +625,62 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .Select(e => new CompanyApplicationType(e)) ); + modelBuilder.Entity(entity => + { + entity.HasOne(d => d.Company) + .WithMany(p => p.CompanyCertificates) + .HasForeignKey(d => d.CompanyId) + .OnDelete(DeleteBehavior.ClientSetNull); + + entity.HasOne(d => d.Document) + .WithMany(p => p.CompanyCertificates) + .HasForeignKey(d => d.DocumentId) + .OnDelete(DeleteBehavior.ClientSetNull); + }); + + modelBuilder.Entity() + .HasData( + Enum.GetValues(typeof(CompanyCertificateStatusId)) + .Cast() + .Select(e => new CompanyCertificateStatus(e)) + ); + + modelBuilder.Entity() + .HasData( + Enum.GetValues(typeof(CompanyCertificateTypeId)) + .Cast() + .Select(e => new CompanyCertificateType(e)) + ); + + modelBuilder.Entity(entity => + { + entity.HasOne(e => e.CompanyCertificateType) + .WithOne(d => d.CompanyCertificateTypeAssignedStatus) + .HasForeignKey(e => e.CompanyCertificateTypeId) + .OnDelete(DeleteBehavior.ClientSetNull); + + entity.HasOne(e => e.CompanyCertificateTypeStatus) + .WithMany(d => d.CompanyCertificateTypeAssignedStatuses) + .HasForeignKey(e => e.CompanyCertificateTypeStatusId) + .OnDelete(DeleteBehavior.ClientSetNull); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(x => new { x.CompanyCertificateTypeId, x.LanguageShortName }); + + entity.HasOne(e => e.Language) + .WithMany(e => e.CompanyCertificateTypeDescriptions) + .HasForeignKey(e => e.LanguageShortName); + }); + + modelBuilder.Entity() + .HasData( + Enum.GetValues(typeof(CompanyCertificateTypeStatusId)) + .Cast() + .Select(e => new CompanyCertificateTypeStatus(e)) + ); + modelBuilder.Entity(entity => { entity.HasKey(x => new { x.ApplicationId, ChecklistEntryTypeId = x.ApplicationChecklistEntryTypeId }); diff --git a/src/processes/ApplicationChecklist.Config/ApplicationChecklist.Config.csproj b/src/processes/ApplicationChecklist.Config/ApplicationChecklist.Config.csproj index b6713a2ae1..78a92cc995 100644 --- a/src/processes/ApplicationChecklist.Config/ApplicationChecklist.Config.csproj +++ b/src/processes/ApplicationChecklist.Config/ApplicationChecklist.Config.csproj @@ -36,7 +36,6 @@ - diff --git a/src/processes/NetworkRegistration.Library/NetworkRegistration.Library.csproj b/src/processes/NetworkRegistration.Library/NetworkRegistration.Library.csproj index 9babed5eed..9c3169e164 100644 --- a/src/processes/NetworkRegistration.Library/NetworkRegistration.Library.csproj +++ b/src/processes/NetworkRegistration.Library/NetworkRegistration.Library.csproj @@ -28,6 +28,10 @@ enable + + + + diff --git a/src/framework/Framework.ProcessIdentity/DependencyInjection/ProcessIdentityServiceCollectionExtensions.cs b/src/processes/Processes.ProcessIdentity/DependencyInjection/ProcessIdentityServiceCollectionExtensions.cs similarity index 97% rename from src/framework/Framework.ProcessIdentity/DependencyInjection/ProcessIdentityServiceCollectionExtensions.cs rename to src/processes/Processes.ProcessIdentity/DependencyInjection/ProcessIdentityServiceCollectionExtensions.cs index d128f70538..063efd6d95 100644 --- a/src/framework/Framework.ProcessIdentity/DependencyInjection/ProcessIdentityServiceCollectionExtensions.cs +++ b/src/processes/Processes.ProcessIdentity/DependencyInjection/ProcessIdentityServiceCollectionExtensions.cs @@ -21,7 +21,7 @@ using Microsoft.Extensions.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity.DependencyInjection; +namespace Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity.DependencyInjection; public static class ProcessIdentityServiceCollectionExtensions { diff --git a/src/framework/Framework.ProcessIdentity/DependencyInjection/ProcessIdentitySettings.cs b/src/processes/Processes.ProcessIdentity/DependencyInjection/ProcessIdentitySettings.cs similarity index 94% rename from src/framework/Framework.ProcessIdentity/DependencyInjection/ProcessIdentitySettings.cs rename to src/processes/Processes.ProcessIdentity/DependencyInjection/ProcessIdentitySettings.cs index 7516d83a90..8e752fc1b0 100644 --- a/src/framework/Framework.ProcessIdentity/DependencyInjection/ProcessIdentitySettings.cs +++ b/src/processes/Processes.ProcessIdentity/DependencyInjection/ProcessIdentitySettings.cs @@ -19,7 +19,7 @@ using System.ComponentModel.DataAnnotations; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity.DependencyInjection; +namespace Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity.DependencyInjection; public class ProcessIdentitySettings { diff --git a/src/framework/Framework.ProcessIdentity/IProcessIdentityDataBuilder.cs b/src/processes/Processes.ProcessIdentity/IProcessIdentityDataBuilder.cs similarity index 95% rename from src/framework/Framework.ProcessIdentity/IProcessIdentityDataBuilder.cs rename to src/processes/Processes.ProcessIdentity/IProcessIdentityDataBuilder.cs index 938e27c4b7..ac1aef0e25 100644 --- a/src/framework/Framework.ProcessIdentity/IProcessIdentityDataBuilder.cs +++ b/src/processes/Processes.ProcessIdentity/IProcessIdentityDataBuilder.cs @@ -20,7 +20,7 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity; +namespace Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity; public interface IProcessIdentityDataBuilder : IIdentityData { diff --git a/src/framework/Framework.ProcessIdentity/IProcessIdentityDataDetermination.cs b/src/processes/Processes.ProcessIdentity/IProcessIdentityDataDetermination.cs similarity index 94% rename from src/framework/Framework.ProcessIdentity/IProcessIdentityDataDetermination.cs rename to src/processes/Processes.ProcessIdentity/IProcessIdentityDataDetermination.cs index 48fa2dc296..fd0a04ac78 100644 --- a/src/framework/Framework.ProcessIdentity/IProcessIdentityDataDetermination.cs +++ b/src/processes/Processes.ProcessIdentity/IProcessIdentityDataDetermination.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity; +namespace Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity; public interface IProcessIdentityDataDetermination { diff --git a/src/framework/Framework.ProcessIdentity/ProcessIdentityDataBuilder.cs b/src/processes/Processes.ProcessIdentity/ProcessIdentityDataBuilder.cs similarity index 94% rename from src/framework/Framework.ProcessIdentity/ProcessIdentityDataBuilder.cs rename to src/processes/Processes.ProcessIdentity/ProcessIdentityDataBuilder.cs index 1a68ef5bb1..ddeab6ede0 100644 --- a/src/framework/Framework.ProcessIdentity/ProcessIdentityDataBuilder.cs +++ b/src/processes/Processes.ProcessIdentity/ProcessIdentityDataBuilder.cs @@ -19,10 +19,10 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity.DependencyInjection; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity; +namespace Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity; public class ProcessIdentityDataBuilder : IProcessIdentityDataBuilder { diff --git a/src/framework/Framework.ProcessIdentity/ProcessIdentityDataDetermination.cs b/src/processes/Processes.ProcessIdentity/ProcessIdentityDataDetermination.cs similarity index 97% rename from src/framework/Framework.ProcessIdentity/ProcessIdentityDataDetermination.cs rename to src/processes/Processes.ProcessIdentity/ProcessIdentityDataDetermination.cs index 38191ae5af..cc04203db4 100644 --- a/src/framework/Framework.ProcessIdentity/ProcessIdentityDataDetermination.cs +++ b/src/processes/Processes.ProcessIdentity/ProcessIdentityDataDetermination.cs @@ -22,7 +22,7 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity; +namespace Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity; public class ProcessIdentityDataDetermination : IProcessIdentityDataDetermination { diff --git a/src/framework/Framework.ProcessIdentity/ProcessIdentityService.cs b/src/processes/Processes.ProcessIdentity/ProcessIdentityService.cs similarity index 90% rename from src/framework/Framework.ProcessIdentity/ProcessIdentityService.cs rename to src/processes/Processes.ProcessIdentity/ProcessIdentityService.cs index f2a4c0a210..1875b5681c 100644 --- a/src/framework/Framework.ProcessIdentity/ProcessIdentityService.cs +++ b/src/processes/Processes.ProcessIdentity/ProcessIdentityService.cs @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -19,7 +19,7 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity; +namespace Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity; public class ProcessIdentityService : IIdentityService { diff --git a/src/framework/Framework.ProcessIdentity/Framework.ProcessIdentity.csproj b/src/processes/Processes.ProcessIdentity/Processes.ProcessIdentity.csproj similarity index 87% rename from src/framework/Framework.ProcessIdentity/Framework.ProcessIdentity.csproj rename to src/processes/Processes.ProcessIdentity/Processes.ProcessIdentity.csproj index 7d736eda1d..8bc9fb4a21 100644 --- a/src/framework/Framework.ProcessIdentity/Framework.ProcessIdentity.csproj +++ b/src/processes/Processes.ProcessIdentity/Processes.ProcessIdentity.csproj @@ -22,11 +22,11 @@ net7.0 enable enable - Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity - Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity + Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity + Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity - + diff --git a/src/processes/Processes.Worker.Library/IProcessTypeExecutor.cs b/src/processes/Processes.Worker.Library/IProcessTypeExecutor.cs index 9e9c8b1771..2b6790985f 100644 --- a/src/processes/Processes.Worker.Library/IProcessTypeExecutor.cs +++ b/src/processes/Processes.Worker.Library/IProcessTypeExecutor.cs @@ -18,6 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; namespace Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.Library; diff --git a/src/processes/Processes.Worker.Library/ProcessExecutionService.cs b/src/processes/Processes.Worker.Library/ProcessExecutionService.cs index fe49b031af..ef54029bf6 100644 --- a/src/processes/Processes.Worker.Library/ProcessExecutionService.cs +++ b/src/processes/Processes.Worker.Library/ProcessExecutionService.cs @@ -24,9 +24,9 @@ using Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider; using Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; +using Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity; namespace Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.Library; diff --git a/src/processes/Processes.Worker.Library/Processes.Worker.Library.csproj b/src/processes/Processes.Worker.Library/Processes.Worker.Library.csproj index 2081e7fd1d..c534be1c7a 100644 --- a/src/processes/Processes.Worker.Library/Processes.Worker.Library.csproj +++ b/src/processes/Processes.Worker.Library/Processes.Worker.Library.csproj @@ -1,39 +1,40 @@ - - - - - - - - - - - - - - Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.Library - Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.Library - net7.0 - enable - enable - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.Library + Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.Library + net7.0 + enable + enable + + + + + + + + + + + + + diff --git a/src/processes/Processes.Worker/Processes.Worker.csproj b/src/processes/Processes.Worker/Processes.Worker.csproj index c50d9b584c..994d5d89de 100644 --- a/src/processes/Processes.Worker/Processes.Worker.csproj +++ b/src/processes/Processes.Worker/Processes.Worker.csproj @@ -1,80 +1,79 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Processes.Worker - Org.Eclipse.TractusX.Portal.Backend.Processes.Worker - net7.0 - enable - enable - 864FF3A5-6A8A-4786-939B-D7060E74EEF6 - Exe - Linux - ..\..\.. - True - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - Program.cs - - - - - - - Always - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Processes.Worker + Org.Eclipse.TractusX.Portal.Backend.Processes.Worker + net7.0 + enable + enable + 864FF3A5-6A8A-4786-939B-D7060E74EEF6 + Exe + Linux + ..\..\.. + True + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + Program.cs + + + + + + + Always + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + diff --git a/src/processes/Processes.Worker/Program.cs b/src/processes/Processes.Worker/Program.cs index 512df1c869..c08343094f 100644 --- a/src/processes/Processes.Worker/Program.cs +++ b/src/processes/Processes.Worker/Program.cs @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -22,7 +22,6 @@ using Microsoft.Extensions.Hosting; using Org.Eclipse.TractusX.Portal.Backend.ApplicationActivation.Library.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Framework.Logging; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling; using Org.Eclipse.TractusX.Portal.Backend.Keycloak.Factory; using Org.Eclipse.TractusX.Portal.Backend.Offers.Library.DependencyInjection; @@ -31,6 +30,7 @@ using Org.Eclipse.TractusX.Portal.Backend.Processes.ApplicationChecklist.Executor; using Org.Eclipse.TractusX.Portal.Backend.Processes.NetworkRegistration.Executor.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Processes.OfferSubscription.Executor.DependencyInjection; +using Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.Library; using Serilog; diff --git a/src/processes/Processes.Worker/appsettings.json b/src/processes/Processes.Worker/appsettings.json index 6f2a97080f..a7b58544b9 100644 --- a/src/processes/Processes.Worker/appsettings.json +++ b/src/processes/Processes.Worker/appsettings.json @@ -366,7 +366,8 @@ "SmtpHost": "", "SmtpPort": 587, "SmtpUser": "", - "SmtpPassword": "" + "SmtpPassword": "", + "SenderEmail": "" } }, "OfferSubscriptionProcess": { diff --git a/src/provisioning/Provisioning.Library/ErrorHandling/ProvisioningServiceErrorMessageContainer.cs b/src/provisioning/Provisioning.Library/ErrorHandling/ProvisioningServiceErrorMessageContainer.cs index aeee340dc7..135a14e4bd 100644 --- a/src/provisioning/Provisioning.Library/ErrorHandling/ProvisioningServiceErrorMessageContainer.cs +++ b/src/provisioning/Provisioning.Library/ErrorHandling/ProvisioningServiceErrorMessageContainer.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using System.Collections.Immutable; namespace Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.ErrorHandling; diff --git a/src/provisioning/Provisioning.Library/Models/IdentityProviderConfigOidc.cs b/src/provisioning/Provisioning.Library/Models/IdentityProviderConfigOidc.cs index 938af5a19e..95269df1ff 100644 --- a/src/provisioning/Provisioning.Library/Models/IdentityProviderConfigOidc.cs +++ b/src/provisioning/Provisioning.Library/Models/IdentityProviderConfigOidc.cs @@ -22,5 +22,5 @@ namespace Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Models; -public record IdentityProviderConfigOidc(string DisplayName, string RedirectUrl, string ClientId, bool Enabled, string AuthorizationUrl, IamIdentityProviderClientAuthMethod ClientAuthMethod, IamIdentityProviderSignatureAlgorithm? SignatureAlgorithm); +public record IdentityProviderConfigOidc(string DisplayName, string RedirectUrl, string TokenUrl, string? LogoutUrl, string ClientId, string? ClientSecret, bool Enabled, string AuthorizationUrl, IamIdentityProviderClientAuthMethod ClientAuthMethod, IamIdentityProviderSignatureAlgorithm? SignatureAlgorithm); public record IdentityProviderEditableConfigOidc(string Alias, string DisplayName, string MetadataUrl, IamIdentityProviderClientAuthMethod ClientAuthMethod, string ClientId, string? Secret = null, IamIdentityProviderSignatureAlgorithm? SignatureAlgorithm = null); diff --git a/src/provisioning/Provisioning.Library/Provisioning.Library.csproj b/src/provisioning/Provisioning.Library/Provisioning.Library.csproj index 3910d284bd..ae32fdf411 100644 --- a/src/provisioning/Provisioning.Library/Provisioning.Library.csproj +++ b/src/provisioning/Provisioning.Library/Provisioning.Library.csproj @@ -1,48 +1,47 @@ - - - - - - Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library - Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library - net7.0 - enable - enable - - - - - - - - - - - - - - - - - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library + Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library + net7.0 + enable + enable + + + + + + + + + + + + + + + + + + + diff --git a/src/provisioning/Provisioning.Library/ProvisioningManager.cs b/src/provisioning/Provisioning.Library/ProvisioningManager.cs index 54a725aec4..ed637492c5 100644 --- a/src/provisioning/Provisioning.Library/ProvisioningManager.cs +++ b/src/provisioning/Provisioning.Library/ProvisioningManager.cs @@ -72,7 +72,7 @@ await GetCentralRealmJwksUrlAsync().ConfigureAwait(false) public async ValueTask DeleteSharedIdpRealmAsync(string alias) { - var sharedKeycloak = _Factory.CreateKeycloakClient("shared"); + var sharedKeycloak = _Factory.CreateKeycloakClient("shareddelete"); await sharedKeycloak.DeleteRealmAsync(alias).ConfigureAwait(false); await DeleteSharedIdpServiceAccountAsync(sharedKeycloak, alias); } @@ -178,7 +178,10 @@ public async ValueTask GetCentralIdentityProviderDat return new IdentityProviderConfigOidc( identityProvider.DisplayName, redirectUri, + identityProvider.Config.TokenUrl, + identityProvider.Config.LogoutUrl, identityProvider.Config.ClientId, + identityProvider.Config.ClientSecret, identityProvider.Enabled ?? false, identityProvider.Config.AuthorizationUrl, IdentityProviderClientAuthTypeToIamClientAuthMethod(identityProvider.Config.ClientAuthMethod), diff --git a/src/provisioning/Provisioning.Migrations/Migrations/ProvisioningDbContextModelSnapshot.cs b/src/provisioning/Provisioning.Migrations/Migrations/ProvisioningDbContextModelSnapshot.cs index deb3dabb3f..489a0f36d5 100644 --- a/src/provisioning/Provisioning.Migrations/Migrations/ProvisioningDbContextModelSnapshot.cs +++ b/src/provisioning/Provisioning.Migrations/Migrations/ProvisioningDbContextModelSnapshot.cs @@ -25,7 +25,7 @@ #nullable disable -namespace Org.Eclipse.TractusX.Provisioning.Migrations.Migrations +namespace Org.Eclipse.TractusX.Portal.Backend.Provisioning.Migrations.Migrations { [DbContext(typeof(ProvisioningDbContext))] partial class ProvisioningDbContextModelSnapshot : ModelSnapshot diff --git a/src/provisioning/Provisioning.Migrations/Provisioning.Migrations.csproj b/src/provisioning/Provisioning.Migrations/Provisioning.Migrations.csproj index 4989c57cb0..1cd43fd70c 100644 --- a/src/provisioning/Provisioning.Migrations/Provisioning.Migrations.csproj +++ b/src/provisioning/Provisioning.Migrations/Provisioning.Migrations.csproj @@ -1,82 +1,80 @@ - - - - - - Org.CatenaX.Ng.Portal.Backend.Provisioning.Migrations - Org.CatenaX.Ng.Portal.Backend.Provisioning.Migrations - net7.0 - enable - enable - 8ff18631-81b3-4630-882b-0a6ef5ff9fc3 - Linux - ..\..\.. - True - Exe - - true - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - + + + + + + Org.Eclipse.TractusX.Portal.Backend.Provisioning.Migrations + Org.Eclipse.TractusX.Portal.Backend.Provisioning.Migrations + net7.0 + enable + enable + 8ff18631-81b3-4630-882b-0a6ef5ff9fc3 + Linux + ..\..\.. + True + Exe + + true + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + diff --git a/src/registration/ApplicationActivation.Library/ApplicationActivation.Library.csproj b/src/registration/ApplicationActivation.Library/ApplicationActivation.Library.csproj index 3a523e9d69..685819bbb2 100644 --- a/src/registration/ApplicationActivation.Library/ApplicationActivation.Library.csproj +++ b/src/registration/ApplicationActivation.Library/ApplicationActivation.Library.csproj @@ -36,7 +36,6 @@ - diff --git a/src/registration/Registration.Common/Registration.Common.csproj b/src/registration/Registration.Common/Registration.Common.csproj index 2098557485..2e16447acf 100644 --- a/src/registration/Registration.Common/Registration.Common.csproj +++ b/src/registration/Registration.Common/Registration.Common.csproj @@ -1,33 +1,34 @@ - - - - - Org.Eclipse.TractusX.Portal.Backend.Registration.Common - Org.Eclipse.TractusX.Portal.Backend.Registration.Common - net7.0 - enable - enable - - - - - - - + + + + + Org.Eclipse.TractusX.Portal.Backend.Registration.Common + Org.Eclipse.TractusX.Portal.Backend.Registration.Common + net7.0 + enable + enable + + + + + + + + diff --git a/src/registration/Registration.Service/BusinessLogic/IStaticDataBusinessLogic.cs b/src/registration/Registration.Service/BusinessLogic/IStaticDataBusinessLogic.cs index f076910434..e5be51d828 100644 --- a/src/registration/Registration.Service/BusinessLogic/IStaticDataBusinessLogic.cs +++ b/src/registration/Registration.Service/BusinessLogic/IStaticDataBusinessLogic.cs @@ -18,8 +18,6 @@ ********************************************************************************/ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; -using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities; -using Org.Eclipse.TractusX.Portal.Backend.Registration.Service.Model; namespace Org.Eclipse.TractusX.Portal.Backend.Registration.Service.BusinessLogic; diff --git a/src/registration/Registration.Service/Controllers/NetworkController.cs b/src/registration/Registration.Service/Controllers/NetworkController.cs index 832cf81c75..1cd3df32bc 100644 --- a/src/registration/Registration.Service/Controllers/NetworkController.cs +++ b/src/registration/Registration.Service/Controllers/NetworkController.cs @@ -20,10 +20,10 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Registration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Registration.Service.Model; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; namespace Org.Eclipse.TractusX.Portal.Backend.Registration.Service.Controllers; diff --git a/src/registration/Registration.Service/Controllers/RegistrationController.cs b/src/registration/Registration.Service/Controllers/RegistrationController.cs index 67fbe0d83e..b94c892071 100644 --- a/src/registration/Registration.Service/Controllers/RegistrationController.cs +++ b/src/registration/Registration.Service/Controllers/RegistrationController.cs @@ -21,14 +21,14 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library.Models; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Keycloak.Authentication; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.Registration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Registration.Service.Model; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; using System.Net; namespace Org.Eclipse.TractusX.Portal.Backend.Registration.Service.Controllers diff --git a/src/registration/Registration.Service/Program.cs b/src/registration/Registration.Service/Program.cs index 577cc3d67b..a2f88ffe03 100644 --- a/src/registration/Registration.Service/Program.cs +++ b/src/registration/Registration.Service/Program.cs @@ -20,19 +20,23 @@ using Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Web; using Org.Eclipse.TractusX.Portal.Backend.Mailing.SendMail; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.Processes.ApplicationChecklist.Config.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Service; using Org.Eclipse.TractusX.Portal.Backend.Registration.Service.BusinessLogic; +using Org.Eclipse.TractusX.Portal.Backend.Web.Initialization; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.DependencyInjection; var VERSION = "v2"; -WebApplicationBuildRunner +WebAppHelper .BuildAndRunWebApplication(args, "registration", VERSION, builder => { + builder.Services + .AddPublicInfos(); + builder.Services .AddMailingAndTemplateManager(builder.Configuration) .AddPortalRepositories(builder.Configuration) diff --git a/src/registration/Registration.Service/Registration.Service.csproj b/src/registration/Registration.Service/Registration.Service.csproj index 6e6007e441..287b395554 100644 --- a/src/registration/Registration.Service/Registration.Service.csproj +++ b/src/registration/Registration.Service/Registration.Service.csproj @@ -44,14 +44,16 @@ - - + + + + diff --git a/src/registration/Registration.Service/appsettings.json b/src/registration/Registration.Service/appsettings.json index febad90859..ca89b648f1 100644 --- a/src/registration/Registration.Service/appsettings.json +++ b/src/registration/Registration.Service/appsettings.json @@ -71,7 +71,8 @@ "SmtpHost": "", "SmtpPort": 587, "SmtpUser": "", - "SmtpPassword": "" + "SmtpPassword": "", + "SenderEmail": "" } }, "Keycloak": { diff --git a/src/framework/Framework.Web/ClaimsIdentityDataBuilder.cs b/src/web/Web.Identity/ClaimsIdentityDataBuilder.cs similarity index 97% rename from src/framework/Framework.Web/ClaimsIdentityDataBuilder.cs rename to src/web/Web.Identity/ClaimsIdentityDataBuilder.cs index c43b45a544..41dc737690 100644 --- a/src/framework/Framework.Web/ClaimsIdentityDataBuilder.cs +++ b/src/web/Web.Identity/ClaimsIdentityDataBuilder.cs @@ -20,7 +20,7 @@ using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.Identity; public class ClaimsIdentityDataBuilder : IClaimsIdentityDataBuilder { diff --git a/src/framework/Framework.Web/ClaimsIdentityService.cs b/src/web/Web.Identity/ClaimsIdentityService.cs similarity index 95% rename from src/framework/Framework.Web/ClaimsIdentityService.cs rename to src/web/Web.Identity/ClaimsIdentityService.cs index 9c00457546..a7755ff8dd 100644 --- a/src/framework/Framework.Web/ClaimsIdentityService.cs +++ b/src/web/Web.Identity/ClaimsIdentityService.cs @@ -19,7 +19,7 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.Identity; public class ClaimsIdentityService : IIdentityService { diff --git a/src/framework/Framework.Web/ClaimsIdentityServiceCollectionExtensions.cs b/src/web/Web.Identity/ClaimsIdentityServiceCollectionExtensions.cs similarity index 95% rename from src/framework/Framework.Web/ClaimsIdentityServiceCollectionExtensions.cs rename to src/web/Web.Identity/ClaimsIdentityServiceCollectionExtensions.cs index 1a2e8e8956..c4d0fddb89 100644 --- a/src/framework/Framework.Web/ClaimsIdentityServiceCollectionExtensions.cs +++ b/src/web/Web.Identity/ClaimsIdentityServiceCollectionExtensions.cs @@ -20,7 +20,7 @@ using Microsoft.Extensions.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.Identity; public static class ClaimsIdentityServiceCollectionExtensions { diff --git a/src/framework/Framework.Web/IClaimsIdentityDataBuilder.cs b/src/web/Web.Identity/IClaimsIdentityDataBuilder.cs similarity index 95% rename from src/framework/Framework.Web/IClaimsIdentityDataBuilder.cs rename to src/web/Web.Identity/IClaimsIdentityDataBuilder.cs index 3f68c55f2c..1585aab059 100644 --- a/src/framework/Framework.Web/IClaimsIdentityDataBuilder.cs +++ b/src/web/Web.Identity/IClaimsIdentityDataBuilder.cs @@ -20,7 +20,7 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.Identity; public interface IClaimsIdentityDataBuilder : IIdentityData { diff --git a/src/web/Web.Identity/MandatoryIdentityClaimHandler.cs b/src/web/Web.Identity/MandatoryIdentityClaimHandler.cs new file mode 100644 index 0000000000..f2347bd41e --- /dev/null +++ b/src/web/Web.Identity/MandatoryIdentityClaimHandler.cs @@ -0,0 +1,131 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Microsoft.AspNetCore.Authorization; +using Microsoft.Extensions.Logging; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; +using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; +using System.Security.Claims; + +namespace Org.Eclipse.TractusX.Portal.Backend.Web.Identity; + +public class MandatoryIdentityClaimRequirement : IAuthorizationRequirement +{ + public MandatoryIdentityClaimRequirement(PolicyTypeId policyTypeId) + { + PolicyTypeId = policyTypeId; + } + + public PolicyTypeId PolicyTypeId { get; } +} + +public class MandatoryIdentityClaimHandler : AuthorizationHandler +{ + private readonly IIdentityRepository _identityRepository; + private readonly IServiceAccountRepository _serviceAccountRepository; + private readonly IClaimsIdentityDataBuilder _identityDataBuilder; + private readonly ILogger _logger; + + public MandatoryIdentityClaimHandler(IClaimsIdentityDataBuilder claimsIdentityDataBuilder, IPortalRepositories portalRepositories, ILogger logger) + { + _identityDataBuilder = claimsIdentityDataBuilder; + _identityRepository = portalRepositories.GetInstance(); + _serviceAccountRepository = portalRepositories.GetInstance(); + _logger = logger; + } + + protected override async Task HandleRequirementAsync(AuthorizationHandlerContext context, MandatoryIdentityClaimRequirement requirement) + { + if (_identityDataBuilder.Status == IClaimsIdentityDataBuilderStatus.Initial) + { + await InitializeClaims(context.User).ConfigureAwait(false); + } + if (_identityDataBuilder.Status == IClaimsIdentityDataBuilderStatus.Empty) + { + context.Fail(); + return; + } + if (requirement.PolicyTypeId switch + { + PolicyTypeId.ValidIdentity => _identityDataBuilder.IdentityId != Guid.Empty, + PolicyTypeId.ValidCompany => (await GetCompanyId().ConfigureAwait(false)) != Guid.Empty, + PolicyTypeId.CompanyUser => _identityDataBuilder.IdentityTypeId == IdentityTypeId.COMPANY_USER, + PolicyTypeId.ServiceAccount => _identityDataBuilder.IdentityTypeId == IdentityTypeId.COMPANY_SERVICE_ACCOUNT, + _ => throw new UnexpectedConditionException($"unexpected PolicyTypeId {requirement.PolicyTypeId}") + }) + { + context.Succeed(requirement); + } + else + { + context.Fail(); + } + } + + private async ValueTask InitializeClaims(ClaimsPrincipal principal) + { + var preferredUserName = principal.Claims.SingleOrDefault(x => x.Type == PortalClaimTypes.PreferredUserName)?.Value; + if (Guid.TryParse(preferredUserName, out var identityId)) + { + _identityDataBuilder.AddIdentityId(identityId); + _identityDataBuilder.AddIdentityTypeId(IdentityTypeId.COMPANY_USER); + _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Initialized; + return; + } + + (Guid IdentityId, Guid CompanyId) serviceAccountData; + var clientId = principal.Claims.SingleOrDefault(x => x.Type == PortalClaimTypes.ClientId)?.Value; + if (!string.IsNullOrWhiteSpace(clientId) && (serviceAccountData = await _serviceAccountRepository.GetServiceAccountDataByClientId(clientId).ConfigureAwait(false)) != default) + { + _identityDataBuilder.AddIdentityId(serviceAccountData.IdentityId); + _identityDataBuilder.AddIdentityTypeId(IdentityTypeId.COMPANY_SERVICE_ACCOUNT); + _identityDataBuilder.AddCompanyId(serviceAccountData.CompanyId); + _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Complete; + return; + } + + var sub = principal.Claims.SingleOrDefault(x => x.Type == PortalClaimTypes.Sub)?.Value; + _logger.LogInformation("Preferred user name {PreferredUserName} couldn't be parsed to uuid for sub {Sub}", preferredUserName, sub); + + (Guid IdentityId, IdentityTypeId IdentityTypeId, Guid CompanyId) identityData; + if (!string.IsNullOrWhiteSpace(sub) && (identityData = await _identityRepository.GetActiveIdentityDataByUserEntityId(sub).ConfigureAwait(false)) != default) + { + _identityDataBuilder.AddIdentityId(identityData.IdentityId); + _identityDataBuilder.AddIdentityTypeId(identityData.IdentityTypeId); + _identityDataBuilder.AddCompanyId(identityData.CompanyId); + _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Complete; + return; + } + + _logger.LogWarning("No identity found for userEntityId {Sub}", sub); + _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Empty; + } + + private async ValueTask GetCompanyId() + { + if (_identityDataBuilder.Status == IClaimsIdentityDataBuilderStatus.Initialized) + { + _identityDataBuilder.AddCompanyId(await _identityRepository.GetActiveCompanyIdByIdentityId(_identityDataBuilder.IdentityId).ConfigureAwait(false)); + _identityDataBuilder.Status = IClaimsIdentityDataBuilderStatus.Complete; + } + return _identityDataBuilder.CompanyId; + } +} diff --git a/src/framework/Framework.Models/PolicyTypes.cs b/src/web/Web.Identity/PolicyTypes.cs similarity index 95% rename from src/framework/Framework.Models/PolicyTypes.cs rename to src/web/Web.Identity/PolicyTypes.cs index 168d3d4c9c..09f74c372d 100644 --- a/src/framework/Framework.Models/PolicyTypes.cs +++ b/src/web/Web.Identity/PolicyTypes.cs @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.Identity; public static class PolicyTypes { diff --git a/src/framework/Framework.Models/PortalClaimTypes.cs b/src/web/Web.Identity/PortalClaimTypes.cs similarity index 94% rename from src/framework/Framework.Models/PortalClaimTypes.cs rename to src/web/Web.Identity/PortalClaimTypes.cs index 4e59b296c1..fe08eb80e5 100644 --- a/src/framework/Framework.Models/PortalClaimTypes.cs +++ b/src/web/Web.Identity/PortalClaimTypes.cs @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.Identity; public static class PortalClaimTypes { diff --git a/src/framework/Framework.HttpClient/Framework.HttpClient.csproj b/src/web/Web.Identity/Web.Identity.csproj similarity index 62% rename from src/framework/Framework.HttpClient/Framework.HttpClient.csproj rename to src/web/Web.Identity/Web.Identity.csproj index 230e62021d..a09167c3c3 100644 --- a/src/framework/Framework.HttpClient/Framework.HttpClient.csproj +++ b/src/web/Web.Identity/Web.Identity.csproj @@ -1,5 +1,4 @@ - - Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClient - Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClient + Org.Eclipse.TractusX.Portal.Backend.Web.Identity + Org.Eclipse.TractusX.Portal.Backend.Web.Identity net7.0 enable enable - - + + - - + + diff --git a/src/framework/Framework.PublicInfos/Framework.PublicInfos.csproj b/src/web/Web.Initialization/Web.Initialization.csproj similarity index 55% rename from src/framework/Framework.PublicInfos/Framework.PublicInfos.csproj rename to src/web/Web.Initialization/Web.Initialization.csproj index 2c7a3e8040..7923e1b27e 100644 --- a/src/framework/Framework.PublicInfos/Framework.PublicInfos.csproj +++ b/src/web/Web.Initialization/Web.Initialization.csproj @@ -1,44 +1,38 @@ - - - - Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos - Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos - net7.0 - enable - enable - - - - - - - - - - - - - - - - - - + + + + + Org.Eclipse.TractusX.Portal.Backend.Web.Initialization + Org.Eclipse.TractusX.Portal.Backend.Web.Initialization + net7.0 + enable + enable + + + + + + + + + + + + diff --git a/src/web/Web.Initialization/WebAppHelper.cs b/src/web/Web.Initialization/WebAppHelper.cs new file mode 100644 index 0000000000..736b9ef5bd --- /dev/null +++ b/src/web/Web.Initialization/WebAppHelper.cs @@ -0,0 +1,73 @@ +/******************************************************************************** + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Web; +using Org.Eclipse.TractusX.Portal.Backend.Keycloak.Authentication; +using Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling; +using Org.Eclipse.TractusX.Portal.Backend.Keycloak.Factory; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.DependencyInjection; + +namespace Org.Eclipse.TractusX.Portal.Backend.Web.Initialization; + +public static class WebAppHelper +{ + public static void BuildAndRunWebApplication(string[] args, string path, string version, Action configureBuilder) => + WebApplicationBuildRunner + .BuildAndRunWebApplication(args, path, version, ".Portal", + builder => + { + configureBuilder.Invoke(builder); + builder.Services.AddTransient(); + builder.Services.AddTransient(); + builder.Services.AddAuthorization(options => + { + options.AddPolicy(PolicyTypes.ValidIdentity, policy => policy.Requirements.Add(new MandatoryIdentityClaimRequirement(PolicyTypeId.ValidIdentity))); + options.AddPolicy(PolicyTypes.ValidCompany, policy => policy.Requirements.Add(new MandatoryIdentityClaimRequirement(PolicyTypeId.ValidCompany))); + options.AddPolicy(PolicyTypes.CompanyUser, policy => policy.Requirements.Add(new MandatoryIdentityClaimRequirement(PolicyTypeId.CompanyUser))); + options.AddPolicy(PolicyTypes.ServiceAccount, policy => policy.Requirements.Add(new MandatoryIdentityClaimRequirement(PolicyTypeId.ServiceAccount))); + }); + builder.Services.AddClaimsIdentityService(); + builder.Services.AddPublicInfos(); + }, + (app, environment) => + { + if (environment.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + var urlsToTrust = app.Configuration.GetSection("Keycloak").Get()?.Values + .Where(config => config.ConnectionString.StartsWith("https://")) + .Select(config => config.ConnectionString) + .Distinct(); + if (urlsToTrust != null) + { + FlurlUntrustedCertExceptionHandler.ConfigureExceptions(urlsToTrust); + } + } + + FlurlErrorHandler.ConfigureErrorHandler(app.Services.GetRequiredService>(), environment.IsDevelopment()); + }); +} diff --git a/src/framework/Framework.PublicInfos/DependencyInjection/PublicInfosServiceCollectionExtensions.cs b/src/web/Web.PublicInfos/DependencyInjection/PublicInfosServiceCollectionExtensions.cs similarity index 93% rename from src/framework/Framework.PublicInfos/DependencyInjection/PublicInfosServiceCollectionExtensions.cs rename to src/web/Web.PublicInfos/DependencyInjection/PublicInfosServiceCollectionExtensions.cs index f6287cd1b7..4e434180e4 100644 --- a/src/framework/Framework.PublicInfos/DependencyInjection/PublicInfosServiceCollectionExtensions.cs +++ b/src/web/Web.PublicInfos/DependencyInjection/PublicInfosServiceCollectionExtensions.cs @@ -20,7 +20,7 @@ using Microsoft.Extensions.DependencyInjection; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos.DependencyInjection; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.DependencyInjection; public static class PublicInfosServiceCollectionExtensions { diff --git a/src/framework/Framework.PublicInfos/IPublicInformationBusinessLogic.cs b/src/web/Web.PublicInfos/IPublicInformationBusinessLogic.cs similarity index 93% rename from src/framework/Framework.PublicInfos/IPublicInformationBusinessLogic.cs rename to src/web/Web.PublicInfos/IPublicInformationBusinessLogic.cs index e0d118c4a4..343c7acc94 100644 --- a/src/framework/Framework.PublicInfos/IPublicInformationBusinessLogic.cs +++ b/src/web/Web.PublicInfos/IPublicInformationBusinessLogic.cs @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; public interface IPublicInformationBusinessLogic { diff --git a/src/framework/Framework.PublicInfos/OpenInformationController.cs b/src/web/Web.PublicInfos/OpenInformationController.cs similarity index 94% rename from src/framework/Framework.PublicInfos/OpenInformationController.cs rename to src/web/Web.PublicInfos/OpenInformationController.cs index 62dc541810..47e2cd6825 100644 --- a/src/framework/Framework.PublicInfos/OpenInformationController.cs +++ b/src/web/Web.PublicInfos/OpenInformationController.cs @@ -21,9 +21,9 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; [ApiController] [Route("api/info")] diff --git a/src/framework/Framework.PublicInfos/PublicInformationBusinessLogic.cs b/src/web/Web.PublicInfos/PublicInformationBusinessLogic.cs similarity index 98% rename from src/framework/Framework.PublicInfos/PublicInformationBusinessLogic.cs rename to src/web/Web.PublicInfos/PublicInformationBusinessLogic.cs index 36865cc9e2..740a3f9109 100644 --- a/src/framework/Framework.PublicInfos/PublicInformationBusinessLogic.cs +++ b/src/web/Web.PublicInfos/PublicInformationBusinessLogic.cs @@ -27,7 +27,7 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; using System.Reflection; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; public class PublicInformationBusinessLogic : IPublicInformationBusinessLogic { diff --git a/src/framework/Framework.PublicInfos/PublicUrlAttribute.cs b/src/web/Web.PublicInfos/PublicUrlAttribute.cs similarity index 94% rename from src/framework/Framework.PublicInfos/PublicUrlAttribute.cs rename to src/web/Web.PublicInfos/PublicUrlAttribute.cs index 7c16bde307..42c64df024 100644 --- a/src/framework/Framework.PublicInfos/PublicUrlAttribute.cs +++ b/src/web/Web.PublicInfos/PublicUrlAttribute.cs @@ -20,7 +20,7 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; [AttributeUsage(AttributeTargets.Method)] public class PublicUrlAttribute : Attribute diff --git a/src/framework/Framework.PublicInfos/UrlInformation.cs b/src/web/Web.PublicInfos/UrlInformation.cs similarity index 94% rename from src/framework/Framework.PublicInfos/UrlInformation.cs rename to src/web/Web.PublicInfos/UrlInformation.cs index e1d4e5b2f6..b3062e7bbb 100644 --- a/src/framework/Framework.PublicInfos/UrlInformation.cs +++ b/src/web/Web.PublicInfos/UrlInformation.cs @@ -20,7 +20,7 @@ using System.Text.Json.Serialization; -namespace Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; +namespace Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; public record UrlInformation( [property: JsonPropertyName("httpMethods")] string HttpMethods, diff --git a/src/framework/Framework.ErrorHandling.Library/Framework.ErrorHandling.Library.csproj b/src/web/Web.PublicInfos/Web.PublicInfos.csproj similarity index 57% rename from src/framework/Framework.ErrorHandling.Library/Framework.ErrorHandling.Library.csproj rename to src/web/Web.PublicInfos/Web.PublicInfos.csproj index 0f21d0ca23..afebd5fe37 100644 --- a/src/framework/Framework.ErrorHandling.Library/Framework.ErrorHandling.Library.csproj +++ b/src/web/Web.PublicInfos/Web.PublicInfos.csproj @@ -1,5 +1,4 @@ - - - Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library - Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library + Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos + Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos net7.0 - enable enable + enable - + + + + + + + - + + + - diff --git a/tests/administration/Administration.Service.Tests/Administration.Service.Tests.csproj b/tests/administration/Administration.Service.Tests/Administration.Service.Tests.csproj index 88c6fc6dfd..cd4c09674a 100644 --- a/tests/administration/Administration.Service.Tests/Administration.Service.Tests.csproj +++ b/tests/administration/Administration.Service.Tests/Administration.Service.Tests.csproj @@ -20,11 +20,11 @@ Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Tests + Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Tests net7.0 enable enable false - Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Tests @@ -45,7 +45,7 @@ - + diff --git a/tests/administration/Administration.Service.Tests/BusinessLogic/IdentityProviderBusinessLogicTests.cs b/tests/administration/Administration.Service.Tests/BusinessLogic/IdentityProviderBusinessLogicTests.cs index ac82c84bd7..a66aa02e2c 100644 --- a/tests/administration/Administration.Service.Tests/BusinessLogic/IdentityProviderBusinessLogicTests.cs +++ b/tests/administration/Administration.Service.Tests/BusinessLogic/IdentityProviderBusinessLogicTests.cs @@ -23,7 +23,7 @@ using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.IO; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Configuration; using Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling; @@ -690,20 +690,20 @@ public async Task CreateOwnCompanyIdentityProviderAsync_WithValidData_ExecutesEx x.IamIdpAlias == idpName); result.Should().Match(x => - x.mappers != null && - x.mappers.Count() == 3 && - x.enabled == true && - x.redirectUrl == "https://redirect.com/*" && + x.Mappers != null && + x.Mappers.Count() == 3 && + x.Enabled == true && + x.RedirectUrl == "https://redirect.com/*" && protocol == IamIdentityProviderProtocol.OIDC - ? x.displayName == "test-oidc" && - x.saml == null && - x.oidc != null && - x.oidc.clientAuthMethod == IamIdentityProviderClientAuthMethod.SECRET_JWT && - x.oidc.signatureAlgorithm == IamIdentityProviderSignatureAlgorithm.RS512 - : x.displayName == "test-saml" && - x.oidc == null && - x.saml != null && - x.saml.singleSignOnServiceUrl == "https://sso.com"); + ? x.DisplayName == "test-oidc" && + x.Saml == null && + x.Oidc != null && + x.Oidc.ClientAuthMethod == IamIdentityProviderClientAuthMethod.SECRET_JWT && + x.Oidc.SignatureAlgorithm == IamIdentityProviderSignatureAlgorithm.RS512 + : x.DisplayName == "test-saml" && + x.Oidc == null && + x.Saml != null && + x.Saml.SingleSignOnServiceUrl == "https://sso.com"); } #endregion @@ -724,8 +724,8 @@ public async Task DeleteCompanyIdentityProviderAsync_WithNotExistingProvider_Thr _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns(((bool, string?, IdentityProviderCategoryId, IdentityProviderTypeId, IEnumerable<(Guid, IEnumerable)>?, bool, string))default); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(A._, A._)) + .Returns(default((bool, string?, IdentityProviderTypeId, IEnumerable<(Guid, IEnumerable)>, string))); // Act async Task Act() => await sut.DeleteCompanyIdentityProviderAsync(invalidId).ConfigureAwait(false); @@ -733,7 +733,7 @@ public async Task DeleteCompanyIdentityProviderAsync_WithNotExistingProvider_Thr // Assert var ex = await Assert.ThrowsAsync(Act); ex.Message.Should().Be($"identityProvider {invalidId} does not exist"); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(invalidId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(invalidId, _companyId)).MustHaveHappenedOnceExactly(); } [Fact] @@ -750,8 +750,8 @@ public async Task DeleteCompanyIdentityProviderAsync_WithInvalidCompany_ThrowsCo _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((false, string.Empty, IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(A._, A._)) + .Returns((false, string.Empty, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), string.Empty)); // Act async Task Act() => await sut.DeleteCompanyIdentityProviderAsync(identityProviderId).ConfigureAwait(false); @@ -759,7 +759,7 @@ public async Task DeleteCompanyIdentityProviderAsync_WithInvalidCompany_ThrowsCo // Assert var ex = await Assert.ThrowsAsync(Act); ex.Message.Should().Be($"company {_companyId} is not the owner of identityProvider {identityProviderId}"); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(identityProviderId, _companyId)).MustHaveHappenedOnceExactly(); } [Fact] @@ -776,8 +776,8 @@ public async Task DeleteCompanyIdentityProviderAsync_WithDisabledIdp_ThrowsContr _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "test", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(A._, A._)) + .Returns((true, "test", IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), string.Empty)); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled(A._)) .Returns(true); @@ -787,7 +787,7 @@ public async Task DeleteCompanyIdentityProviderAsync_WithDisabledIdp_ThrowsContr // Assert var ex = await Assert.ThrowsAsync(Act); ex.Message.Should().Be($"cannot delete identityProvider {identityProviderId} as it is enabled"); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(identityProviderId, _companyId)).MustHaveHappenedOnceExactly(); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("test")).MustHaveHappenedOnceExactly(); } @@ -807,8 +807,8 @@ public async Task DeleteCompanyIdentityProviderAsync_WithSharedKeycloakValid_Cal _logger); A.CallTo(() => _identityProviderRepository.GetIdpLinkedCompanyUserIds(identityProviderId, _companyId)) .Returns(_fixture.CreateMany(3).ToAsyncEnumerable()); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "test", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, new[] { (_companyId, new[] { "other-alias" }.AsEnumerable()) }, false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(A._, A._)) + .Returns((true, "test", IdentityProviderTypeId.SHARED, new[] { (_companyId, new[] { "other-alias" }.AsEnumerable()) }, string.Empty)); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("test")) .Returns(false); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("other-alias")) @@ -818,7 +818,7 @@ public async Task DeleteCompanyIdentityProviderAsync_WithSharedKeycloakValid_Cal await sut.DeleteCompanyIdentityProviderAsync(identityProviderId).ConfigureAwait(false); // Assert - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(identityProviderId, _companyId)).MustHaveHappenedOnceExactly(); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("test")).MustHaveHappenedOnceExactly(); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("other-alias")).MustHaveHappenedOnceExactly(); A.CallTo(() => _provisioningManager.DeleteSharedIdpRealmAsync("test")).MustHaveHappenedOnceExactly(); @@ -845,8 +845,8 @@ public async Task DeleteCompanyIdentityProviderAsync_WithValid_CallsExpected() _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "test", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, new[] { (_companyId, new[] { "other-alias" }.AsEnumerable()) }, false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(A._, A._)) + .Returns((true, "test", IdentityProviderTypeId.OWN, new[] { (_companyId, new[] { "other-alias" }.AsEnumerable()) }, string.Empty)); A.CallTo(() => _identityProviderRepository.GetIdpLinkedCompanyUserIds(identityProviderId, _companyId)) .Returns(_fixture.CreateMany(3).ToAsyncEnumerable()); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("test")) @@ -893,8 +893,8 @@ public async Task DeleteCompanyIdentityProviderAsync_WithManagedIdp_ExecutesExpe _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "test", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.MANAGED, Enumerable.Repeat(new ValueTuple>(company.Id, Enumerable.Empty()), 1), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataForDelete(A._, A._)) + .Returns((true, "test", IdentityProviderTypeId.MANAGED, Enumerable.Repeat(new ValueTuple>(company.Id, Enumerable.Empty()), 1), string.Empty)); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("test")) .Returns(false); A.CallTo(() => _provisioningManager.GetUserByUserName(identity.Id.ToString())).Returns((string?)keycloakUserId); @@ -963,8 +963,8 @@ public async Task GetOwnCompanyIdentityProvidersAsync_WithValidId_ReturnsExpecte _logger); var oidcGuid = Guid.NewGuid(); var samlGuid = Guid.NewGuid(); - var oidc = (oidcGuid, IdentityProviderCategoryId.KEYCLOAK_OIDC, (string?)"oidc-alias", IdentityProviderTypeId.OWN); - var saml = (samlGuid, IdentityProviderCategoryId.KEYCLOAK_SAML, (string?)"saml-alias", IdentityProviderTypeId.OWN); + var oidc = (oidcGuid, IdentityProviderCategoryId.KEYCLOAK_OIDC, (string?)"oidc-alias", IdentityProviderTypeId.OWN, "http://metadata"); + var saml = (samlGuid, IdentityProviderCategoryId.KEYCLOAK_SAML, (string?)"saml-alias", IdentityProviderTypeId.OWN, (string?)null); A.CallTo(() => _identityProviderRepository.GetCompanyIdentityProviderCategoryDataUntracked(A._)) .Returns(new[] { oidc, saml }.ToAsyncEnumerable()); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("oidc-alias")) @@ -982,8 +982,8 @@ public async Task GetOwnCompanyIdentityProvidersAsync_WithValidId_ReturnsExpecte // Assert A.CallTo(() => _identityProviderRepository.GetCompanyIdentityProviderCategoryDataUntracked(_companyId)).MustHaveHappenedOnceExactly(); result.Should().HaveCount(2).And.Satisfy( - x => x.displayName == "dis-oidc" && x.mappers != null && x.mappers.Count() == 3, - x => x.displayName == "dis-saml" && x.mappers != null && x.mappers.Count() == 2 + x => x.DisplayName == "dis-oidc" && x.Mappers != null && x.Mappers.Count() == 3, + x => x.DisplayName == "dis-saml" && x.Mappers != null && x.Mappers.Count() == 2 ); } @@ -1006,7 +1006,7 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithDifferentCompany_Throws _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderAliasUntrackedAsync(identityProviderId, _companyId)) - .Returns((string.Empty, IdentityProviderCategoryId.KEYCLOAK_OIDC, false, IdentityProviderTypeId.OWN)); + .Returns((string.Empty, IdentityProviderCategoryId.KEYCLOAK_OIDC, false, IdentityProviderTypeId.OWN, null)); // Act async Task Act() => await sut.GetOwnCompanyIdentityProviderAsync(identityProviderId).ConfigureAwait(false); @@ -1031,7 +1031,7 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithAliasNull_ThrowsNotFoun _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderAliasUntrackedAsync(identityProviderId, _companyId)) - .Returns((null, IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN)); + .Returns((null, IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, null)); // Act async Task Act() => await sut.GetOwnCompanyIdentityProviderAsync(identityProviderId).ConfigureAwait(false); @@ -1056,7 +1056,7 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithOidcWithoutExistingKeyc _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderAliasUntrackedAsync(identityProviderId, _companyId)) - .Returns(("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN)); + .Returns(("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, null)); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Throws(new KeycloakEntityNotFoundException("cl1 not existing")); @@ -1064,9 +1064,10 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithOidcWithoutExistingKeyc var result = await sut.GetOwnCompanyIdentityProviderAsync(identityProviderId).ConfigureAwait(false); // Assert - result.mappers.Should().BeNull(); - result.displayName.Should().BeNull(); - result.enabled.Should().BeNull(); + result.Mappers.Should().BeNull(); + result.DisplayName.Should().BeNull(); + result.Enabled.Should().BeNull(); + result.Oidc.Should().BeNull(); } [Fact] @@ -1074,6 +1075,11 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithValidOidc_CallsExpected { // Arrange var identityProviderId = Guid.NewGuid(); + var details = _fixture.Build() + .With(x => x.Enabled, true) + .With(x => x.DisplayName, "dis-oidc") + .With(x => x.ClientSecret, "******") + .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, _provisioningManager, @@ -1084,9 +1090,9 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithValidOidc_CallsExpected _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderAliasUntrackedAsync(identityProviderId, _companyId)) - .Returns(("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN)); + .Returns(("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, "http://metadata")); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) - .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-oidc").Create()); + .Returns(details); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("cl1")) .Returns(_fixture.CreateMany(3).ToAsyncEnumerable()); @@ -1094,9 +1100,18 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithValidOidc_CallsExpected var result = await sut.GetOwnCompanyIdentityProviderAsync(identityProviderId).ConfigureAwait(false); // Assert - result.mappers.Should().HaveCount(3); - result.displayName.Should().Be("dis-oidc"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(3); + result.DisplayName.Should().Be("dis-oidc"); + result.Enabled.Should().BeTrue(); + result.Oidc.Should().Match(x => + x.MetadataUrl == "http://metadata" && + x.AuthorizationUrl == details.AuthorizationUrl && + x.TokenUrl == details.TokenUrl && + x.LogoutUrl == details.LogoutUrl && + x.ClientId == details.ClientId && + x.HasClientSecret == true && + x.ClientAuthMethod == details.ClientAuthMethod && + x.SignatureAlgorithm == details.SignatureAlgorithm); } [Fact] @@ -1114,7 +1129,7 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithSamlWithoutExistingKeyc _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderAliasUntrackedAsync(identityProviderId, _companyId)) - .Returns(("saml-alias", IdentityProviderCategoryId.KEYCLOAK_SAML, true, IdentityProviderTypeId.OWN)); + .Returns(("saml-alias", IdentityProviderCategoryId.KEYCLOAK_SAML, true, IdentityProviderTypeId.OWN, null)); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataSAMLAsync("saml-alias")) .Throws(new KeycloakEntityNotFoundException("saml-alias")); @@ -1122,9 +1137,9 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithSamlWithoutExistingKeyc var result = await sut.GetOwnCompanyIdentityProviderAsync(identityProviderId).ConfigureAwait(false); // Assert - result.mappers.Should().BeNull(); - result.displayName.Should().BeNull(); - result.enabled.Should().BeNull(); + result.Mappers.Should().BeNull(); + result.DisplayName.Should().BeNull(); + result.Enabled.Should().BeNull(); } [Fact] @@ -1142,7 +1157,7 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithValidSaml_CallsExpected _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderAliasUntrackedAsync(identityProviderId, _companyId)) - .Returns(("saml-alias", IdentityProviderCategoryId.KEYCLOAK_SAML, true, IdentityProviderTypeId.OWN)); + .Returns(("saml-alias", IdentityProviderCategoryId.KEYCLOAK_SAML, true, IdentityProviderTypeId.OWN, null)); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataSAMLAsync("saml-alias")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-saml").Create()); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("saml-alias")) @@ -1152,9 +1167,9 @@ public async Task GetOwnCompanyIdentityProviderAsync_WithValidSaml_CallsExpected var result = await sut.GetOwnCompanyIdentityProviderAsync(identityProviderId).ConfigureAwait(false); // Assert - result.mappers.Should().HaveCount(2); - result.displayName.Should().Be("dis-saml"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(2); + result.DisplayName.Should().Be("dis-saml"); + result.Enabled.Should().BeTrue(); } #endregion @@ -1175,15 +1190,15 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithDifferentCompany_ _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns(((bool, string?, IdentityProviderCategoryId, IdentityProviderTypeId, IEnumerable<(Guid, IEnumerable)>?, bool, string))default); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns(default((bool, (string?, IdentityProviderCategoryId, IdentityProviderTypeId, string?), IEnumerable<(Guid, IEnumerable)>, bool, string))); // Act async Task Act() => await sut.SetOwnCompanyIdentityProviderStatusAsync(identityProviderId, false).ConfigureAwait(false); // Assert var ex = await Assert.ThrowsAsync(Act); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); ex.Message.Should().Be($"identityProvider {identityProviderId} does not exist"); } @@ -1201,15 +1216,15 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithDifferentCompany_ _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((false, string.Empty, IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns((false, (string.Empty, IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, null), Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); // Act async Task Act() => await sut.SetOwnCompanyIdentityProviderStatusAsync(identityProviderId, false).ConfigureAwait(false); // Assert var ex = await Assert.ThrowsAsync(Act); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); ex.Message.Should().Be($"company {_companyId} is not the owner of identityProvider {identityProviderId}"); } @@ -1227,8 +1242,8 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithNoOtherEnabledIdp _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, new[] { (_companyId, new[] { "alt-cl1" }.AsEnumerable()) }, false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns((true, ("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, null), new[] { (_companyId, new[] { "alt-cl1" }.AsEnumerable()) }, false, string.Empty)); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("alt-cl1")).Returns(false); // Act @@ -1236,7 +1251,7 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithNoOtherEnabledIdp // Assert var ex = await Assert.ThrowsAsync(Act); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("alt-cl1")).MustHaveHappenedOnceExactly(); ex.Message.Should().Be($"cannot disable indentityProvider {identityProviderId} as no other active identityProvider exists for this company"); } @@ -1255,8 +1270,8 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithNoOtherCompany_Ca _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns((true, ("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, null), Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-oidc").Create()); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("cl1")) @@ -1266,15 +1281,15 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithNoOtherCompany_Ca var result = await sut.SetOwnCompanyIdentityProviderStatusAsync(identityProviderId, false).ConfigureAwait(false); // Assert - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); A.CallTo(() => _provisioningManager.SetCentralIdentityProviderStatusAsync("cl1", false)).MustHaveHappenedOnceExactly(); - result.mappers.Should().HaveCount(3); - result.displayName.Should().Be("dis-oidc"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(3); + result.DisplayName.Should().Be("dis-oidc"); + result.Enabled.Should().BeTrue(); } [Fact] - public async Task SetOwnCompanyIdentityProviderStatusAsync_WithValidOidc_CallsExpected() + public async Task SetOwnCompanyIdentityProviderStatusAsync_DisableWithValidOidc_CallsExpected() { // Arrange var identityProviderId = Guid.NewGuid(); @@ -1287,8 +1302,8 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithValidOidc_CallsEx _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, new[] { (_companyId, new[] { "alt-cl1" }.AsEnumerable()) }, false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns((true, ("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, null), new[] { (_companyId, new[] { "cl1", "alt-cl1", "foo" }.AsEnumerable()) }, false, string.Empty)); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("alt-cl1")).Returns(true); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-oidc").Create()); @@ -1299,16 +1314,18 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithValidOidc_CallsEx var result = await sut.SetOwnCompanyIdentityProviderStatusAsync(identityProviderId, false).ConfigureAwait(false); // Assert - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("cl1")).MustNotHaveHappened(); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("alt-cl1")).MustHaveHappenedOnceExactly(); + A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("foo")).MustHaveHappenedOnceExactly(); A.CallTo(() => _provisioningManager.SetCentralIdentityProviderStatusAsync("cl1", false)).MustHaveHappenedOnceExactly(); - result.mappers.Should().HaveCount(3); - result.displayName.Should().Be("dis-oidc"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(3); + result.DisplayName.Should().Be("dis-oidc"); + result.Enabled.Should().BeTrue(); } [Fact] - public async Task SetOwnCompanyIdentityProviderStatusAsync_WithValidSaml_CallsExpected() + public async Task SetOwnCompanyIdentityProviderStatusAsync_EnableWithValidOidc_CallsExpected() { // Arrange var identityProviderId = Guid.NewGuid(); @@ -1321,9 +1338,42 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithValidSaml_CallsEx _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_SAML, IdentityProviderTypeId.OWN, new[] { (_companyId, new[] { "alt-cl1" }.AsEnumerable()) }, false, string.Empty)); - A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("alt-cl1")).Returns(true); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns((true, ("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, null), null, false, string.Empty)); + A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) + .Returns(_fixture.Build().With(x => x.Enabled, false).With(x => x.DisplayName, "dis-oidc").Create()); + A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("cl1")) + .Returns(_fixture.CreateMany(3).ToAsyncEnumerable()); + + // Act + var result = await sut.SetOwnCompanyIdentityProviderStatusAsync(identityProviderId, true).ConfigureAwait(false); + + // Assert + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, _companyId, false)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled(A._)).MustNotHaveHappened(); + A.CallTo(() => _provisioningManager.SetCentralIdentityProviderStatusAsync("cl1", true)).MustHaveHappenedOnceExactly(); + result.Mappers.Should().HaveCount(3); + result.DisplayName.Should().Be("dis-oidc"); + result.Enabled.Should().BeFalse(); + } + + [Fact] + public async Task SetOwnCompanyIdentityProviderStatusAsync_DisableWithValidSaml_CallsExpected() + { + // Arrange + var identityProviderId = Guid.NewGuid(); + var sut = new IdentityProviderBusinessLogic( + _portalRepositories, + _provisioningManager, + _identityService, + _errorMessageService, + _roleBaseMailService, + _mailingService, + _options, + _logger); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns((true, ("cl1", IdentityProviderCategoryId.KEYCLOAK_SAML, IdentityProviderTypeId.OWN, null), new[] { (_companyId, new[] { "cl1", "alt-cl1", "foo" }.AsEnumerable()) }, false, string.Empty)); + A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled(A._)).Returns(true); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataSAMLAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-saml").Create()); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("cl1")) @@ -1333,10 +1383,14 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithValidSaml_CallsEx var result = await sut.SetOwnCompanyIdentityProviderStatusAsync(identityProviderId, false).ConfigureAwait(false); // Assert + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, _companyId, true)).MustHaveHappenedOnceExactly(); + A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("cl1")).MustNotHaveHappened(); + A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("alt-cl1")).MustHaveHappenedOnceExactly(); + A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("foo")).MustHaveHappenedOnceExactly(); A.CallTo(() => _provisioningManager.SetCentralIdentityProviderStatusAsync("cl1", false)).MustHaveHappenedOnceExactly(); - result.mappers.Should().HaveCount(2); - result.displayName.Should().Be("dis-saml"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(2); + result.DisplayName.Should().Be("dis-saml"); + result.Enabled.Should().BeTrue(); } [Fact] @@ -1353,8 +1407,8 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithValidShared_Calls _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, new[] { (_companyId, new[] { "alt-cl1" }.AsEnumerable()) }, false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns((true, ("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, null), new[] { (_companyId, new[] { "alt-cl1" }.AsEnumerable()) }, false, string.Empty)); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("alt-cl1")).Returns(true); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-oidc").Create()); @@ -1367,9 +1421,9 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_WithValidShared_Calls // Assert A.CallTo(() => _provisioningManager.SetSharedIdentityProviderStatusAsync("cl1", false)) .MustHaveHappenedOnceExactly(); - result.mappers.Should().HaveCount(3); - result.displayName.Should().Be("dis-oidc"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(3); + result.DisplayName.Should().Be("dis-oidc"); + result.Enabled.Should().BeTrue(); } [Fact] @@ -1386,8 +1440,8 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_DeactivateManaged_Cal _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.MANAGED, new[] { (_companyId, new[] { "alt-cl1" }.AsEnumerable()) }, true, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderStatusUpdateData(A._, A._, A._)) + .Returns((true, ("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.MANAGED, null), new[] { (_companyId, new[] { "alt-cl1" }.AsEnumerable()) }, true, string.Empty)); A.CallTo(() => _provisioningManager.IsCentralIdentityProviderEnabled("alt-cl1")).Returns(true); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, false).With(x => x.DisplayName, "dis-oidc").Create()); @@ -1402,9 +1456,9 @@ public async Task SetOwnCompanyIdentityProviderStatusAsync_DeactivateManaged_Cal .MustHaveHappenedOnceExactly(); A.CallTo(() => _roleBaseMailService.RoleBaseSendMailForIdp(A>._, A>._, A<(string ParameterName, string ParameterValue)>._, A>.That.Matches(x => x.Count() == 1 && x.Single() == "DeactivateManagedIdp"), identityProviderId)) .MustHaveHappenedOnceExactly(); - result.mappers.Should().HaveCount(3); - result.displayName.Should().Be("dis-oidc"); - result.enabled.Should().BeFalse(); + result.Mappers.Should().HaveCount(3); + result.DisplayName.Should().Be("dis-oidc"); + result.Enabled.Should().BeFalse(); } #endregion @@ -1420,7 +1474,7 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithInvalidDisplayName_T // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.displayName, displayName) + .With(x => x.DisplayName, displayName) .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1431,8 +1485,8 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithInvalidDisplayName_T _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns(((bool, string?, IdentityProviderCategoryId, IdentityProviderTypeId, IEnumerable<(Guid, IEnumerable)>?, bool, string))default); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns(default((bool, string?, IdentityProviderCategoryId, IdentityProviderTypeId, string?))); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); @@ -1448,7 +1502,7 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithNotExistingIdp_Throw // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.displayName, "new-display-name") + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1459,8 +1513,8 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithNotExistingIdp_Throw _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns(((bool, string?, IdentityProviderCategoryId, IdentityProviderTypeId, IEnumerable<(Guid, IEnumerable)>?, bool, string))default); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns(default((bool, string?, IdentityProviderCategoryId, IdentityProviderTypeId, string?))); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); @@ -1476,7 +1530,7 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_NotOwner_ThrowsForbidden // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.displayName, "new-display-name") + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1487,8 +1541,8 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_NotOwner_ThrowsForbidden _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((false, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((false, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, null)); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); @@ -1504,8 +1558,8 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForOidcWithOidcNull_Thro // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.oidc, (IdentityProviderEditableDetailsOidc?)null) - .With(x => x.displayName, "new-display-name") + .With(x => x.Oidc, (IdentityProviderEditableDetailsOidc?)null) + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1516,15 +1570,15 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForOidcWithOidcNull_Thro _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, null)); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); // Assert var ex = await Assert.ThrowsAsync(Act); - ex.Message.Should().Be("property 'oidc' must not be null (Parameter 'oidc')"); + ex.Message.Should().Be("property 'oidc' must not be null (Parameter 'Oidc')"); } [Fact] @@ -1533,9 +1587,9 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForOidcWithSamlNotNull_T // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.oidc, _fixture.Create()) - .With(x => x.saml, _fixture.Create()) - .With(x => x.displayName, "new-display-name") + .With(x => x.Oidc, _fixture.Create()) + .With(x => x.Saml, _fixture.Create()) + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1546,15 +1600,15 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForOidcWithSamlNotNull_T _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, null)); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); // Assert var ex = await Assert.ThrowsAsync(Act); - ex.Message.Should().Be("property 'saml' must be null (Parameter 'saml')"); + ex.Message.Should().Be("property 'saml' must be null (Parameter 'Saml')"); } [Fact] @@ -1563,9 +1617,9 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithValidOidc_CallsExpec // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.oidc, _fixture.Build().With(x => x.secret, "test").Create()) - .With(x => x.saml, (IdentityProviderEditableDetailsSaml?)null) - .With(x => x.displayName, "new-display-name") + .With(x => x.Oidc, _fixture.Build().With(x => x.Secret, "test").With(x => x.MetadataUrl, "http://new").Create()) + .With(x => x.Saml, (IdentityProviderEditableDetailsSaml?)null) + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1576,22 +1630,38 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithValidOidc_CallsExpec _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.OWN, "http://old")); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-oidc").Create()); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("cl1")) .Returns(_fixture.CreateMany(3).ToAsyncEnumerable()); + IamIdentityProvider? initialIamIdentityProvider = null; + IamIdentityProvider? modifiedIamIdentityProvider = null; + A.CallTo(() => _identityProviderRepository.AttachAndModifyIamIdentityProvider(A._, A>._, A>._)) + .Invokes((string alias, Action? initialize, Action modify) => + { + initialize?.Invoke(initialIamIdentityProvider = new IamIdentityProvider(alias, Guid.Empty)); + modify(modifiedIamIdentityProvider = new IamIdentityProvider(alias, Guid.Empty)); + }); // Act var result = await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); // Assert - A.CallTo(() => _provisioningManager.UpdateCentralIdentityProviderDataOIDCAsync(A.That.Matches(x => x.Secret == "test" && x.Alias == "cl1"))) + A.CallTo(() => _provisioningManager.UpdateCentralIdentityProviderDataOIDCAsync(A.That.Matches(x => x.Secret == "test" && x.Alias == "cl1" && x.MetadataUrl == "http://new"))) .MustHaveHappenedOnceExactly(); - result.mappers.Should().HaveCount(3); - result.displayName.Should().Be("dis-oidc"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(3); + result.DisplayName.Should().Be("dis-oidc"); + result.Enabled.Should().BeTrue(); + A.CallTo(() => _identityProviderRepository.AttachAndModifyIamIdentityProvider("cl1", A>._, A>._)) + .MustHaveHappenedOnceExactly(); + initialIamIdentityProvider.Should().Match(x => + x.IamIdpAlias == "cl1" && + x.MetadataUrl == "http://old"); + modifiedIamIdentityProvider.Should().Match(x => + x.IamIdpAlias == "cl1" && + x.MetadataUrl == "http://new"); } [Fact] @@ -1600,8 +1670,8 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForSamlWithSamlNull_Thro // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.saml, (IdentityProviderEditableDetailsSaml?)null) - .With(x => x.displayName, "new-display-name") + .With(x => x.Saml, (IdentityProviderEditableDetailsSaml?)null) + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1612,15 +1682,15 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForSamlWithSamlNull_Thro _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_SAML, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_SAML, IdentityProviderTypeId.OWN, null)); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); // Assert var ex = await Assert.ThrowsAsync(Act); - ex.Message.Should().Be("property 'saml' must not be null (Parameter 'saml')"); + ex.Message.Should().Be("property 'saml' must not be null (Parameter 'Saml')"); } [Fact] @@ -1629,9 +1699,9 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForSamlWithOidcNotNull_T // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.oidc, _fixture.Create()) - .With(x => x.saml, _fixture.Create()) - .With(x => x.displayName, "new-display-name") + .With(x => x.Oidc, _fixture.Create()) + .With(x => x.Saml, _fixture.Create()) + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1642,15 +1712,15 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForSamlWithOidcNotNull_T _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_SAML, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_SAML, IdentityProviderTypeId.OWN, null)); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); // Assert var ex = await Assert.ThrowsAsync(Act); - ex.Message.Should().Be("property 'oidc' must be null (Parameter 'oidc')"); + ex.Message.Should().Be("property 'oidc' must be null (Parameter 'Oidc')"); } [Fact] @@ -1659,9 +1729,9 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithValidSaml_CallsExpec // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.oidc, (IdentityProviderEditableDetailsOidc?)null) - .With(x => x.saml, _fixture.Build().With(x => x.singleSignOnServiceUrl, "https://sso.com").Create()) - .With(x => x.displayName, "new-display-name") + .With(x => x.Oidc, (IdentityProviderEditableDetailsOidc?)null) + .With(x => x.Saml, _fixture.Build().With(x => x.SingleSignOnServiceUrl, "https://sso.com").Create()) + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1672,8 +1742,8 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithValidSaml_CallsExpec _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_SAML, IdentityProviderTypeId.OWN, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_SAML, IdentityProviderTypeId.OWN, null)); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataSAMLAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-saml").Create()); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("cl1")) @@ -1685,9 +1755,9 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithValidSaml_CallsExpec // Assert A.CallTo(() => _provisioningManager.UpdateCentralIdentityProviderDataSAMLAsync(A.That.Matches(x => x.singleSignOnServiceUrl == "https://sso.com" && x.alias == "cl1"))) .MustHaveHappenedOnceExactly(); - result.mappers.Should().HaveCount(2); - result.displayName.Should().Be("dis-saml"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(2); + result.DisplayName.Should().Be("dis-saml"); + result.Enabled.Should().BeTrue(); } [Fact] @@ -1696,8 +1766,8 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForSharedWithOidcNotNull // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.oidc, _fixture.Create()) - .With(x => x.displayName, "new-display-name") + .With(x => x.Oidc, _fixture.Create()) + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1708,15 +1778,15 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForSharedWithOidcNotNull _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, null)); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); // Assert var ex = await Assert.ThrowsAsync(Act); - ex.Message.Should().Be("property 'oidc' must be null (Parameter 'oidc')"); + ex.Message.Should().Be("property 'oidc' must be null (Parameter 'Oidc')"); } [Fact] @@ -1725,9 +1795,9 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForSharedWithSamlNotNull // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.oidc, (IdentityProviderEditableDetailsOidc?)null) - .With(x => x.saml, _fixture.Create()) - .With(x => x.displayName, "new-display-name") + .With(x => x.Oidc, (IdentityProviderEditableDetailsOidc?)null) + .With(x => x.Saml, _fixture.Create()) + .With(x => x.DisplayName, "new-display-name") .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1738,15 +1808,15 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_ForSharedWithSamlNotNull _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, null)); // Act async Task Act() => await sut.UpdateOwnCompanyIdentityProviderAsync(identityProviderId, data).ConfigureAwait(false); // Assert var ex = await Assert.ThrowsAsync(Act); - ex.Message.Should().Be("property 'saml' must be null (Parameter 'saml')"); + ex.Message.Should().Be("property 'saml' must be null (Parameter 'Saml')"); } [Fact] @@ -1755,9 +1825,9 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithValidShared_CallsExp // Arrange var identityProviderId = Guid.NewGuid(); var data = _fixture.Build() - .With(x => x.displayName, "dis-shared") - .With(x => x.oidc, (IdentityProviderEditableDetailsOidc?)null) - .With(x => x.saml, (IdentityProviderEditableDetailsSaml?)null) + .With(x => x.DisplayName, "dis-shared") + .With(x => x.Oidc, (IdentityProviderEditableDetailsOidc?)null) + .With(x => x.Saml, (IdentityProviderEditableDetailsSaml?)null) .Create(); var sut = new IdentityProviderBusinessLogic( _portalRepositories, @@ -1768,8 +1838,8 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithValidShared_CallsExp _mailingService, _options, _logger); - A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(A._, A._, A._)) - .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, Enumerable.Empty<(Guid, IEnumerable)>(), false, string.Empty)); + A.CallTo(() => _identityProviderRepository.GetOwnCompanyIdentityProviderUpdateData(A._, A._)) + .Returns((true, "cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, IdentityProviderTypeId.SHARED, null)); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-shared").Create()); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("cl1")) @@ -1781,9 +1851,9 @@ public async Task UpdateOwnCompanyIdentityProviderAsync_WithValidShared_CallsExp // Assert A.CallTo(() => _provisioningManager.UpdateSharedIdentityProviderAsync("cl1", "dis-shared")) .MustHaveHappenedOnceExactly(); - result.mappers.Should().HaveCount(2); - result.displayName.Should().Be("dis-shared"); - result.enabled.Should().BeTrue(); + result.Mappers.Should().HaveCount(2); + result.DisplayName.Should().Be("dis-shared"); + result.Enabled.Should().BeTrue(); } #endregion @@ -2444,7 +2514,7 @@ public async Task GetOwnIdentityProviderWithConnectedCompanies_WithDifferentComp _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnIdentityProviderWithConnectedCompanies(identityProviderId, _companyId)) - .Returns((string.Empty, IdentityProviderCategoryId.KEYCLOAK_OIDC, false, IdentityProviderTypeId.OWN, Enumerable.Empty())); + .Returns((string.Empty, IdentityProviderCategoryId.KEYCLOAK_OIDC, false, IdentityProviderTypeId.OWN, null, Enumerable.Empty())); // Act async Task Act() => await sut.GetOwnIdentityProviderWithConnectedCompanies(identityProviderId).ConfigureAwait(false); @@ -2469,7 +2539,7 @@ public async Task GetOwnIdentityProviderWithConnectedCompanies_WithAliasNull_Thr _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnIdentityProviderWithConnectedCompanies(identityProviderId, _companyId)) - .Returns((null, IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, Enumerable.Empty())); + .Returns((null, IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, null, Enumerable.Empty())); // Act async Task Act() => await sut.GetOwnIdentityProviderWithConnectedCompanies(identityProviderId).ConfigureAwait(false); @@ -2494,7 +2564,7 @@ public async Task GetOwnIdentityProviderWithConnectedCompanies_WithOidcWithoutEx _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnIdentityProviderWithConnectedCompanies(identityProviderId, _companyId)) - .Returns(("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, Enumerable.Empty())); + .Returns(("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, null, Enumerable.Empty())); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Throws(new KeycloakEntityNotFoundException("cl1 not existing")); @@ -2523,7 +2593,7 @@ public async Task GetOwnIdentityProviderWithConnectedCompanies_WithValidOidc_Cal _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnIdentityProviderWithConnectedCompanies(identityProviderId, _companyId)) - .Returns(("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, Enumerable.Repeat(new ConnectedCompanyData(companyId, "Test Company"), 1))); + .Returns(("cl1", IdentityProviderCategoryId.KEYCLOAK_OIDC, true, IdentityProviderTypeId.OWN, null, Enumerable.Repeat(new ConnectedCompanyData(companyId, "Test Company"), 1))); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync("cl1")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-oidc").Create()); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("cl1")) @@ -2555,7 +2625,7 @@ public async Task GetOwnIdentityProviderWithConnectedCompanies_WithSamlWithoutEx _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnIdentityProviderWithConnectedCompanies(identityProviderId, _companyId)) - .Returns(("saml-alias", IdentityProviderCategoryId.KEYCLOAK_SAML, true, IdentityProviderTypeId.OWN, Enumerable.Repeat(new ConnectedCompanyData(companyId, "Test Company"), 1))); + .Returns(("saml-alias", IdentityProviderCategoryId.KEYCLOAK_SAML, true, IdentityProviderTypeId.OWN, null, Enumerable.Repeat(new ConnectedCompanyData(companyId, "Test Company"), 1))); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataSAMLAsync("saml-alias")) .Throws(new KeycloakEntityNotFoundException("saml-alias")); @@ -2585,7 +2655,7 @@ public async Task GetOwnIdentityProviderWithConnectedCompanies_WithValidSaml_Cal _options, _logger); A.CallTo(() => _identityProviderRepository.GetOwnIdentityProviderWithConnectedCompanies(identityProviderId, _companyId)) - .Returns(("saml-alias", IdentityProviderCategoryId.KEYCLOAK_SAML, true, IdentityProviderTypeId.OWN, Enumerable.Repeat(new ConnectedCompanyData(companyId, "Test Company"), 1))); + .Returns(("saml-alias", IdentityProviderCategoryId.KEYCLOAK_SAML, true, IdentityProviderTypeId.OWN, null, Enumerable.Repeat(new ConnectedCompanyData(companyId, "Test Company"), 1))); A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataSAMLAsync("saml-alias")) .Returns(_fixture.Build().With(x => x.Enabled, true).With(x => x.DisplayName, "dis-saml").Create()); A.CallTo(() => _provisioningManager.GetIdentityProviderMappers("saml-alias")) @@ -2651,7 +2721,7 @@ private void SetupCreateOwnCompanyIdentityProvider(IamIdentityProviderProtocol p { case IamIdentityProviderProtocol.OIDC: A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataOIDCAsync(A._)) - .Returns(new IdentityProviderConfigOidc("test-oidc", "https://redirect.com/*", "cl1-oidc", true, "https://auth.com", IamIdentityProviderClientAuthMethod.SECRET_JWT, IamIdentityProviderSignatureAlgorithm.RS512)); + .Returns(new IdentityProviderConfigOidc("test-oidc", "https://redirect.com/*", "https://token.com", "https://logout.com", "cl1-oidc", "********", true, "https://auth.com", IamIdentityProviderClientAuthMethod.SECRET_JWT, IamIdentityProviderSignatureAlgorithm.RS512)); break; case IamIdentityProviderProtocol.SAML: A.CallTo(() => _provisioningManager.GetCentralIdentityProviderDataSAMLAsync(A._)) @@ -2694,11 +2764,11 @@ private void SetupFakes(IEnumerable userData, IEnumerable new ValueTuple(true, _userProviderId, _username) : new ValueTuple()); A.CallTo(() => _identityProviderRepository.GetCompanyIdentityProviderCategoryDataUntracked(A.That.Not.IsEqualTo(_companyId))).Returns( - Enumerable.Empty<(Guid, IdentityProviderCategoryId, string?, IdentityProviderTypeId)>().ToAsyncEnumerable()); + Enumerable.Empty<(Guid, IdentityProviderCategoryId, string?, IdentityProviderTypeId, string?)>().ToAsyncEnumerable()); A.CallTo(() => _identityProviderRepository.GetCompanyIdentityProviderCategoryDataUntracked(A.That.IsEqualTo(_companyId))).Returns( - new (Guid, IdentityProviderCategoryId, string?, IdentityProviderTypeId)[] { - (_sharedIdentityProviderId, IdentityProviderCategoryId.KEYCLOAK_OIDC, _sharedIdpAlias, IdentityProviderTypeId.SHARED), - (_otherIdentityProviderId, IdentityProviderCategoryId.KEYCLOAK_OIDC, _otherIdpAlias, IdentityProviderTypeId.OWN), + new (Guid, IdentityProviderCategoryId, string?, IdentityProviderTypeId, string?)[] { + (_sharedIdentityProviderId, IdentityProviderCategoryId.KEYCLOAK_OIDC, _sharedIdpAlias, IdentityProviderTypeId.SHARED, null), + (_otherIdentityProviderId, IdentityProviderCategoryId.KEYCLOAK_OIDC, _otherIdpAlias, IdentityProviderTypeId.OWN, "http://metadata"), }.ToAsyncEnumerable()); A.CallTo(() => _identityProviderRepository.CreateIdentityProvider(A._, A._, A._, A?>._)) diff --git a/tests/administration/Administration.Service.Tests/BusinessLogic/RegistrationStatusBusinessLogicTest.cs b/tests/administration/Administration.Service.Tests/BusinessLogic/RegistrationStatusBusinessLogicTest.cs index 9391a644da..d89b681bf1 100644 --- a/tests/administration/Administration.Service.Tests/BusinessLogic/RegistrationStatusBusinessLogicTest.cs +++ b/tests/administration/Administration.Service.Tests/BusinessLogic/RegistrationStatusBusinessLogicTest.cs @@ -27,7 +27,6 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Tests.BusinessLogic; diff --git a/tests/administration/Administration.Service.Tests/BusinessLogic/UserBusinessLogicTests.cs b/tests/administration/Administration.Service.Tests/BusinessLogic/UserBusinessLogicTests.cs index 719b80bf0c..d6f76690e1 100644 --- a/tests/administration/Administration.Service.Tests/BusinessLogic/UserBusinessLogicTests.cs +++ b/tests/administration/Administration.Service.Tests/BusinessLogic/UserBusinessLogicTests.cs @@ -24,6 +24,7 @@ using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Configuration; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Mailing.SendMail; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; @@ -34,7 +35,6 @@ using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Service; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Tests.BusinessLogic; diff --git a/tests/administration/Administration.Service.Tests/BusinessLogic/UserUploadBusinessLogicTests.cs b/tests/administration/Administration.Service.Tests/BusinessLogic/UserUploadBusinessLogicTests.cs index 2d7c1c88e4..79037597a6 100644 --- a/tests/administration/Administration.Service.Tests/BusinessLogic/UserUploadBusinessLogicTests.cs +++ b/tests/administration/Administration.Service.Tests/BusinessLogic/UserUploadBusinessLogicTests.cs @@ -21,7 +21,7 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; using Org.Eclipse.TractusX.Portal.Backend.Framework.IO; using Org.Eclipse.TractusX.Portal.Backend.Mailing.SendMail; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; @@ -30,7 +30,6 @@ using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.ErrorHandling; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Service; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using System.Text; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic.Tests; diff --git a/tests/administration/Administration.Service.Tests/Controllers/DocumentsControllerTests.cs b/tests/administration/Administration.Service.Tests/Controllers/DocumentsControllerTests.cs index 06c4dba48b..5073c2c946 100644 --- a/tests/administration/Administration.Service.Tests/Controllers/DocumentsControllerTests.cs +++ b/tests/administration/Administration.Service.Tests/Controllers/DocumentsControllerTests.cs @@ -23,7 +23,6 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; using System.Text; diff --git a/tests/administration/Administration.Service.Tests/Controllers/IdentityProviderControllerTests.cs b/tests/administration/Administration.Service.Tests/Controllers/IdentityProviderControllerTests.cs index 406e973d4a..52d72c605d 100644 --- a/tests/administration/Administration.Service.Tests/Controllers/IdentityProviderControllerTests.cs +++ b/tests/administration/Administration.Service.Tests/Controllers/IdentityProviderControllerTests.cs @@ -51,7 +51,7 @@ public async Task UpdateOwnCompanyIdentityProvider_WithValidData_ReturnsOk() //Assert result.Should().Be(data); - A.CallTo(() => _logic.UpdateOwnCompanyIdentityProviderAsync(id, A.That.Matches(x => x.displayName == "test"))).MustHaveHappenedOnceExactly(); + A.CallTo(() => _logic.UpdateOwnCompanyIdentityProviderAsync(id, A.That.Matches(x => x.DisplayName == "test"))).MustHaveHappenedOnceExactly(); } [Fact] diff --git a/tests/administration/Administration.Service.Tests/Controllers/RegistrationControllerTest.cs b/tests/administration/Administration.Service.Tests/Controllers/RegistrationControllerTest.cs index 7ea62b2636..8b48502051 100644 --- a/tests/administration/Administration.Service.Tests/Controllers/RegistrationControllerTest.cs +++ b/tests/administration/Administration.Service.Tests/Controllers/RegistrationControllerTest.cs @@ -27,7 +27,6 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; using Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library.Models; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; using System.Text; diff --git a/tests/administration/Administration.Service.Tests/Controllers/ServiceAccountControllerTests.cs b/tests/administration/Administration.Service.Tests/Controllers/ServiceAccountControllerTests.cs index d344382713..1ede02c061 100644 --- a/tests/administration/Administration.Service.Tests/Controllers/ServiceAccountControllerTests.cs +++ b/tests/administration/Administration.Service.Tests/Controllers/ServiceAccountControllerTests.cs @@ -27,7 +27,6 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; using Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library.Models; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Tests.Controllers; diff --git a/tests/administration/Administration.Service.Tests/Controllers/SubscriptionConfigurationControllerTests.cs b/tests/administration/Administration.Service.Tests/Controllers/SubscriptionConfigurationControllerTests.cs index cdf183a32c..aef7504f7d 100644 --- a/tests/administration/Administration.Service.Tests/Controllers/SubscriptionConfigurationControllerTests.cs +++ b/tests/administration/Administration.Service.Tests/Controllers/SubscriptionConfigurationControllerTests.cs @@ -24,7 +24,6 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Tests.Controllers; diff --git a/tests/administration/Administration.Service.Tests/Controllers/UserControllerTest.cs b/tests/administration/Administration.Service.Tests/Controllers/UserControllerTest.cs index f2d1501705..6e285ce71c 100644 --- a/tests/administration/Administration.Service.Tests/Controllers/UserControllerTest.cs +++ b/tests/administration/Administration.Service.Tests/Controllers/UserControllerTest.cs @@ -24,7 +24,6 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Tests.Controllers; diff --git a/tests/administration/Administration.Service.Tests/appsettings.IntegrationTests.json b/tests/administration/Administration.Service.Tests/appsettings.IntegrationTests.json index 1ac30245e6..aa0998dfe6 100644 --- a/tests/administration/Administration.Service.Tests/appsettings.IntegrationTests.json +++ b/tests/administration/Administration.Service.Tests/appsettings.IntegrationTests.json @@ -27,6 +27,12 @@ "ClientId": "", "ClientSecret": "", "AuthRealm": "" + }, + "shareddelete": { + "ConnectionString": "", + "ClientId": "", + "ClientSecret": "", + "AuthRealm": "" } }, "JwtBearerOptions": { @@ -385,7 +391,8 @@ "SmtpHost": "test", "SmtpPort": 587, "SmtpUser": "test", - "SmtpPassword": "test" + "SmtpPassword": "test", + "SenderEmail": "test@example.org" } }, "IdentityProviderAdmin": { diff --git a/tests/endtoend/InterfacePartnerHealthCheck/WalletEndPointTests.cs b/tests/endtoend/InterfacePartnerHealthCheck/WalletEndPointTests.cs index 4aa92dc1c6..6818a267a7 100644 --- a/tests/endtoend/InterfacePartnerHealthCheck/WalletEndPointTests.cs +++ b/tests/endtoend/InterfacePartnerHealthCheck/WalletEndPointTests.cs @@ -18,7 +18,6 @@ ********************************************************************************/ using Castle.Core.Internal; -using Microsoft.Extensions.DependencyInjection; using RestAssured.Response.Logging; using Xunit; using Xunit.Abstractions; @@ -48,7 +47,7 @@ public WalletEndpointTests(ITestOutputHelper output) : base(output) [Fact] public void WalletCreationInterface_CreateAndDuplicationCheck() { - Bpn = $"TestAutomation_{DateTime.Now:s}"; + Bpn = $"BPNLTEST{DateTime.Now:DDhhmmss}"; InterfaceHealthCheckTechUserToken = TechTokenRetriever.GetToken(TokenUrl, Secrets.InterfaceHealthCheckTechClientId, Secrets.InterfaceHealthCheckTechClientSecret); if (InterfaceHealthCheckTechUserToken.IsNullOrEmpty()) throw new Exception("Could not fetch token for interface partner health check"); diff --git a/tests/externalsystems/Bpdm.Library/BpdmBusinessLogicTests.cs b/tests/externalsystems/Bpdm.Library/BpdmBusinessLogicTests.cs index 701f66a150..b660d2452d 100644 --- a/tests/externalsystems/Bpdm.Library/BpdmBusinessLogicTests.cs +++ b/tests/externalsystems/Bpdm.Library/BpdmBusinessLogicTests.cs @@ -514,9 +514,9 @@ private void SetupForHandlePullLegalEntity(Company? company = null) A.CallTo(() => _bpdmService.FetchInputLegalEntity(A.That.Matches(x => x == IdWithStateCreated.ToString()), A._)) .ThrowsAsync(new ServiceException("not found", System.Net.HttpStatusCode.NotFound)); A.CallTo(() => _bpdmService.FetchInputLegalEntity(A.That.Matches(x => x == IdWithoutZipCode.ToString()), A._)) - .Returns(_fixture.Build().With(x => x.Bpn, (string?)null).Create()); + .Returns(_fixture.Build().With(x => x.LegalEntity, (BpdmLegelEntityData?)null).Create()); A.CallTo(() => _bpdmService.FetchInputLegalEntity(A.That.Matches(x => x == IdWithBpn.ToString()), A._)) - .Returns(_fixture.Build().With(x => x.Bpn, "CAXSDUMMYCATENAZZ").Create()); + .Returns(_fixture.Build().With(x => x.LegalEntity, new BpdmLegelEntityData("CAXSDUMMYCATENAZZ", null, null, null, Enumerable.Empty())).Create()); A.CallTo(() => _bpdmService.GetSharingState(A.That.Matches(x => x == IdWithBpn || x == IdWithStateCreated || x == IdWithoutZipCode || x == IdWithoutSharingProcessStarted), A._)) .Returns(_fixture.Build() .With(x => x.SharingStateType, BpdmSharingStateType.Success) diff --git a/tests/externalsystems/Bpdm.Library/BpdmServiceTests.cs b/tests/externalsystems/Bpdm.Library/BpdmServiceTests.cs index 75965f7db9..28aa0c0aae 100644 --- a/tests/externalsystems/Bpdm.Library/BpdmServiceTests.cs +++ b/tests/externalsystems/Bpdm.Library/BpdmServiceTests.cs @@ -21,8 +21,8 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using System.Net; namespace Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library.Tests; @@ -51,7 +51,7 @@ public BpdmServiceTests() ClientId = "CatenaX", ClientSecret = "pass@Secret", GrantType = "cred", - KeycloakTokenAddress = "https://key.cloak.com", + TokenAddress = "https://key.cloak.com", }); _tokenService = A.Fake(); } @@ -105,6 +105,52 @@ public async Task PutInputLegalEntity_WithInvalidData_ThrowsServiceException() #endregion + #region Trigger SetSharingStateToReady + + [Fact] + public async Task SetSharingStateToReady_WithValidData_DoesNotThrowException() + { + // Arrange + var externalId = Guid.NewGuid().ToString(); + var httpMessageHandlerMock = new HttpMessageHandlerMock(HttpStatusCode.OK); + var httpClient = new HttpClient(httpMessageHandlerMock) + { + BaseAddress = new Uri("https://base.address.com") + }; + A.CallTo(() => _tokenService.GetAuthorizedClient(_options.Value, A._)) + .Returns(httpClient); + var sut = new BpdmService(_tokenService, _options); + + // Act + var result = await sut.SetSharingStateToReady(externalId, CancellationToken.None).ConfigureAwait(false); + + // Assert + result.Should().BeTrue(); + } + + [Fact] + public async Task SetSharingStateToReady_WithInvalidData_ThrowsServiceException() + { + // Arrange + var externalId = Guid.NewGuid().ToString(); + var httpMessageHandlerMock = new HttpMessageHandlerMock(HttpStatusCode.BadRequest); + var httpClient = new HttpClient(httpMessageHandlerMock) + { + BaseAddress = new Uri("https://base.address.com") + }; + A.CallTo(() => _tokenService.GetAuthorizedClient(_options.Value, A._)).Returns(httpClient); + var sut = new BpdmService(_tokenService, _options); + + // Act + async Task Act() => await sut.SetSharingStateToReady(externalId, CancellationToken.None).ConfigureAwait(false); + + // Assert + var ex = await Assert.ThrowsAsync(Act); + ex.Message.Should().Be("call to external system bpdm-put-sharing-state-ready failed with statuscode 400"); + } + + #endregion + #region FetchInputLegalEntity [Fact] @@ -192,7 +238,7 @@ public async Task FetchInputLegalEntity_WithValidResult_ReturnsExpected() // Assert result.Should().NotBeNull(); result.ExternalId.Should().Be(externalId); - result.Bpn.Should().Be("BPNL00000007QGTF"); + result.LegalEntity?.Bpnl.Should().Be("BPNL00000007QGTF"); } [Fact] diff --git a/tests/externalsystems/Clearinghouse.Library.Tests/ClearinghouseServiceTests.cs b/tests/externalsystems/Clearinghouse.Library.Tests/ClearinghouseServiceTests.cs index abf57226de..36c5a7eceb 100644 --- a/tests/externalsystems/Clearinghouse.Library.Tests/ClearinghouseServiceTests.cs +++ b/tests/externalsystems/Clearinghouse.Library.Tests/ClearinghouseServiceTests.cs @@ -21,8 +21,8 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Clearinghouse.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using System.Net; namespace Org.Eclipse.TractusX.Portal.Backend.Clearinghouse.Library.Tests; @@ -52,7 +52,7 @@ public ClearinghouseServiceTests() ClientId = "CatenaX", ClientSecret = "pass@Secret", GrantType = "cred", - KeycloakTokenAddress = "https://key.cloak.com" + TokenAddress = "https://key.cloak.com" }); _tokenService = A.Fake(); _sut = new ClearinghouseService(_tokenService, _options); diff --git a/tests/externalsystems/Custodian.Library.Tests/CustodianServiceTests.cs b/tests/externalsystems/Custodian.Library.Tests/CustodianServiceTests.cs index 1239352cfc..409e27150c 100644 --- a/tests/externalsystems/Custodian.Library.Tests/CustodianServiceTests.cs +++ b/tests/externalsystems/Custodian.Library.Tests/CustodianServiceTests.cs @@ -22,10 +22,10 @@ using Org.Eclipse.TractusX.Portal.Backend.Custodian.Library.Models; using Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; using System.Net; using System.Net.Http.Json; @@ -61,7 +61,7 @@ public CustodianServiceTests() ClientId = "CatenaX", ClientSecret = "pass@Secret", GrantType = "cred", - KeycloakTokenAddress = "https://key.cloak.com" + TokenAddress = "https://key.cloak.com" }); _tokenService = A.Fake(); _dateTimeProvider = A.Fake(); diff --git a/tests/externalsystems/OfferProvider.Library/OfferProviderServiceTests.cs b/tests/externalsystems/OfferProvider.Library/OfferProviderServiceTests.cs index a088cd2457..202fe10a21 100644 --- a/tests/externalsystems/OfferProvider.Library/OfferProviderServiceTests.cs +++ b/tests/externalsystems/OfferProvider.Library/OfferProviderServiceTests.cs @@ -20,10 +20,10 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library.DependencyInjection; using Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library.Models; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using System.Net; namespace Org.Eclipse.TractusX.Portal.Backend.OfferProvider.Library.Tests; @@ -51,7 +51,7 @@ public OfferProviderServiceTests() ClientId = "CatenaX", ClientSecret = "pass@Secret", GrantType = "cred", - KeycloakTokenAddress = "https://key.cloak.com", + TokenAddress = "https://key.cloak.com", }); _tokenService = A.Fake(); } diff --git a/tests/externalsystems/OnboardingServiceProvider.Library.Tests/OnboardingServiceProvider.Library.Tests.csproj b/tests/externalsystems/OnboardingServiceProvider.Library.Tests/OnboardingServiceProvider.Library.Tests.csproj index c3722568a1..ed8b34cf9d 100644 --- a/tests/externalsystems/OnboardingServiceProvider.Library.Tests/OnboardingServiceProvider.Library.Tests.csproj +++ b/tests/externalsystems/OnboardingServiceProvider.Library.Tests/OnboardingServiceProvider.Library.Tests.csproj @@ -45,7 +45,6 @@ - diff --git a/tests/externalsystems/OnboardingServiceProvider.Library.Tests/OnboardingServiceProviderServiceTests.cs b/tests/externalsystems/OnboardingServiceProvider.Library.Tests/OnboardingServiceProviderServiceTests.cs index b473959322..ae14ff72d7 100644 --- a/tests/externalsystems/OnboardingServiceProvider.Library.Tests/OnboardingServiceProviderServiceTests.cs +++ b/tests/externalsystems/OnboardingServiceProvider.Library.Tests/OnboardingServiceProviderServiceTests.cs @@ -19,10 +19,9 @@ ********************************************************************************/ using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using Org.Eclipse.TractusX.Portal.Backend.OnboardingServiceProvider.Library.Models; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using System.Net; namespace Org.Eclipse.TractusX.Portal.Backend.OnboardingServiceProvider.Library.Tests; diff --git a/tests/externalsystems/SdFactory.Library.Tests/SdFactoryServiceTests.cs b/tests/externalsystems/SdFactory.Library.Tests/SdFactoryServiceTests.cs index d209bc1931..26acaad7b6 100644 --- a/tests/externalsystems/SdFactory.Library.Tests/SdFactoryServiceTests.cs +++ b/tests/externalsystems/SdFactory.Library.Tests/SdFactoryServiceTests.cs @@ -20,12 +20,12 @@ using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Framework.Token; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; using System.Net; namespace Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library.Tests; diff --git a/tests/framework/Framework.Async.Tests/Framework.Async.Tests.csproj b/tests/framework/Framework.Async.Tests/Framework.Async.Tests.csproj index c7ecbd68ff..cb3a2a568c 100644 --- a/tests/framework/Framework.Async.Tests/Framework.Async.Tests.csproj +++ b/tests/framework/Framework.Async.Tests/Framework.Async.Tests.csproj @@ -27,23 +27,22 @@ enable false + - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + runtime; build; native; contentfiles; analyzers; buildtransitive all - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + - + diff --git a/tests/framework/Framework.Async.Tests/IAsyncEnumerableExtensionTests.cs b/tests/framework/Framework.Async.Tests/IAsyncEnumerableExtensionTests.cs index 4e36785d07..2ff8c79102 100644 --- a/tests/framework/Framework.Async.Tests/IAsyncEnumerableExtensionTests.cs +++ b/tests/framework/Framework.Async.Tests/IAsyncEnumerableExtensionTests.cs @@ -18,19 +18,14 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared.Extensions; using System.Collections.Immutable; namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Async.Tests; public class AwaitAllIAsyncEnumerableExtensionTests { - private readonly IFixture _fixture; - - public AwaitAllIAsyncEnumerableExtensionTests() - { - _fixture = new Fixture(); - } + private readonly IFixture _fixture = new Fixture(); #region AwaitAll diff --git a/tests/framework/Framework.Async.Tests/Usings.cs b/tests/framework/Framework.Async.Tests/Usings.cs index d0c35ff438..d3b26fd130 100644 --- a/tests/framework/Framework.Async.Tests/Usings.cs +++ b/tests/framework/Framework.Async.Tests/Usings.cs @@ -19,7 +19,6 @@ ********************************************************************************/ global using AutoFixture; -global using AutoFixture.AutoFakeItEasy; global using FakeItEasy; global using FluentAssertions; global using Xunit; diff --git a/tests/framework/Framework.DBAccess.Tests/Framework.DBAccess.Tests.csproj b/tests/framework/Framework.DBAccess.Tests/Framework.DBAccess.Tests.csproj index 0dc6b2a48b..8184094ab7 100644 --- a/tests/framework/Framework.DBAccess.Tests/Framework.DBAccess.Tests.csproj +++ b/tests/framework/Framework.DBAccess.Tests/Framework.DBAccess.Tests.csproj @@ -20,27 +20,29 @@ + Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess.Tests + Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess.Tests net7.0 enable enable false + - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + runtime; build; native; contentfiles; analyzers; buildtransitive all - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + + diff --git a/tests/framework/Framework.ErrorHandling.Web.Tests/Framework.ErrorHandling.Web.Tests.csproj b/tests/framework/Framework.ErrorHandling.Web.Tests/Framework.ErrorHandling.Web.Tests.csproj index a89bf77909..9001fe901d 100644 --- a/tests/framework/Framework.ErrorHandling.Web.Tests/Framework.ErrorHandling.Web.Tests.csproj +++ b/tests/framework/Framework.ErrorHandling.Web.Tests/Framework.ErrorHandling.Web.Tests.csproj @@ -1,5 +1,4 @@ + + + + Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared + Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared + net7.0 + enable + enable + false + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + diff --git a/tests/framework/Framework.Tests.Shared/HttpMessageHandlerMock.cs b/tests/framework/Framework.Tests.Shared/HttpMessageHandlerMock.cs new file mode 100644 index 0000000000..19d0b9eee6 --- /dev/null +++ b/tests/framework/Framework.Tests.Shared/HttpMessageHandlerMock.cs @@ -0,0 +1,64 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 BMW Group AG + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using System.Net; + +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; + +public class HttpMessageHandlerMock : HttpMessageHandler +{ + private readonly HttpStatusCode _statusCode; + private readonly Exception? _ex; + private readonly HttpContent? _httpContent; + private readonly bool _isRequestUri; + + public HttpMessageHandlerMock(HttpStatusCode statusCode, HttpContent? httpContent = null, Exception? ex = null, bool isRequestUri = false) + { + _statusCode = statusCode; + _httpContent = httpContent; + _ex = ex; + _isRequestUri = isRequestUri; + } + + protected override Task SendAsync( + HttpRequestMessage request, + CancellationToken cancellationToken) + { + RequestMessage = request; + + if (_ex != null) + { + throw _ex; + } + + var httpResponseMessage = new HttpResponseMessage(_statusCode) + { + RequestMessage = _isRequestUri ? request : null + }; + if (_httpContent != null) + { + httpResponseMessage.Content = _httpContent; + } + + return Task.FromResult(httpResponseMessage); + } + + public HttpRequestMessage? RequestMessage { get; private set; } = null; +} diff --git a/tests/shared/Tests.Shared/MockLogger.cs b/tests/framework/Framework.Tests.Shared/MockLogger.cs similarity index 94% rename from tests/shared/Tests.Shared/MockLogger.cs rename to tests/framework/Framework.Tests.Shared/MockLogger.cs index 4f173ab0c4..42a185f30d 100644 --- a/tests/shared/Tests.Shared/MockLogger.cs +++ b/tests/framework/Framework.Tests.Shared/MockLogger.cs @@ -1,5 +1,4 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional @@ -20,7 +19,7 @@ using Microsoft.Extensions.Logging; -namespace Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; public interface IMockLogger { diff --git a/tests/framework/Framework.Tests.Shared/Usings.cs b/tests/framework/Framework.Tests.Shared/Usings.cs new file mode 100644 index 0000000000..11347ce615 --- /dev/null +++ b/tests/framework/Framework.Tests.Shared/Usings.cs @@ -0,0 +1,20 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +global using FakeItEasy; diff --git a/tests/framework/Framework.Token.Tests/Framework.Token.Tests.csproj b/tests/framework/Framework.Token.Tests/Framework.Token.Tests.csproj index e47a845e3e..c273feb0eb 100644 --- a/tests/framework/Framework.Token.Tests/Framework.Token.Tests.csproj +++ b/tests/framework/Framework.Token.Tests/Framework.Token.Tests.csproj @@ -41,8 +41,8 @@ + - - + diff --git a/tests/framework/Framework.Token.Tests/TokenServiceTests.cs b/tests/framework/Framework.Token.Tests/TokenServiceTests.cs index 8b41402c4d..f6e4c847ea 100644 --- a/tests/framework/Framework.Token.Tests/TokenServiceTests.cs +++ b/tests/framework/Framework.Token.Tests/TokenServiceTests.cs @@ -19,9 +19,8 @@ ********************************************************************************/ using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; +using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Service; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; using System.Net; using System.Text.Json; diff --git a/tests/framework/Framework.Web.Tests/Extensions/HttpExtensions.cs b/tests/framework/Framework.Web.Tests/Extensions/HttpExtensions.cs new file mode 100644 index 0000000000..9ec8ea9c78 --- /dev/null +++ b/tests/framework/Framework.Web.Tests/Extensions/HttpExtensions.cs @@ -0,0 +1,52 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +using System.Net.Http.Headers; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web.Tests.Extensions; + +public static class HttpExtensions +{ + public static async Task GetResultFromContent(this HttpResponseMessage response) + { + using var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false); + var options = new JsonSerializerOptions + { + Converters = { new JsonStringEnumConverter(allowIntegerValues: false) } + }; + return await JsonSerializer.DeserializeAsync(responseStream, options).ConfigureAwait(false) ?? throw new InvalidOperationException(); + } + + public static HttpContent ToJsonContent(this object data, JsonSerializerOptions options, string contentType) + { + var json = JsonSerializer.Serialize(data, options); + HttpContent content = new StringContent(json); + content.Headers.ContentType = new MediaTypeHeaderValue(contentType); + return content; + } + + public static HttpContent ToFormContent(this string stringContent, string contentType) + { + HttpContent content = new StringContent(stringContent); + content.Headers.ContentType = new MediaTypeHeaderValue(contentType); + return content; + } +} diff --git a/tests/framework/Framework.Web.Tests/Framework.Web.Tests.csproj b/tests/framework/Framework.Web.Tests/Framework.Web.Tests.csproj index ec8af90f63..4ac1337184 100644 --- a/tests/framework/Framework.Web.Tests/Framework.Web.Tests.csproj +++ b/tests/framework/Framework.Web.Tests/Framework.Web.Tests.csproj @@ -19,7 +19,7 @@ - Org.Eclipse.TractusX.Portal.Backend.Framework.Web.Tests + Org.Eclipse.TractusX.Portal.Backend.Framework.Web.Tests Org.Eclipse.TractusX.Portal.Backend.Framework.Web.Tests net7.0 enable @@ -30,6 +30,7 @@ + @@ -42,8 +43,6 @@ - - diff --git a/tests/framework/Framework.Web.Tests/HealthCheckExtensionsTests.cs b/tests/framework/Framework.Web.Tests/HealthCheckExtensionsTests.cs index b6151867e7..2c92fd23f4 100644 --- a/tests/framework/Framework.Web.Tests/HealthCheckExtensionsTests.cs +++ b/tests/framework/Framework.Web.Tests/HealthCheckExtensionsTests.cs @@ -1,5 +1,4 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional @@ -22,7 +21,6 @@ using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; using System.Text.Json; namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web.Tests; @@ -53,7 +51,7 @@ public void MapDefaultHealthChecks_AmbiguousPathes_Throws() var app = WebApplication.Create(); - var result = Assert.Throws(() => app.MapDefaultHealthChecks(settings)); + var result = Assert.Throws(() => app.MapDefaultHealthChecks(settings)); result.Message.Should().Be("HealthChecks mapping /foo, /foo contains ambiguous pathes"); } diff --git a/tests/shared/Tests.Shared/HttpMessageHandlerMock.cs b/tests/framework/Framework.Web.Tests/HttpMessageHandlerMock.cs similarity index 95% rename from tests/shared/Tests.Shared/HttpMessageHandlerMock.cs rename to tests/framework/Framework.Web.Tests/HttpMessageHandlerMock.cs index d94308740d..3006bc075e 100644 --- a/tests/shared/Tests.Shared/HttpMessageHandlerMock.cs +++ b/tests/framework/Framework.Web.Tests/HttpMessageHandlerMock.cs @@ -1,5 +1,4 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional @@ -20,7 +19,7 @@ using System.Net; -namespace Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; +namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web.Tests; public class HttpMessageHandlerMock : HttpMessageHandler { diff --git a/tests/framework/Framework.Web.Tests/JwtBearerConfigurationHealthCheckTests.cs b/tests/framework/Framework.Web.Tests/JwtBearerConfigurationHealthCheckTests.cs index 988a52448b..8610209288 100644 --- a/tests/framework/Framework.Web.Tests/JwtBearerConfigurationHealthCheckTests.cs +++ b/tests/framework/Framework.Web.Tests/JwtBearerConfigurationHealthCheckTests.cs @@ -1,5 +1,4 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional @@ -22,8 +21,7 @@ using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Protocols.OpenIdConnect; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Web.Tests.Extensions; using System.Net; using System.Text.Json; @@ -44,7 +42,7 @@ public JwtBearerConfigurationHealthCheckTests() public async Task CheckHealthAsync_Success_ReturnsExpected() { // Arrange - var config = _fixture.Create(); + var config = OpenIdConnectConfiguration.Create("{\"authorization_endpoint\": \"https://login.example.org/\",\n \"token_endpoint\": \"https://login.example.org/oauth2/v2.0/token\",\n \"token_endpoint_auth_methods_supported\": [\n \"client_secret_post\",\n \"private_key_jwt\"\n ],\n \"jwks_uri\": \"https://login.example.org/discovery/v2.0/keys\",\n \"userinfo_endpoint\": \"https://graph.example.org/oidc/userinfo\",\n \"subject_types_supported\": [\n \"pairwise\"\n ] }"); var jsonOptions = new JsonSerializerOptions() { PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase }; diff --git a/tests/keycloak/Keycloak.Authentication.Tests/KeycloakClaimsTransformationTests.cs b/tests/keycloak/Keycloak.Authentication.Tests/KeycloakClaimsTransformationTests.cs index 4adbdc8faa..196816e5f8 100644 --- a/tests/keycloak/Keycloak.Authentication.Tests/KeycloakClaimsTransformationTests.cs +++ b/tests/keycloak/Keycloak.Authentication.Tests/KeycloakClaimsTransformationTests.cs @@ -19,7 +19,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.Extensions.Options; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; using System.Security.Claims; namespace Org.Eclipse.TractusX.Portal.Backend.Keycloak.Authentication.Tests; diff --git a/tests/marketplace/Apps.Service.Tests/Apps.Service.Tests.csproj b/tests/marketplace/Apps.Service.Tests/Apps.Service.Tests.csproj index 3bcf4b8385..c646207d84 100644 --- a/tests/marketplace/Apps.Service.Tests/Apps.Service.Tests.csproj +++ b/tests/marketplace/Apps.Service.Tests/Apps.Service.Tests.csproj @@ -49,6 +49,7 @@ + diff --git a/tests/marketplace/Apps.Service.Tests/appsettings.IntegrationTests.json b/tests/marketplace/Apps.Service.Tests/appsettings.IntegrationTests.json index 0b0e18cfbc..5744096c82 100644 --- a/tests/marketplace/Apps.Service.Tests/appsettings.IntegrationTests.json +++ b/tests/marketplace/Apps.Service.Tests/appsettings.IntegrationTests.json @@ -245,7 +245,8 @@ "SmtpHost": "test", "SmtpPort": 587, "SmtpUser": "test", - "SmtpPassword": "test" + "SmtpPassword": "test", + "SenderEmail": "test@example.org" } } } diff --git a/tests/marketplace/Services.Service.Tests/Services.Service.Tests.csproj b/tests/marketplace/Services.Service.Tests/Services.Service.Tests.csproj index e34d37f65c..94749bb050 100644 --- a/tests/marketplace/Services.Service.Tests/Services.Service.Tests.csproj +++ b/tests/marketplace/Services.Service.Tests/Services.Service.Tests.csproj @@ -49,6 +49,7 @@ + diff --git a/tests/marketplace/Services.Service.Tests/appsettings.IntegrationTests.json b/tests/marketplace/Services.Service.Tests/appsettings.IntegrationTests.json index b757ace250..6a81beed98 100644 --- a/tests/marketplace/Services.Service.Tests/appsettings.IntegrationTests.json +++ b/tests/marketplace/Services.Service.Tests/appsettings.IntegrationTests.json @@ -156,7 +156,8 @@ "SmtpHost": "test", "SmtpPort": 587, "SmtpUser": "test", - "SmtpPassword": "test" + "SmtpPassword": "test", + "SenderEmail": "test@example.org" } } } diff --git a/tests/portalbackend/PortalBackend.DBAccess.Tests/ApplicationRepositoryTests.cs b/tests/portalbackend/PortalBackend.DBAccess.Tests/ApplicationRepositoryTests.cs index 99c233dff4..84ceb8fce1 100644 --- a/tests/portalbackend/PortalBackend.DBAccess.Tests/ApplicationRepositoryTests.cs +++ b/tests/portalbackend/PortalBackend.DBAccess.Tests/ApplicationRepositoryTests.cs @@ -19,7 +19,6 @@ ********************************************************************************/ using Microsoft.EntityFrameworkCore; -using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Tests.Setup; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; diff --git a/tests/portalbackend/PortalBackend.DBAccess.Tests/CompanyRolesRepositoryTests.cs b/tests/portalbackend/PortalBackend.DBAccess.Tests/CompanyRolesRepositoryTests.cs index ceca163c2a..1f2bb28cfb 100644 --- a/tests/portalbackend/PortalBackend.DBAccess.Tests/CompanyRolesRepositoryTests.cs +++ b/tests/portalbackend/PortalBackend.DBAccess.Tests/CompanyRolesRepositoryTests.cs @@ -21,7 +21,6 @@ using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Tests.Setup; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities; -using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; using Xunit.Extensions.AssemblyFixture; diff --git a/tests/portalbackend/PortalBackend.DBAccess.Tests/IdentityProviderRepositoryTests.cs b/tests/portalbackend/PortalBackend.DBAccess.Tests/IdentityProviderRepositoryTests.cs index ad32873b87..a52831730f 100644 --- a/tests/portalbackend/PortalBackend.DBAccess.Tests/IdentityProviderRepositoryTests.cs +++ b/tests/portalbackend/PortalBackend.DBAccess.Tests/IdentityProviderRepositoryTests.cs @@ -115,7 +115,7 @@ public async Task GetOwnCompanyIdentityProviderAliasUntrackedAsync_WithValid_Ret #endregion - #region GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync + #region GetOwnCompanyIdentityProviderStatusUpdateData [Theory] [InlineData("38f56465-ce26-4f25-9745-1791620dc198", "ac861325-bc54-4583-bcdc-9e9f2a38ff84", true, "Idp-123", true, true, "Bayerische Motorenwerke AG", new[] { "3390c2d7-75c1-4169-aa27-6ce00e1f3cdd", "0dcd8209-85e2-4073-b130-ac094fb47106" })] @@ -123,21 +123,21 @@ public async Task GetOwnCompanyIdentityProviderAliasUntrackedAsync_WithValid_Ret [InlineData("38f56465-ce26-4f25-9745-1791620dc199", "ac861325-bc54-4583-bcdc-9e9f2a38ff84", true, "Test-Alias", false, false, "CX-Test-Access", new[] { "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88" })] [InlineData("38f56465-ce26-4f25-9745-1791620dc199", "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88", true, "Test-Alias", true, false, "CX-Test-Access", new[] { "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88" })] [InlineData("38f56465-ce26-4f25-9745-1791620dc200", "41fd2ab8-71cd-4546-9bef-a388d91b2542", true, "Test-Alias2", false, false, "Catena-X", new[] { "41fd2ab8-71cd-4546-9bef-a388d91b2542", "41fd2ab8-7123-4546-9bef-a388d91b2999", "3390c2d7-75c1-4169-aa27-6ce00e1f3cdd", "0dcd8209-85e2-4073-b130-ac094fb47106", "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88" })] - [InlineData("38f56465-ce26-4f25-9745-1791620dc200", "41fd2ab8-71cd-4546-9bef-a388d91b2542", false, "Test-Alias2", false, false, "Catena-X", null)] - public async Task GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync_WithValidOwner_ReturnsExpected(Guid identityProviderId, Guid companyId, bool query, string alias, bool isOwner, bool companyUsersLinked, string ownerCompanyName, IEnumerable? companyIds) + [InlineData("38f56465-ce26-4f25-9745-1791620dc200", "41fd2ab8-71cd-4546-9bef-a388d91b2542", false, "Test-Alias2", false, false, "Catena-X", new[] { "41fd2ab8-71cd-4546-9bef-a388d91b2542", "41fd2ab8-7123-4546-9bef-a388d91b2999", "3390c2d7-75c1-4169-aa27-6ce00e1f3cdd", "0dcd8209-85e2-4073-b130-ac094fb47106", "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88" })] + public async Task GetOwnCompanyIdentityProviderStatusUpdateData_WithValidOwner_ReturnsExpected(Guid identityProviderId, Guid companyId, bool queryAliase, string alias, bool isOwner, bool companyUsersLinked, string ownerCompanyName, IEnumerable? companyIds) { var sut = await CreateSut().ConfigureAwait(false); - var result = await sut.GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync(identityProviderId, companyId, query).ConfigureAwait(false); + var result = await sut.GetOwnCompanyIdentityProviderStatusUpdateData(identityProviderId, companyId, queryAliase).ConfigureAwait(false); // Assert - result.Alias.Should().Be(alias); + result.IdentityProviderData.Alias.Should().Be(alias); result.IsOwner.Should().Be(isOwner); result.CompanyUsersLinked.Should().Be(companyUsersLinked); result.IdpOwnerName.Should().Be(ownerCompanyName); - if (query) + companyIds.Should().NotBeNull(); + if (queryAliase) { - companyIds.Should().NotBeNull(); if (alias == "Test-Alias2") { result.CompanyIdAliase.Should().HaveCount(5).And.Satisfy( @@ -156,13 +156,66 @@ public async Task GetOwnCompanyIdentityProviderUpdateDataUntrackedAsync_WithVali } else { - companyIds.Should().BeNull(); result.CompanyIdAliase.Should().BeNull(); } } #endregion + #region GetOwnCompanyIdentityProviderUpdateData + + [Theory] + [InlineData("38f56465-ce26-4f25-9745-1791620dc200", "41fd2ab8-71cd-4546-9bef-a388d91b2542", "Test-Alias2", false)] + public async Task GetOwnCompanyIdentityProviderUpdateData_WithValidOwner_ReturnsExpected(Guid identityProviderId, Guid companyId, string alias, bool isOwner) + { + var sut = await CreateSut().ConfigureAwait(false); + + var result = await sut.GetOwnCompanyIdentityProviderUpdateData(identityProviderId, companyId).ConfigureAwait(false); + + // Assert + result.Alias.Should().Be(alias); + result.IsOwner.Should().Be(isOwner); + } + + #endregion + + #region GetOwnCompanyIdentityProviderUpdateDataForDelete + + [Theory] + [InlineData("38f56465-ce26-4f25-9745-1791620dc198", "ac861325-bc54-4583-bcdc-9e9f2a38ff84", "Idp-123", true, "Bayerische Motorenwerke AG", new[] { "3390c2d7-75c1-4169-aa27-6ce00e1f3cdd", "0dcd8209-85e2-4073-b130-ac094fb47106" })] + [InlineData("38f56465-ce26-4f25-9745-1791620dc198", "3390c2d7-75c1-4169-aa27-6ce00e1f3cdd", "Idp-123", false, "Bayerische Motorenwerke AG", new[] { "3390c2d7-75c1-4169-aa27-6ce00e1f3cdd", "0dcd8209-85e2-4073-b130-ac094fb47106" })] + [InlineData("38f56465-ce26-4f25-9745-1791620dc199", "ac861325-bc54-4583-bcdc-9e9f2a38ff84", "Test-Alias", false, "CX-Test-Access", new[] { "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88" })] + [InlineData("38f56465-ce26-4f25-9745-1791620dc199", "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88", "Test-Alias", true, "CX-Test-Access", new[] { "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88" })] + [InlineData("38f56465-ce26-4f25-9745-1791620dc200", "41fd2ab8-71cd-4546-9bef-a388d91b2542", "Test-Alias2", false, "Catena-X", new[] { "41fd2ab8-71cd-4546-9bef-a388d91b2542", "41fd2ab8-7123-4546-9bef-a388d91b2999", "3390c2d7-75c1-4169-aa27-6ce00e1f3cdd", "0dcd8209-85e2-4073-b130-ac094fb47106", "2dc4249f-b5ca-4d42-bef1-7a7a950a4f88" })] + public async Task GetOwnCompanyIdentityProviderUpdateDataForDelete_WithValidOwner_ReturnsExpected(Guid identityProviderId, Guid companyId, string alias, bool isOwner, string ownerCompanyName, IEnumerable? companyIds) + { + var sut = await CreateSut().ConfigureAwait(false); + + var result = await sut.GetOwnCompanyIdentityProviderUpdateDataForDelete(identityProviderId, companyId).ConfigureAwait(false); + + // Assert + result.Alias.Should().Be(alias); + result.IsOwner.Should().Be(isOwner); + result.IdpOwnerName.Should().Be(ownerCompanyName); + if (alias == "Test-Alias2") + { + result.CompanyIdAliase.Should().HaveCount(5).And.Satisfy( + x => x.CompanyId == new Guid("41fd2ab8-71cd-4546-9bef-a388d91b2542") && x.Aliase.SequenceEqual(new[] { "Test-Alias2" }), + x => x.CompanyId == new Guid("41fd2ab8-7123-4546-9bef-a388d91b2999") && x.Aliase.SequenceEqual(new[] { "Test-Alias2" }), + x => x.CompanyId == new Guid("3390c2d7-75c1-4169-aa27-6ce00e1f3cdd") && x.Aliase.Order().SequenceEqual(new[] { "Idp-123", "Test-Alias2" }), + x => x.CompanyId == new Guid("0dcd8209-85e2-4073-b130-ac094fb47106") && x.Aliase.Order().SequenceEqual(new[] { "Idp-123", "Test-Alias2" }), + x => x.CompanyId == new Guid("2dc4249f-b5ca-4d42-bef1-7a7a950a4f88") && x.Aliase.Order().SequenceEqual(new[] { "Test-Alias", "Test-Alias2" }) + ); + } + else + { + result.CompanyIdAliase.Should().Match Aliase)>>(cida => cida.Select(x => x.CompanyId).Order().SequenceEqual(companyIds!.Select(i => new Guid(i)).Order()) && + cida.Select(x => x.Aliase).All(a => a.Order().SequenceEqual(new[] { alias, "Test-Alias2" }))); + } + } + + #endregion + #region GetCompanyIdentityProviderCategoryDataUntracked [Fact] diff --git a/tests/portalbackend/PortalBackend.DBAccess.Tests/PortalBackend.DBAccess.Tests.csproj b/tests/portalbackend/PortalBackend.DBAccess.Tests/PortalBackend.DBAccess.Tests.csproj index 9a48e0b174..d55085bd40 100644 --- a/tests/portalbackend/PortalBackend.DBAccess.Tests/PortalBackend.DBAccess.Tests.csproj +++ b/tests/portalbackend/PortalBackend.DBAccess.Tests/PortalBackend.DBAccess.Tests.csproj @@ -1,334 +1,58 @@ - - - - Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Tests - Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Tests - net7.0 - enable - enable - false - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - Seeder\Data\ - - - + + + + Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Tests + Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Tests + net7.0 + enable + enable + false + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + + diff --git a/tests/portalbackend/PortalBackend.DBAccess.Tests/UserRepositoryTests.cs b/tests/portalbackend/PortalBackend.DBAccess.Tests/UserRepositoryTests.cs index d72402a755..ecbd659f32 100644 --- a/tests/portalbackend/PortalBackend.DBAccess.Tests/UserRepositoryTests.cs +++ b/tests/portalbackend/PortalBackend.DBAccess.Tests/UserRepositoryTests.cs @@ -370,7 +370,8 @@ public async Task GetApplicationsWithStatusUntrackedAsync_ReturnsExpected() // Assert result.Should().NotBeNull().And.Satisfy(x => x.ApplicationId == new Guid("6b2d1263-c073-4a48-bfaf-704dc154ca9e") && - x.ApplicationStatus == CompanyApplicationStatusId.SUBMITTED); + x.ApplicationStatus == CompanyApplicationStatusId.SUBMITTED && + x.ApplicationType == CompanyApplicationTypeId.INTERNAL); result.Single().ApplicationChecklist.Should().Satisfy( y => y.TypeId == ApplicationChecklistEntryTypeId.APPLICATION_ACTIVATION && y.StatusId == ApplicationChecklistEntryStatusId.TO_DO, y => y.TypeId == ApplicationChecklistEntryTypeId.BUSINESS_PARTNER_NUMBER && y.StatusId == ApplicationChecklistEntryStatusId.DONE, diff --git a/tests/processes/Processes.Worker.Library.Tests/ProcessExecutionServiceTests.cs b/tests/processes/Processes.Worker.Library.Tests/ProcessExecutionServiceTests.cs index 92d5a9de32..4936bd8c90 100644 --- a/tests/processes/Processes.Worker.Library.Tests/ProcessExecutionServiceTests.cs +++ b/tests/processes/Processes.Worker.Library.Tests/ProcessExecutionServiceTests.cs @@ -22,12 +22,12 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider; -using Org.Eclipse.TractusX.Portal.Backend.Framework.ProcessIdentity; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Entities; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; +using Org.Eclipse.TractusX.Portal.Backend.Processes.ProcessIdentity; using System.Collections.Immutable; namespace Org.Eclipse.TractusX.Portal.Backend.Processes.Worker.Library.Tests; diff --git a/tests/registration/Registration.Service.Tests/BusinessLogic/RegistrationBusinessLogicTest.cs b/tests/registration/Registration.Service.Tests/BusinessLogic/RegistrationBusinessLogicTest.cs index 9191547940..aca2bbf783 100644 --- a/tests/registration/Registration.Service.Tests/BusinessLogic/RegistrationBusinessLogicTest.cs +++ b/tests/registration/Registration.Service.Tests/BusinessLogic/RegistrationBusinessLogicTest.cs @@ -323,6 +323,7 @@ public async Task GetAllApplicationsForUserWithStatus_WithValidUser_GetsAllRoles new CompanyApplicationWithStatus( _fixture.Create(), CompanyApplicationStatusId.VERIFY, + CompanyApplicationTypeId.INTERNAL, new[] { new ApplicationChecklistData(ApplicationChecklistEntryTypeId.APPLICATION_ACTIVATION, diff --git a/tests/registration/Registration.Service.Tests/Registration.Service.Tests.csproj b/tests/registration/Registration.Service.Tests/Registration.Service.Tests.csproj index 8ae32c1fe9..53492b3503 100644 --- a/tests/registration/Registration.Service.Tests/Registration.Service.Tests.csproj +++ b/tests/registration/Registration.Service.Tests/Registration.Service.Tests.csproj @@ -49,7 +49,6 @@ - diff --git a/tests/shared/Tests.Shared/Extensions/ControllerExtensions.cs b/tests/shared/Tests.Shared/Extensions/ControllerExtensions.cs index a27c6f3545..614f7462c5 100644 --- a/tests/shared/Tests.Shared/Extensions/ControllerExtensions.cs +++ b/tests/shared/Tests.Shared/Extensions/ControllerExtensions.cs @@ -19,8 +19,8 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; using System.Security.Claims; namespace Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; diff --git a/tests/shared/Tests.Shared/IntegrationTests/BasePublicUrlTests.cs b/tests/shared/Tests.Shared/IntegrationTests/BasePublicUrlTests.cs index 9ac40537b2..dc9373bbcb 100644 --- a/tests/shared/Tests.Shared/IntegrationTests/BasePublicUrlTests.cs +++ b/tests/shared/Tests.Shared/IntegrationTests/BasePublicUrlTests.cs @@ -19,9 +19,9 @@ ********************************************************************************/ using FluentAssertions; -using Org.Eclipse.TractusX.Portal.Backend.Framework.PublicInfos; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.Extensions; using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.TestSeeds; +using Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos; using System.Linq.Expressions; using System.Net; using Xunit; diff --git a/tests/shared/Tests.Shared/IntegrationTests/FakePolicyEvaluator.cs b/tests/shared/Tests.Shared/IntegrationTests/FakePolicyEvaluator.cs index dab99eed9f..93a40d1c72 100644 --- a/tests/shared/Tests.Shared/IntegrationTests/FakePolicyEvaluator.cs +++ b/tests/shared/Tests.Shared/IntegrationTests/FakePolicyEvaluator.cs @@ -21,7 +21,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Policy; using Microsoft.AspNetCore.Http; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; using System.Security.Claims; namespace Org.Eclipse.TractusX.Portal.Backend.Tests.Shared.IntegrationTests; diff --git a/tests/shared/Tests.Shared/Tests.Shared.csproj b/tests/shared/Tests.Shared/Tests.Shared.csproj index d1ebeb3bc6..aeec2bb810 100644 --- a/tests/shared/Tests.Shared/Tests.Shared.csproj +++ b/tests/shared/Tests.Shared/Tests.Shared.csproj @@ -29,34 +29,16 @@ - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - + - + + diff --git a/tests/framework/Framework.Web.Tests/MandatoryIdentityClaimHandlerTests.cs b/tests/web/Web.Identity.Tests/MandatoryIdentityClaimHandlerTests.cs similarity index 98% rename from tests/framework/Framework.Web.Tests/MandatoryIdentityClaimHandlerTests.cs rename to tests/web/Web.Identity.Tests/MandatoryIdentityClaimHandlerTests.cs index d1fc6889ba..20d099acc1 100644 --- a/tests/framework/Framework.Web.Tests/MandatoryIdentityClaimHandlerTests.cs +++ b/tests/web/Web.Identity.Tests/MandatoryIdentityClaimHandlerTests.cs @@ -20,11 +20,11 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.Logging; using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; -using Org.Eclipse.TractusX.Portal.Backend.Framework.Models; +using Org.Eclipse.TractusX.Portal.Backend.Framework.Tests.Shared; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories; using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; -using Org.Eclipse.TractusX.Portal.Backend.Tests.Shared; +using Org.Eclipse.TractusX.Portal.Backend.Web.Identity; using System.Security.Claims; namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Web.Tests; diff --git a/tests/framework/Framework.PublicInfos.Tests/Usings.cs b/tests/web/Web.Identity.Tests/Usings.cs similarity index 100% rename from tests/framework/Framework.PublicInfos.Tests/Usings.cs rename to tests/web/Web.Identity.Tests/Usings.cs diff --git a/tests/framework/Framework.PublicInfos.Tests/Framework.PublicInfos.Tests.csproj b/tests/web/Web.Identity.Tests/Web.Identity.Tests.csproj similarity index 87% rename from tests/framework/Framework.PublicInfos.Tests/Framework.PublicInfos.Tests.csproj rename to tests/web/Web.Identity.Tests/Web.Identity.Tests.csproj index db76488a39..0e0f87a766 100644 --- a/tests/framework/Framework.PublicInfos.Tests/Framework.PublicInfos.Tests.csproj +++ b/tests/web/Web.Identity.Tests/Web.Identity.Tests.csproj @@ -1,6 +1,5 @@ + + + + Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.Tests + Org.Eclipse.TractusX.Portal.Backend.Web.PublicInfos.Tests + net7.0 + enable + enable + false + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + +