From a2bd154a607b8fa50ca5e73b3dd2c962878bfa5b Mon Sep 17 00:00:00 2001
From: jjeroch <94133633+jjeroch@users.noreply.github.com>
Date: Fri, 12 Jan 2024 12:56:30 +0100
Subject: [PATCH] docs(developer): DB documentation for agreements (#223)
---
.../Agreements - DB - View.md | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 developer/Technical Documentation/DB Views and Details/Agreements - DB - View.md
diff --git a/developer/Technical Documentation/DB Views and Details/Agreements - DB - View.md b/developer/Technical Documentation/DB Views and Details/Agreements - DB - View.md
new file mode 100644
index 000000000..281ff5c50
--- /dev/null
+++ b/developer/Technical Documentation/DB Views and Details/Agreements - DB - View.md
@@ -0,0 +1,38 @@
+## Agreements
+
+### Agreement Table Connection
+
+
+
+
+
+
+
+
+### Details
+
+Agreements used inside the registration and portal lifecycle flow are stored inside the agreement table.
+The table is mainly connected to the following 5 tables:
+
+- documents (to link a document to an agreement)
+- consents (stores the given consent by the company user to the respective agreement)
+- agreement_assigned_offers (used for agreements owned by offer providers and can get displayed in the offer subscription process to the user)
+- agreement_assigned_offer_types (depending on the offer type, agreements can get mappes and will be used in the offer release process to request for consent from the offer provider upfront to publishing)
+- agreement_assigned_company_roles (used to link agreements to company rules; will be displayed in the 'registration' and 'change company role' function
+
+
+
+Key functions:
+* documents can be ACTIVE/INACTIVE (only active documents are relevant)
+* mandatory tag (agreements can be mandatory or non-mandatory; mandatory agreements need to receive a user consent before proceeding with the functional flow)
+
+
+
+
+## NOTICE
+
+This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0).
+
+- SPDX-License-Identifier: Apache-2.0
+- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation
+- Source URL: https://github.com/eclipse-tractusx/portal-assets