This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Vertex Modules

Overview of the modules of the Vertex platform.

This is a detailed overview of all Vertex modules that are currently active.

For each specific module we can find the technical / functional documentation of the Vertex module, that includes the data it masters, the processes that are hosted by the module and the screens in the user interface that belong to this module.

1 - CRM module

The CRM module in Vertex

This is a description of the CRM module

1.1 - Batch

A batch is a set of proposition pricings. Its goal is to have a grouped result of pricings to send to customer-facing applications. Batches can also contain product component pricings, which are intermediate pricings that can be used for (parts of) the proposition pricings. To create a batch, you need to run a batch generator.

Batch

Batch Properties

A batch can have a set of other properties, some of which you need to enable directly on the batch generator:

1. Name-Value Pairs

These are a set of extra information fields that will be applied to every pricing on the batch. They are used to set the properties that define the batch as a group.

Examples include:

  • Indicated start-, sourcing-, or delivery time
  • Sales channel
  • Sales batch version

2. Strategies

Strategies contain information that later processes (such as the portfolio management module) can use to source, purchase, or hedge volumes for these specific pricings. The resulting trades will also often impact parts of the price.

  • To enable: Toggle the ‘Use Strategy’ button on the batch generator.
  • ⚠️ TODO: Clarify how they become available for pricings here.

3. Supported Volume Forecast Types

The system supports three different volume forecast types:

  1. Model Client
  2. Time Series To create these time series, select a script of the type ‘Sales batch forecast time series’
  • ⚠️ TODO: Have the BRE linked somewhere and make sure the Sales batch forecast time series output is also in there This script will output either a result message, or a set of time series that can then be used by the pricings. Pricings cannot be generated without a forecast script that has run successfully. Use the script to do validations and give proper warning/error results in case the results are not as intended.

  1. Aggregation Tree

1.2 - CRM Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Brand

Aggregate Root: Brand

Represents a brand entity in the CRM system. Brands are used to categorize and organize products and services.

erDiagram
    "CRM.Brands" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ProductComponentModelPricingRequest_Brand" }o--|| "CRM.Brands" : "BrandId"
    "CRM.PropositionModelPricingRequest_Brand" }o--|| "CRM.Brands" : "BrandId"
erDiagram
    "CRM.Brands" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ProductComponentModelPricingRequest_Brand" }o--|| "CRM.Brands" : "BrandId"
    "CRM.PropositionModelPricingRequest_Brand" }o--|| "CRM.Brands" : "BrandId"
{
    "definitions":  {
                        "CRM.Brands":  {
                                           "properties":  {
                                                              "Concealed":  {
                                                                                "type":  "boolean",
                                                                                "description":  "bit"
                                                                            },
                                                              "EntityUpdatedAuthToken":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                              "Id":  {
                                                                         "format":  "uuid",
                                                                         "description":  "uniqueidentifier",
                                                                         "type":  "string"
                                                                     },
                                                              "EntityCreatedDateTime":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                              "Name":  {
                                                                           "type":  "string",
                                                                           "description":  "nvarchar"
                                                                       },
                                                              "EntityUpdatedDateTime":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                              "EntityCreatedAuthToken":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                              "Tenant":  {
                                                                             "format":  "uuid",
                                                                             "description":  "uniqueidentifier",
                                                                             "type":  "string"
                                                                         }
                                                          },
                                           "type":  "object"
                                       }
                    },
    "title":  "CRM.Brand",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Collective

Aggregate Root: Collective

Represents a collective group of customers or entities that share common characteristics or relationships.

erDiagram
    "CRM.Collectives" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customers" }o--|| "CRM.Collectives" : "CollectiveId"
erDiagram
    "CRM.Collectives" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customers" }o--|| "CRM.Collectives" : "CollectiveId"
{
    "definitions":  {
                        "CRM.Collectives":  {
                                                "properties":  {
                                                                   "Concealed":  {
                                                                                     "type":  "boolean",
                                                                                     "description":  "bit"
                                                                                 },
                                                                   "EntityUpdatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Id":  {
                                                                              "format":  "uuid",
                                                                              "description":  "uniqueidentifier",
                                                                              "type":  "string"
                                                                          },
                                                                   "EntityCreatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "Name":  {
                                                                                "type":  "string",
                                                                                "description":  "nvarchar"
                                                                            },
                                                                   "EntityUpdatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "EntityCreatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Tenant":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              }
                                                               },
                                                "type":  "object"
                                            }
                    },
    "title":  "CRM.Collective",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Contact

Aggregate Root: Contact

Represents contact information for customers and other entities, including email addresses and telephone numbers.

erDiagram
    "CRM.Contacts" {
        uniqueidentifier Id PK
        nvarchar FirstName 
        nvarchar LastName 
        int Gender 
        nvarchar Initials 
        nvarchar JobTitle 
        nvarchar Note 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar Organization 
        nvarchar LastNamePrefix 
        bit Concealed 
    }

    "CRM.Customer_Contact" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier ContactId FK
        bit IsPrimary 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsAuthorizedToSign 
    }

    "CRM.EmailAddresses" {
        uniqueidentifier Id PK
        uniqueidentifier ContactId FK
        nvarchar Email 
        int EmailType 
        bit IsPrimary 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.TelephoneNumbers" {
        uniqueidentifier Id PK
        uniqueidentifier ContactId FK
        nvarchar PhoneNumber 
        int TelephoneNumberType 
        bit IsPrimary 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.TelephoneNumbers" }o--|| "CRM.Contacts" : "ContactId"
    "CRM.ContractDocuments" }o--|| "CRM.Contacts" : "AddresseeId"
    "CRM.Customer_Contact" }o--|| "CRM.Contacts" : "ContactId"
    "CRM.EmailAddresses" }o--|| "CRM.Contacts" : "ContactId"
    "CRM.Customer_Contact" }o--|| "CRM.Customers" : "CustomerId"
erDiagram
    "CRM.Contacts" {
        uniqueidentifier Id PK
        nvarchar FirstName 
        nvarchar LastName 
        int Gender 
        nvarchar Initials 
        nvarchar JobTitle 
        nvarchar Note 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar Organization 
        nvarchar LastNamePrefix 
        bit Concealed 
    }

    "CRM.Customer_Contact" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier ContactId FK
        bit IsPrimary 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsAuthorizedToSign 
    }

    "CRM.EmailAddresses" {
        uniqueidentifier Id PK
        uniqueidentifier ContactId FK
        nvarchar Email 
        int EmailType 
        bit IsPrimary 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.TelephoneNumbers" {
        uniqueidentifier Id PK
        uniqueidentifier ContactId FK
        nvarchar PhoneNumber 
        int TelephoneNumberType 
        bit IsPrimary 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.TelephoneNumbers" }o--|| "CRM.Contacts" : "ContactId"
    "CRM.ContractDocuments" }o--|| "CRM.Contacts" : "AddresseeId"
    "CRM.Customer_Contact" }o--|| "CRM.Contacts" : "ContactId"
    "CRM.EmailAddresses" }o--|| "CRM.Contacts" : "ContactId"
    "CRM.Customer_Contact" }o--|| "CRM.Customers" : "CustomerId"
{
    "definitions":  {
                        "CRM.TelephoneNumbers":  {
                                                     "properties":  {
                                                                        "PhoneNumber":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "IsPrimary":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "ContactId":  {
                                                                                          "type":  "string",
                                                                                          "description":  "FK to CRM.Contacts"
                                                                                      },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "TelephoneNumberType":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   }
                                                                    },
                                                     "type":  "object"
                                                 },
                        "CRM.Contacts":  {
                                             "properties":  {
                                                                "Note":  {
                                                                             "type":  "string",
                                                                             "description":  "nvarchar"
                                                                         },
                                                                "LastNamePrefix":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                "EntityUpdatedAuthToken":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                "Concealed":  {
                                                                                  "type":  "boolean",
                                                                                  "description":  "bit"
                                                                              },
                                                                "Tenant":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                "EntityCreatedAuthToken":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                "FirstName":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                                "Initials":  {
                                                                                 "type":  "string",
                                                                                 "description":  "nvarchar"
                                                                             },
                                                                "EntityUpdatedDateTime":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                "LastName":  {
                                                                                 "type":  "string",
                                                                                 "description":  "nvarchar"
                                                                             },
                                                                "Gender":  {
                                                                               "type":  "integer",
                                                                               "description":  "int"
                                                                           },
                                                                "Id":  {
                                                                           "format":  "uuid",
                                                                           "description":  "uniqueidentifier",
                                                                           "type":  "string"
                                                                       },
                                                                "Organization":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                "JobTitle":  {
                                                                                 "type":  "string",
                                                                                 "description":  "nvarchar"
                                                                             },
                                                                "EntityCreatedDateTime":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          }
                                                            },
                                             "type":  "object"
                                         },
                        "CRM.EmailAddresses":  {
                                                   "properties":  {
                                                                      "Tenant":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                      "EntityUpdatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Id":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             },
                                                                      "IsPrimary":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                                      "EmailType":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                      "EntityCreatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Concealed":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                                      "ContactId":  {
                                                                                        "type":  "string",
                                                                                        "description":  "FK to CRM.Contacts"
                                                                                    },
                                                                      "EntityUpdatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "EntityCreatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "Email":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                }
                                                                  },
                                                   "type":  "object"
                                               },
                        "CRM.Customer_Contact":  {
                                                     "properties":  {
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "IsPrimary":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "CustomerId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to CRM.Customers"
                                                                                       },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "ContactId":  {
                                                                                          "type":  "string",
                                                                                          "description":  "FK to CRM.Contacts"
                                                                                      },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "IsAuthorizedToSign":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   }
                                                                    },
                                                     "type":  "object"
                                                 }
                    },
    "title":  "CRM.Contact",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Contract

Aggregate Root: Contract

Represents customer contracts with all their versions, documents, and associated metering points and sites.

erDiagram
    "CRM.ContractDocuments" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        uniqueidentifier ContractTypeDocumentTypeId FK
        uniqueidentifier AddresseeId FK
        uniqueidentifier DocumentId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionDetailSetValues" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionDetailSetId FK
        uniqueidentifier ContractTemplateDetailId FK
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionDetailSets" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        uniqueidentifier ContractTemplateId FK
        int DetailSetNumber 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionOptionPhase_ContractVersionDetailSet" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionOptionPhaseId FK
        uniqueidentifier ContractVersionDetailSetId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionOptionPhases" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionOptionId FK
        uniqueidentifier ContractTypePhaseId FK
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier ContractDurationCustomEnumComponentId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionOptions" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        int OptionNumber 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersion_MeteringPoint" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        uniqueidentifier MeteringPointId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersion_Site" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        uniqueidentifier SiteId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersions" {
        uniqueidentifier Id PK
        uniqueidentifier ContractId FK
        int VersionNumber 
        int ContractVersionStatus 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar StatusReason 
        uniqueidentifier GeneralContractVersionDetailSetId FK
        bit Concealed 
    }

    "CRM.Contract_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier ContractId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Contracts" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier ContractTypeId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier SignedContractVersionId FK
        uniqueidentifier MostRelevantContractVersionId FK
        bit Concealed 
        uniqueidentifier SignedContractVersionOptionId FK
    }

    "CRM.ContractDocuments" }o--|| "CRM.Contacts" : "AddresseeId"
    "CRM.ContractDocuments" }o--|| "CRM.ContractTypeDocumentTypes" : "ContractTypeDocumentTypeId"
    "CRM.ContractDocuments" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersionDetailSetValues" }o--|| "CRM.ContractTemplateDetails" : "ContractTemplateDetailId"
    "CRM.ContractVersionDetailSetValues" }o--|| "CRM.ContractVersionDetailSets" : "ContractVersionDetailSetId"
    "CRM.ContractVersionDetailSets" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
    "CRM.ContractVersionDetailSets" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersionOptionPhase_ContractVersionDetailSet" }o--|| "CRM.ContractVersionDetailSets" : "ContractVersionDetailSetId"
    "CRM.ContractVersions" }o--|| "CRM.ContractVersionDetailSets" : "GeneralContractVersionDetailSetId"
    "CRM.ContractVersionOptionPhase_ContractVersionDetailSet" }o--|| "CRM.ContractVersionOptionPhases" : "ContractVersionOptionPhaseId"
    "CRM.ContractVersionOptionPhases" }o--|| "CRM.ContractTypePhases" : "ContractTypePhaseId"
    "CRM.ContractVersionOptionPhases" }o--|| "CRM.ContractVersionOptions" : "ContractVersionOptionId"
    "CRM.Contracts" }o--|| "CRM.ContractVersionOptions" : "SignedContractVersionOptionId"
    "CRM.ContractVersionOptions" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersion_MeteringPoint" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersion_Site" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersion_Site" }o--|| "CRM.Sites" : "SiteId"
    "CRM.Contracts" }o--|| "CRM.ContractVersions" : "MostRelevantContractVersionId"
    "CRM.Contracts" }o--|| "CRM.ContractVersions" : "SignedContractVersionId"
    "CRM.ContractVersions" }o--|| "CRM.Contracts" : "ContractId"
    "CRM.Contract_CategoryLabel" }o--|| "CRM.Contracts" : "ContractId"
    "CRM.Contracts" }o--|| "CRM.ContractTypes" : "ContractTypeId"
    "CRM.Contracts" }o--|| "CRM.Customers" : "CustomerId"
erDiagram
    "CRM.ContractDocuments" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        uniqueidentifier ContractTypeDocumentTypeId FK
        uniqueidentifier AddresseeId FK
        uniqueidentifier DocumentId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionDetailSetValues" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionDetailSetId FK
        uniqueidentifier ContractTemplateDetailId FK
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionDetailSets" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        uniqueidentifier ContractTemplateId FK
        int DetailSetNumber 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionOptionPhase_ContractVersionDetailSet" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionOptionPhaseId FK
        uniqueidentifier ContractVersionDetailSetId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionOptionPhases" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionOptionId FK
        uniqueidentifier ContractTypePhaseId FK
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier ContractDurationCustomEnumComponentId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersionOptions" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        int OptionNumber 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersion_MeteringPoint" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        uniqueidentifier MeteringPointId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersion_Site" {
        uniqueidentifier Id PK
        uniqueidentifier ContractVersionId FK
        uniqueidentifier SiteId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractVersions" {
        uniqueidentifier Id PK
        uniqueidentifier ContractId FK
        int VersionNumber 
        int ContractVersionStatus 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar StatusReason 
        uniqueidentifier GeneralContractVersionDetailSetId FK
        bit Concealed 
    }

    "CRM.Contract_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier ContractId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Contracts" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier ContractTypeId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier SignedContractVersionId FK
        uniqueidentifier MostRelevantContractVersionId FK
        bit Concealed 
        uniqueidentifier SignedContractVersionOptionId FK
    }

    "CRM.ContractDocuments" }o--|| "CRM.Contacts" : "AddresseeId"
    "CRM.ContractDocuments" }o--|| "CRM.ContractTypeDocumentTypes" : "ContractTypeDocumentTypeId"
    "CRM.ContractDocuments" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersionDetailSetValues" }o--|| "CRM.ContractTemplateDetails" : "ContractTemplateDetailId"
    "CRM.ContractVersionDetailSetValues" }o--|| "CRM.ContractVersionDetailSets" : "ContractVersionDetailSetId"
    "CRM.ContractVersionDetailSets" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
    "CRM.ContractVersionDetailSets" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersionOptionPhase_ContractVersionDetailSet" }o--|| "CRM.ContractVersionDetailSets" : "ContractVersionDetailSetId"
    "CRM.ContractVersions" }o--|| "CRM.ContractVersionDetailSets" : "GeneralContractVersionDetailSetId"
    "CRM.ContractVersionOptionPhase_ContractVersionDetailSet" }o--|| "CRM.ContractVersionOptionPhases" : "ContractVersionOptionPhaseId"
    "CRM.ContractVersionOptionPhases" }o--|| "CRM.ContractTypePhases" : "ContractTypePhaseId"
    "CRM.ContractVersionOptionPhases" }o--|| "CRM.ContractVersionOptions" : "ContractVersionOptionId"
    "CRM.Contracts" }o--|| "CRM.ContractVersionOptions" : "SignedContractVersionOptionId"
    "CRM.ContractVersionOptions" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersion_MeteringPoint" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersion_Site" }o--|| "CRM.ContractVersions" : "ContractVersionId"
    "CRM.ContractVersion_Site" }o--|| "CRM.Sites" : "SiteId"
    "CRM.Contracts" }o--|| "CRM.ContractVersions" : "MostRelevantContractVersionId"
    "CRM.Contracts" }o--|| "CRM.ContractVersions" : "SignedContractVersionId"
    "CRM.ContractVersions" }o--|| "CRM.Contracts" : "ContractId"
    "CRM.Contract_CategoryLabel" }o--|| "CRM.Contracts" : "ContractId"
    "CRM.Contracts" }o--|| "CRM.ContractTypes" : "ContractTypeId"
    "CRM.Contracts" }o--|| "CRM.Customers" : "CustomerId"
{
    "definitions":  {
                        "CRM.ContractVersionOptionPhases":  {
                                                                "properties":  {
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "EndDate":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "ContractVersionOptionId":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "FK to CRM.ContractVersionOptions"
                                                                                                               },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "ContractTypePhaseId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to CRM.ContractTypePhases"
                                                                                                           },
                                                                                   "StartDate":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                   "ContractDurationCustomEnumComponentId":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "CRM.ContractVersions":  {
                                                     "properties":  {
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "ContractId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to CRM.Contracts"
                                                                                       },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "StatusReason":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "ContractVersionStatus":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                        "GeneralContractVersionDetailSetId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to CRM.ContractVersionDetailSets"
                                                                                                              },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "VersionNumber":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          }
                                                                    },
                                                     "type":  "object"
                                                 },
                        "CRM.Contracts":  {
                                              "properties":  {
                                                                 "MostRelevantContractVersionId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to CRM.ContractVersions"
                                                                                                   },
                                                                 "SignedContractVersionId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to CRM.ContractVersions"
                                                                                             },
                                                                 "Id":  {
                                                                            "format":  "uuid",
                                                                            "description":  "uniqueidentifier",
                                                                            "type":  "string"
                                                                        },
                                                                 "SignedContractVersionOptionId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to CRM.ContractVersionOptions"
                                                                                                   },
                                                                 "EntityUpdatedAuthToken":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                 "ContractTypeId":  {
                                                                                        "type":  "string",
                                                                                        "description":  "FK to CRM.ContractTypes"
                                                                                    },
                                                                 "EntityCreatedAuthToken":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                 "CustomerId":  {
                                                                                    "type":  "string",
                                                                                    "description":  "FK to CRM.Customers"
                                                                                },
                                                                 "EntityUpdatedDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                 "Tenant":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                 "InternalReference":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                 "ExternalReference":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                 "EntityCreatedDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                 "Concealed":  {
                                                                                   "type":  "boolean",
                                                                                   "description":  "bit"
                                                                               }
                                                             },
                                              "type":  "object"
                                          },
                        "CRM.ContractVersionDetailSetValues":  {
                                                                   "properties":  {
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "ContractTemplateDetailId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to CRM.ContractTemplateDetails"
                                                                                                                   },
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "ContractVersionDetailSetId":  {
                                                                                                                         "type":  "string",
                                                                                                                         "description":  "FK to CRM.ContractVersionDetailSets"
                                                                                                                     },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Value":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                                  },
                                                                   "type":  "object"
                                                               },
                        "CRM.ContractVersionOptionPhase_ContractVersionDetailSet":  {
                                                                                        "properties":  {
                                                                                                           "Concealed":  {
                                                                                                                             "type":  "boolean",
                                                                                                                             "description":  "bit"
                                                                                                                         },
                                                                                                           "EntityUpdatedAuthToken":  {
                                                                                                                                          "format":  "uuid",
                                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                                          "type":  "string"
                                                                                                                                      },
                                                                                                           "Id":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                                           "ContractVersionDetailSetId":  {
                                                                                                                                              "type":  "string",
                                                                                                                                              "description":  "FK to CRM.ContractVersionDetailSets"
                                                                                                                                          },
                                                                                                           "EntityCreatedDateTime":  {
                                                                                                                                         "format":  "date-time",
                                                                                                                                         "description":  "datetimeoffset",
                                                                                                                                         "type":  "string"
                                                                                                                                     },
                                                                                                           "EntityUpdatedDateTime":  {
                                                                                                                                         "format":  "date-time",
                                                                                                                                         "description":  "datetimeoffset",
                                                                                                                                         "type":  "string"
                                                                                                                                     },
                                                                                                           "ContractVersionOptionPhaseId":  {
                                                                                                                                                "type":  "string",
                                                                                                                                                "description":  "FK to CRM.ContractVersionOptionPhases"
                                                                                                                                            },
                                                                                                           "EntityCreatedAuthToken":  {
                                                                                                                                          "format":  "uuid",
                                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                                          "type":  "string"
                                                                                                                                      },
                                                                                                           "Tenant":  {
                                                                                                                          "format":  "uuid",
                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                          "type":  "string"
                                                                                                                      }
                                                                                                       },
                                                                                        "type":  "object"
                                                                                    },
                        "CRM.ContractVersionOptions":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "OptionNumber":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "ContractVersionId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to CRM.ContractVersions"
                                                                                                    },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "CRM.ContractVersionDetailSets":  {
                                                              "properties":  {
                                                                                 "ContractTemplateId":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "FK to CRM.ContractTemplates"
                                                                                                        },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "DetailSetNumber":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "ContractVersionId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to CRM.ContractVersions"
                                                                                                       },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "CRM.ContractVersion_Site":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "SiteId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to CRM.Sites"
                                                                                       },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "ContractVersionId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to CRM.ContractVersions"
                                                                                                  },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "CRM.ContractDocuments":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "AddresseeId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to CRM.Contacts"
                                                                                         },
                                                                         "DocumentId":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "ContractTypeDocumentTypeId":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "FK to CRM.ContractTypeDocumentTypes"
                                                                                                        },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "ContractVersionId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to CRM.ContractVersions"
                                                                                               },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "CRM.Contract_CategoryLabel":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "CategoryLabelId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                              "ContractId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to CRM.Contracts"
                                                                                             },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "CategoryId":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "CRM.ContractVersion_MeteringPoint":  {
                                                                  "properties":  {
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "MeteringPointId":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "ContractVersionId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to CRM.ContractVersions"
                                                                                                           },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                }
                                                                                 },
                                                                  "type":  "object"
                                                              }
                    },
    "title":  "CRM.Contract",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Contract Template

Aggregate Root: ContractTemplate

Represents templates for creating contracts with predefined structures and details.

erDiagram
    "CRM.ContractTemplateDetails" {
        uniqueidentifier Id PK
        uniqueidentifier ContractTemplateId FK
        nvarchar Key 
        nvarchar DefaultValue 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        bit IsFixed 
        bit IsRequired 
        bit IsActive 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTemplates" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTemplateDetails" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
    "CRM.ContractTemplateDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.ContractVersionDetailSetValues" }o--|| "CRM.ContractTemplateDetails" : "ContractTemplateDetailId"
    "CRM.ContractTypePhase_ContractTemplate" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
    "CRM.ContractTypes" }o--|| "CRM.ContractTemplates" : "GeneralContractTemplateId"
    "CRM.ContractVersionDetailSets" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
erDiagram
    "CRM.ContractTemplateDetails" {
        uniqueidentifier Id PK
        uniqueidentifier ContractTemplateId FK
        nvarchar Key 
        nvarchar DefaultValue 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        bit IsFixed 
        bit IsRequired 
        bit IsActive 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTemplates" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTemplateDetails" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
    "CRM.ContractTemplateDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.ContractVersionDetailSetValues" }o--|| "CRM.ContractTemplateDetails" : "ContractTemplateDetailId"
    "CRM.ContractTypePhase_ContractTemplate" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
    "CRM.ContractTypes" }o--|| "CRM.ContractTemplates" : "GeneralContractTemplateId"
    "CRM.ContractVersionDetailSets" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
{
    "definitions":  {
                        "CRM.ContractTemplateDetails":  {
                                                            "properties":  {
                                                                               "IsRequired":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "IsActive":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "DefaultValue":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                               "IsFixed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "ContractTemplateId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to CRM.ContractTemplates"
                                                                                                      },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                               "Key":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "FormatType":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                               "CustomEnumId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to PM.CustomEnums"
                                                                                                }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "CRM.ContractTemplates":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Name":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  }
                    },
    "title":  "CRM.ContractTemplate",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Contract Type

Aggregate Root: ContractType

Represents different types of contracts with their associated document types and phases.

erDiagram
    "CRM.ContractTypeDocumentTypes" {
        uniqueidentifier Id PK
        uniqueidentifier ContractTypeId FK
        nvarchar Name 
        uniqueidentifier DocGenTemplateRootId 
        bit IsScorable 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTypePhase_ContractTemplate" {
        uniqueidentifier Id PK
        uniqueidentifier ContractTypePhaseId FK
        uniqueidentifier ContractTemplateId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTypePhases" {
        uniqueidentifier Id PK
        uniqueidentifier ContractTypeId FK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTypes" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier PropositionTemplateId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier GeneralContractTemplateId FK
        bit Concealed 
    }

    "CRM.ContractDocuments" }o--|| "CRM.ContractTypeDocumentTypes" : "ContractTypeDocumentTypeId"
    "CRM.ContractTypeDocumentTypes" }o--|| "CRM.ContractTypes" : "ContractTypeId"
    "CRM.ContractTypePhase_ContractTemplate" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
    "CRM.ContractTypePhase_ContractTemplate" }o--|| "CRM.ContractTypePhases" : "ContractTypePhaseId"
    "CRM.ContractTypePhases" }o--|| "CRM.ContractTypes" : "ContractTypeId"
    "CRM.ContractVersionOptionPhases" }o--|| "CRM.ContractTypePhases" : "ContractTypePhaseId"
    "CRM.Contracts" }o--|| "CRM.ContractTypes" : "ContractTypeId"
    "CRM.ContractTypes" }o--|| "CRM.ContractTemplates" : "GeneralContractTemplateId"
erDiagram
    "CRM.ContractTypeDocumentTypes" {
        uniqueidentifier Id PK
        uniqueidentifier ContractTypeId FK
        nvarchar Name 
        uniqueidentifier DocGenTemplateRootId 
        bit IsScorable 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTypePhase_ContractTemplate" {
        uniqueidentifier Id PK
        uniqueidentifier ContractTypePhaseId FK
        uniqueidentifier ContractTemplateId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTypePhases" {
        uniqueidentifier Id PK
        uniqueidentifier ContractTypeId FK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ContractTypes" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier PropositionTemplateId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier GeneralContractTemplateId FK
        bit Concealed 
    }

    "CRM.ContractDocuments" }o--|| "CRM.ContractTypeDocumentTypes" : "ContractTypeDocumentTypeId"
    "CRM.ContractTypeDocumentTypes" }o--|| "CRM.ContractTypes" : "ContractTypeId"
    "CRM.ContractTypePhase_ContractTemplate" }o--|| "CRM.ContractTemplates" : "ContractTemplateId"
    "CRM.ContractTypePhase_ContractTemplate" }o--|| "CRM.ContractTypePhases" : "ContractTypePhaseId"
    "CRM.ContractTypePhases" }o--|| "CRM.ContractTypes" : "ContractTypeId"
    "CRM.ContractVersionOptionPhases" }o--|| "CRM.ContractTypePhases" : "ContractTypePhaseId"
    "CRM.Contracts" }o--|| "CRM.ContractTypes" : "ContractTypeId"
    "CRM.ContractTypes" }o--|| "CRM.ContractTemplates" : "GeneralContractTemplateId"
{
    "definitions":  {
                        "CRM.ContractTypeDocumentTypes":  {
                                                              "properties":  {
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "DocGenTemplateRootId":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "ContractTypeId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to CRM.ContractTypes"
                                                                                                    },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Name":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "IsScorable":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "CRM.ContractTypePhase_ContractTemplate":  {
                                                                       "properties":  {
                                                                                          "ContractTemplateId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to CRM.ContractTemplates"
                                                                                                                 },
                                                                                          "EntityUpdatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "Id":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                          "ContractTypePhaseId":  {
                                                                                                                      "type":  "string",
                                                                                                                      "description":  "FK to CRM.ContractTypePhases"
                                                                                                                  },
                                                                                          "Concealed":  {
                                                                                                            "type":  "boolean",
                                                                                                            "description":  "bit"
                                                                                                        },
                                                                                          "EntityCreatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "EntityUpdatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "EntityCreatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "Tenant":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     }
                                                                                      },
                                                                       "type":  "object"
                                                                   },
                        "CRM.ContractTypePhases":  {
                                                       "properties":  {
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "ContractTypeId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to CRM.ContractTypes"
                                                                                             },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "Name":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "CRM.ContractTypes":  {
                                                  "properties":  {
                                                                     "Concealed":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "bit"
                                                                                   },
                                                                     "EntityUpdatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Id":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                     "GeneralContractTemplateId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to CRM.ContractTemplates"
                                                                                                   },
                                                                     "EntityUpdatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "EntityCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "Name":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                                     "PropositionTemplateId":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "EntityCreatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Tenant":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                }
                                                                 },
                                                  "type":  "object"
                                              }
                    },
    "title":  "CRM.ContractType",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Control Flex Asset Result Processor

Aggregate Root: ControlFlexAssetResultProcessor

Processes results from flex asset control operations and manages the outcome of flex asset activities.

erDiagram
    "CRM.ControlFlexAssetResultProcessors" {
        uniqueidentifier Id PK
        uniqueidentifier ControlFlexAssetResultProcessorImplementationId 
        nvarchar Name 
        nvarchar Description 
        nvarchar Config 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_ControlFlexAssetResultProcessor" }o--|| "CRM.ControlFlexAssetResultProcessors" : "ControlFlexAssetResultProcessorId"
erDiagram
    "CRM.ControlFlexAssetResultProcessors" {
        uniqueidentifier Id PK
        uniqueidentifier ControlFlexAssetResultProcessorImplementationId 
        nvarchar Name 
        nvarchar Description 
        nvarchar Config 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_ControlFlexAssetResultProcessor" }o--|| "CRM.ControlFlexAssetResultProcessors" : "ControlFlexAssetResultProcessorId"
{
    "definitions":  {
                        "CRM.ControlFlexAssetResultProcessors":  {
                                                                     "properties":  {
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "Config":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                        "Description":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                        "ControlFlexAssetResultProcessorImplementationId":  {
                                                                                                                                                "format":  "uuid",
                                                                                                                                                "description":  "uniqueidentifier",
                                                                                                                                                "type":  "string"
                                                                                                                                            },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "Name":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                                    },
                                                                     "type":  "object"
                                                                 }
                    },
    "title":  "CRM.ControlFlexAssetResultProcessor",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Control Flex Asset Value Provider

Aggregate Root: ControlFlexAssetValueProvider

Provides values for flex asset control operations and manages the input data for flex asset activities.

erDiagram
    "CRM.ControlFlexAssetValueProviders" {
        uniqueidentifier Id PK
        uniqueidentifier ControlFlexAssetValueProviderImplementationId 
        nvarchar Name 
        nvarchar Description 
        nvarchar Config 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_ControlFlexAssetValueProvider" }o--|| "CRM.ControlFlexAssetValueProviders" : "ControlFlexAssetValueProviderId"
erDiagram
    "CRM.ControlFlexAssetValueProviders" {
        uniqueidentifier Id PK
        uniqueidentifier ControlFlexAssetValueProviderImplementationId 
        nvarchar Name 
        nvarchar Description 
        nvarchar Config 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_ControlFlexAssetValueProvider" }o--|| "CRM.ControlFlexAssetValueProviders" : "ControlFlexAssetValueProviderId"
{
    "definitions":  {
                        "CRM.ControlFlexAssetValueProviders":  {
                                                                   "properties":  {
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "Config":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                      "Description":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "nvarchar"
                                                                                                      },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "Name":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                      "ControlFlexAssetValueProviderImplementationId":  {
                                                                                                                                            "format":  "uuid",
                                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                                            "type":  "string"
                                                                                                                                        },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                                  },
                                                                   "type":  "object"
                                                               }
                    },
    "title":  "CRM.ControlFlexAssetValueProvider",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Customer

Aggregate Root: Customer

Represents customers in the CRM system with their addresses, names, and associations with metering points and categories.

erDiagram
    "CRM.CustomerAddresses" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        int AddressType 
        nvarchar Street 
        nvarchar HouseNumber 
        nvarchar Suffix 
        nvarchar PostalCode 
        nvarchar City 
        nvarchar Country 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.CustomerNames" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        nvarchar Name 
        int NameType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customer_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customer_MeteringPoint" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier MeteringPointId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customer_SBI" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier SBIId FK
        bit IsMainSBI 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customers" {
        uniqueidentifier Id PK
        nvarchar IBAN 
        nvarchar VATNumber 
        nvarchar Website 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ChamberOfCommerceNumber 
        uniqueidentifier CollectiveId FK
        nvarchar LegalForm 
        nvarchar LegalFormCode 
        uniqueidentifier ChatId 
        bit IsVirtual 
        nvarchar Name 
        nvarchar InternalReference 
        uniqueidentifier AccountManagerUserId 
        bit Concealed 
    }

    "CRM.CustomerAddresses" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.CustomerNames" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_CategoryLabel" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_MeteringPoint" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_SBI" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_SBI" }o--|| "CRM.SBIs" : "SBIId"
    "CRM.FlexControllers" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.ProductComponentModelPricingRequests" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.PropositionModelPricingRequests" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.SalesBatches" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.SalesBatchGenerators" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Sites" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.ProductComponentModelPricingRequest_Customer" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.PropositionModelPricingRequest_Customer" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.EstimatedSalesVolumes" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Contracts" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_Contact" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customers" }o--|| "CRM.Collectives" : "CollectiveId"
erDiagram
    "CRM.CustomerAddresses" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        int AddressType 
        nvarchar Street 
        nvarchar HouseNumber 
        nvarchar Suffix 
        nvarchar PostalCode 
        nvarchar City 
        nvarchar Country 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.CustomerNames" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        nvarchar Name 
        int NameType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customer_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customer_MeteringPoint" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier MeteringPointId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customer_SBI" {
        uniqueidentifier Id PK
        uniqueidentifier CustomerId FK
        uniqueidentifier SBIId FK
        bit IsMainSBI 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customers" {
        uniqueidentifier Id PK
        nvarchar IBAN 
        nvarchar VATNumber 
        nvarchar Website 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ChamberOfCommerceNumber 
        uniqueidentifier CollectiveId FK
        nvarchar LegalForm 
        nvarchar LegalFormCode 
        uniqueidentifier ChatId 
        bit IsVirtual 
        nvarchar Name 
        nvarchar InternalReference 
        uniqueidentifier AccountManagerUserId 
        bit Concealed 
    }

    "CRM.CustomerAddresses" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.CustomerNames" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_CategoryLabel" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_MeteringPoint" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_SBI" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_SBI" }o--|| "CRM.SBIs" : "SBIId"
    "CRM.FlexControllers" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.ProductComponentModelPricingRequests" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.PropositionModelPricingRequests" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.SalesBatches" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.SalesBatchGenerators" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Sites" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.ProductComponentModelPricingRequest_Customer" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.PropositionModelPricingRequest_Customer" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.EstimatedSalesVolumes" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Contracts" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customer_Contact" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.Customers" }o--|| "CRM.Collectives" : "CollectiveId"
{
    "definitions":  {
                        "CRM.Customer_CategoryLabel":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "CategoryLabelId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                              "CustomerId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to CRM.Customers"
                                                                                             },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "CategoryId":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "CRM.CustomerAddresses":  {
                                                      "properties":  {
                                                                         "Street":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                         "Country":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "HouseNumber":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                         "City":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                         "Suffix":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "CustomerId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to CRM.Customers"
                                                                                        },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                         "PostalCode":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "AddressType":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "CRM.Customers":  {
                                              "properties":  {
                                                                 "Concealed":  {
                                                                                   "type":  "boolean",
                                                                                   "description":  "bit"
                                                                               },
                                                                 "Id":  {
                                                                            "format":  "uuid",
                                                                            "description":  "uniqueidentifier",
                                                                            "type":  "string"
                                                                        },
                                                                 "EntityUpdatedAuthToken":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                 "Name":  {
                                                                              "type":  "string",
                                                                              "description":  "nvarchar"
                                                                          },
                                                                 "IBAN":  {
                                                                              "type":  "string",
                                                                              "description":  "nvarchar"
                                                                          },
                                                                 "EntityCreatedAuthToken":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                 "IsVirtual":  {
                                                                                   "type":  "boolean",
                                                                                   "description":  "bit"
                                                                               },
                                                                 "ChamberOfCommerceNumber":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                 "Website":  {
                                                                                 "type":  "string",
                                                                                 "description":  "nvarchar"
                                                                             },
                                                                 "EntityUpdatedDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                 "LegalFormCode":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                 "CollectiveId":  {
                                                                                      "type":  "string",
                                                                                      "description":  "FK to CRM.Collectives"
                                                                                  },
                                                                 "Tenant":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                 "InternalReference":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                 "AccountManagerUserId":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                 "VATNumber":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                                 "ChatId":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                 "EntityCreatedDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                 "LegalForm":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               }
                                                             },
                                              "type":  "object"
                                          },
                        "CRM.Customer_SBI":  {
                                                 "properties":  {
                                                                    "Concealed":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "EntityUpdatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Id":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                    "SBIId":  {
                                                                                  "type":  "string",
                                                                                  "description":  "FK to CRM.SBIs"
                                                                              },
                                                                    "CustomerId":  {
                                                                                       "type":  "string",
                                                                                       "description":  "FK to CRM.Customers"
                                                                                   },
                                                                    "EntityCreatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "EntityUpdatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "IsMainSBI":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "EntityCreatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Tenant":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               }
                                                                },
                                                 "type":  "object"
                                             },
                        "CRM.Customer_MeteringPoint":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "CustomerId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to CRM.Customers"
                                                                                             },
                                                                              "MeteringPointId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "CRM.CustomerNames":  {
                                                  "properties":  {
                                                                     "Concealed":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "bit"
                                                                                   },
                                                                     "EntityUpdatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Id":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                     "CustomerId":  {
                                                                                        "type":  "string",
                                                                                        "description":  "FK to CRM.Customers"
                                                                                    },
                                                                     "EntityCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "Name":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                                     "EntityUpdatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "NameType":  {
                                                                                      "type":  "integer",
                                                                                      "description":  "int"
                                                                                  },
                                                                     "EntityCreatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Tenant":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                }
                                                                 },
                                                  "type":  "object"
                                              }
                    },
    "title":  "CRM.Customer",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Flex Controller

Aggregate Root: FlexController

Controls flex asset operations and manages the relationship between sites, installations, and flex asset processors.

erDiagram
    "CRM.FlexController_ControlFlexAssetResultProcessor" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier ControlFlexAssetResultProcessorId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_ControlFlexAssetValueProvider" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier ControlFlexAssetValueProviderId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_Installation" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier InstallationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_Site" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier SiteId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_Site_MeteringPoint" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier SiteMeteringPointId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexControllers" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        nvarchar Schedule 
        uniqueidentifier ScriptId 
        uniqueidentifier CustomerId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_ControlFlexAssetResultProcessor" }o--|| "CRM.ControlFlexAssetResultProcessors" : "ControlFlexAssetResultProcessorId"
    "CRM.FlexController_ControlFlexAssetResultProcessor" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexController_ControlFlexAssetValueProvider" }o--|| "CRM.ControlFlexAssetValueProviders" : "ControlFlexAssetValueProviderId"
    "CRM.FlexController_ControlFlexAssetValueProvider" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexController_Installation" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexController_Site" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexController_Site_MeteringPoint" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexControllers" }o--|| "CRM.Customers" : "CustomerId"
erDiagram
    "CRM.FlexController_ControlFlexAssetResultProcessor" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier ControlFlexAssetResultProcessorId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_ControlFlexAssetValueProvider" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier ControlFlexAssetValueProviderId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_Installation" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier InstallationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_Site" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier SiteId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_Site_MeteringPoint" {
        uniqueidentifier Id PK
        uniqueidentifier FlexControllerId FK
        uniqueidentifier SiteMeteringPointId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexControllers" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        nvarchar Schedule 
        uniqueidentifier ScriptId 
        uniqueidentifier CustomerId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.FlexController_ControlFlexAssetResultProcessor" }o--|| "CRM.ControlFlexAssetResultProcessors" : "ControlFlexAssetResultProcessorId"
    "CRM.FlexController_ControlFlexAssetResultProcessor" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexController_ControlFlexAssetValueProvider" }o--|| "CRM.ControlFlexAssetValueProviders" : "ControlFlexAssetValueProviderId"
    "CRM.FlexController_ControlFlexAssetValueProvider" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexController_Installation" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexController_Site" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexController_Site_MeteringPoint" }o--|| "CRM.FlexControllers" : "FlexControllerId"
    "CRM.FlexControllers" }o--|| "CRM.Customers" : "CustomerId"
{
    "definitions":  {
                        "CRM.FlexController_Site":  {
                                                        "properties":  {
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "FlexControllerId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to CRM.FlexControllers"
                                                                                                },
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "SiteId":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      }
                                                                       },
                                                        "type":  "object"
                                                    },
                        "CRM.FlexControllers":  {
                                                    "properties":  {
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "ScriptId":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                       "Description":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Name":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "CustomerId":  {
                                                                                          "type":  "string",
                                                                                          "description":  "FK to CRM.Customers"
                                                                                      },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "Schedule":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                   },
                                                    "type":  "object"
                                                },
                        "CRM.FlexController_Site_MeteringPoint":  {
                                                                      "properties":  {
                                                                                         "Concealed":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                                         "FlexControllerId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to CRM.FlexControllers"
                                                                                                              },
                                                                                         "Id":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                         "SiteMeteringPointId":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "EntityCreatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Tenant":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    }
                                                                                     },
                                                                      "type":  "object"
                                                                  },
                        "CRM.FlexController_ControlFlexAssetResultProcessor":  {
                                                                                   "properties":  {
                                                                                                      "Concealed":  {
                                                                                                                        "type":  "boolean",
                                                                                                                        "description":  "bit"
                                                                                                                    },
                                                                                                      "FlexControllerId":  {
                                                                                                                               "type":  "string",
                                                                                                                               "description":  "FK to CRM.FlexControllers"
                                                                                                                           },
                                                                                                      "Id":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                                     "format":  "uuid",
                                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                                     "type":  "string"
                                                                                                                                 },
                                                                                                      "ControlFlexAssetResultProcessorId":  {
                                                                                                                                                "type":  "string",
                                                                                                                                                "description":  "FK to CRM.ControlFlexAssetResultProcessors"
                                                                                                                                            },
                                                                                                      "EntityCreatedDateTime":  {
                                                                                                                                    "format":  "date-time",
                                                                                                                                    "description":  "datetimeoffset",
                                                                                                                                    "type":  "string"
                                                                                                                                },
                                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                                    "format":  "date-time",
                                                                                                                                    "description":  "datetimeoffset",
                                                                                                                                    "type":  "string"
                                                                                                                                },
                                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                                     "format":  "uuid",
                                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                                     "type":  "string"
                                                                                                                                 },
                                                                                                      "Tenant":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 }
                                                                                                  },
                                                                                   "type":  "object"
                                                                               },
                        "CRM.FlexController_Installation":  {
                                                                "properties":  {
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "FlexControllerId":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "FK to CRM.FlexControllers"
                                                                                                        },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "InstallationId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "CRM.FlexController_ControlFlexAssetValueProvider":  {
                                                                                 "properties":  {
                                                                                                    "Concealed":  {
                                                                                                                      "type":  "boolean",
                                                                                                                      "description":  "bit"
                                                                                                                  },
                                                                                                    "FlexControllerId":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "FK to CRM.FlexControllers"
                                                                                                                         },
                                                                                                    "Id":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                                   "format":  "uuid",
                                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                                   "type":  "string"
                                                                                                                               },
                                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                                   "format":  "uuid",
                                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                                   "type":  "string"
                                                                                                                               },
                                                                                                    "ControlFlexAssetValueProviderId":  {
                                                                                                                                            "type":  "string",
                                                                                                                                            "description":  "FK to CRM.ControlFlexAssetValueProviders"
                                                                                                                                        },
                                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                                  "format":  "date-time",
                                                                                                                                  "description":  "datetimeoffset",
                                                                                                                                  "type":  "string"
                                                                                                                              },
                                                                                                    "EntityCreatedDateTime":  {
                                                                                                                                  "format":  "date-time",
                                                                                                                                  "description":  "datetimeoffset",
                                                                                                                                  "type":  "string"
                                                                                                                              },
                                                                                                    "Tenant":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               }
                                                                                                },
                                                                                 "type":  "object"
                                                                             }
                    },
    "title":  "CRM.FlexController",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Installation Type

Aggregate Root: InstallationType

Defines different types of installations with their associated keys and configurations.

erDiagram
    "CRM.InstallationTypeKeys" {
        uniqueidentifier Id PK
        uniqueidentifier InstallationTypeId FK
        nvarchar Key 
        bit Active 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.InstallationTypes" {
        uniqueidentifier Id PK
        nvarchar Name 
        bit Active 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.InstallationTypeKeys" }o--|| "CRM.InstallationTypes" : "InstallationTypeId"
    "CRM.InstallationValues" }o--|| "CRM.InstallationTypeKeys" : "InstallationTypeKeyId"
    "CRM.Installations" }o--|| "CRM.InstallationTypes" : "InstallationTypeId"
erDiagram
    "CRM.InstallationTypeKeys" {
        uniqueidentifier Id PK
        uniqueidentifier InstallationTypeId FK
        nvarchar Key 
        bit Active 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.InstallationTypes" {
        uniqueidentifier Id PK
        nvarchar Name 
        bit Active 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.InstallationTypeKeys" }o--|| "CRM.InstallationTypes" : "InstallationTypeId"
    "CRM.InstallationValues" }o--|| "CRM.InstallationTypeKeys" : "InstallationTypeKeyId"
    "CRM.Installations" }o--|| "CRM.InstallationTypes" : "InstallationTypeId"
{
    "definitions":  {
                        "CRM.InstallationTypes":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Name":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Active":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "CRM.InstallationTypeKeys":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "InstallationTypeId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to CRM.InstallationTypes"
                                                                                                   },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "Key":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "Active":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       }
                                                                        },
                                                         "type":  "object"
                                                     }
                    },
    "title":  "CRM.InstallationType",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Model Contract Template

Aggregate Root: ModelContractTemplate

Represents model-based contract templates with predefined structures for automated contract generation.

erDiagram
    "CRM.ModelContractTemplateDetails" {
        uniqueidentifier Id PK
        uniqueidentifier ModelContractTemplateId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int PricingStage 
        bit UserOverwritableOnPricing 
    }

    "CRM.ModelContractTemplates" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        bit IsActive 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ModelContractTemplateDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "CRM.ModelContractTemplates" : "ModelContractTemplateId"
    "CRM.ProductComponentModelPricingRequests" }o--|| "CRM.ModelContractTemplates" : "ModelContractTemplateId"
    "CRM.PropositionModelPricingRequests" }o--|| "CRM.ModelContractTemplates" : "ModelContractTemplateId"
erDiagram
    "CRM.ModelContractTemplateDetails" {
        uniqueidentifier Id PK
        uniqueidentifier ModelContractTemplateId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int PricingStage 
        bit UserOverwritableOnPricing 
    }

    "CRM.ModelContractTemplates" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        bit IsActive 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ModelContractTemplateDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "CRM.ModelContractTemplates" : "ModelContractTemplateId"
    "CRM.ProductComponentModelPricingRequests" }o--|| "CRM.ModelContractTemplates" : "ModelContractTemplateId"
    "CRM.PropositionModelPricingRequests" }o--|| "CRM.ModelContractTemplates" : "ModelContractTemplateId"
{
    "definitions":  {
                        "CRM.ModelContractTemplates":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "Description":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "Name":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "IsActive":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "CRM.ModelContractTemplateDetails":  {
                                                                 "properties":  {
                                                                                    "PricingStage":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "Value":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "ModelContractTemplateId":  {
                                                                                                                    "type":  "string",
                                                                                                                    "description":  "FK to CRM.ModelContractTemplates"
                                                                                                                },
                                                                                    "UserOverwritableOnPricing":  {
                                                                                                                      "type":  "boolean",
                                                                                                                      "description":  "bit"
                                                                                                                  },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                    "Key":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "FormatType":  {
                                                                                                       "type":  "integer",
                                                                                                       "description":  "int"
                                                                                                   },
                                                                                    "CustomEnumId":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "FK to PM.CustomEnums"
                                                                                                     }
                                                                                },
                                                                 "type":  "object"
                                                             }
                    },
    "title":  "CRM.ModelContractTemplate",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Pricing Request Generator

Aggregate Root: PricingRequestGenerator

Generates pricing requests automatically based on configured models and parameters.

erDiagram
    "CRM.ModelPricingRequestKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier ModelPricingRequestId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ModelPricingRequests" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier PricingRequestGeneratorId FK
        uniqueidentifier ContractTemplateId 
        uniqueidentifier PropositionTemplateId 
        uniqueidentifier ProductComponentId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier CustomerId 
        bit Concealed 
    }

    "CRM.PricingRequestGeneratorRuns" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestGeneratorId FK
        datetimeoffset RunDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.PricingRequestGenerators" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        datetimeoffset Start 
        datetimeoffset End 
        bit EditMode 
        nvarchar Schedule 
        datetimeoffset NextRunTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ModelPricingRequestKeyValues" }o--|| "CRM.ModelPricingRequests" : "ModelPricingRequestId"
    "CRM.ModelPricingRequests" }o--|| "CRM.PricingRequestGenerators" : "PricingRequestGeneratorId"
    "CRM.PricingRequestGeneratorRuns" }o--|| "CRM.PricingRequestGenerators" : "PricingRequestGeneratorId"
erDiagram
    "CRM.ModelPricingRequestKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier ModelPricingRequestId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ModelPricingRequests" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier PricingRequestGeneratorId FK
        uniqueidentifier ContractTemplateId 
        uniqueidentifier PropositionTemplateId 
        uniqueidentifier ProductComponentId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier CustomerId 
        bit Concealed 
    }

    "CRM.PricingRequestGeneratorRuns" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestGeneratorId FK
        datetimeoffset RunDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.PricingRequestGenerators" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        datetimeoffset Start 
        datetimeoffset End 
        bit EditMode 
        nvarchar Schedule 
        datetimeoffset NextRunTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ModelPricingRequestKeyValues" }o--|| "CRM.ModelPricingRequests" : "ModelPricingRequestId"
    "CRM.ModelPricingRequests" }o--|| "CRM.PricingRequestGenerators" : "PricingRequestGeneratorId"
    "CRM.PricingRequestGeneratorRuns" }o--|| "CRM.PricingRequestGenerators" : "PricingRequestGeneratorId"
{
    "definitions":  {
                        "CRM.PricingRequestGeneratorRuns":  {
                                                                "properties":  {
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "RunDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "PricingRequestGeneratorId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to CRM.PricingRequestGenerators"
                                                                                                                 }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "CRM.PricingRequestGenerators":  {
                                                             "properties":  {
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "End":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                                                "Description":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Name":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                                "EditMode":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Start":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Schedule":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "NextRunTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "CRM.ModelPricingRequests":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "Description":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "ProductComponentId":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Name":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                            "PricingRequestGeneratorId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to CRM.PricingRequestGenerators"
                                                                                                          },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "CustomerId":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                            "ContractTemplateId":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "PropositionTemplateId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "CRM.ModelPricingRequestKeyValues":  {
                                                                 "properties":  {
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "Key":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Value":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "ModelPricingRequestId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to CRM.ModelPricingRequests"
                                                                                                              },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               }
                                                                                },
                                                                 "type":  "object"
                                                             }
                    },
    "title":  "CRM.PricingRequestGenerator",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Proposition Product Component Model Pricing Request

Aggregate Root: PropositionProductComponentModelPricingRequest

Represents pricing requests for proposition product components with associated brands and sales products.

erDiagram
    "CRM.ProductComponentModelPricingRequest_Brand" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentModelPricingRequestId FK
        uniqueidentifier BrandId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ProductComponentModelPricingRequest_ProductComponent" {
    }

    "CRM.ProductComponentModelPricingRequest_SalesProduct" {
    }

    "CRM.ProductComponentModelPricingRequests" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentId 
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier CustomerId FK
        uniqueidentifier ModelContractTemplateId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar InternalReference 
        bit Concealed 
        int SourceInAdvanceVolumeLimit 
    }

    "CRM.ProductComponentModelPricingRequest_Brand" }o--|| "CRM.Brands" : "BrandId"
    "CRM.ProductComponentModelPricingRequest_Brand" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.ProductComponentModelPricingRequest_CategoryLabel" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.ProductComponentModelPricingRequestKeyValues" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.ProductComponentModelPricingRequests" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.ProductComponentModelPricingRequests" }o--|| "CRM.ModelContractTemplates" : "ModelContractTemplateId"
    "CRM.ProductComponentSalesBatchItems" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.PropositionModelPricingRequest_ProductComponentModelPricingRequest" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.ProductComponentModelPricingRequest_Customer" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
erDiagram
    "CRM.ProductComponentModelPricingRequest_Brand" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentModelPricingRequestId FK
        uniqueidentifier BrandId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.ProductComponentModelPricingRequest_ProductComponent" {
    }

    "CRM.ProductComponentModelPricingRequest_SalesProduct" {
    }

    "CRM.ProductComponentModelPricingRequests" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentId 
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier CustomerId FK
        uniqueidentifier ModelContractTemplateId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar InternalReference 
        bit Concealed 
        int SourceInAdvanceVolumeLimit 
    }

    "CRM.ProductComponentModelPricingRequest_Brand" }o--|| "CRM.Brands" : "BrandId"
    "CRM.ProductComponentModelPricingRequest_Brand" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.ProductComponentModelPricingRequest_CategoryLabel" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.ProductComponentModelPricingRequestKeyValues" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.ProductComponentModelPricingRequests" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.ProductComponentModelPricingRequests" }o--|| "CRM.ModelContractTemplates" : "ModelContractTemplateId"
    "CRM.ProductComponentSalesBatchItems" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.PropositionModelPricingRequest_ProductComponentModelPricingRequest" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.ProductComponentModelPricingRequest_Customer" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
{
    "definitions":  {
                        "CRM.ProductComponentModelPricingRequest_SalesProduct":  {
                                                                                     "properties":  {

                                                                                                    },
                                                                                     "type":  "object"
                                                                                 },
                        "CRM.ProductComponentModelPricingRequest_Brand":  {
                                                                              "properties":  {
                                                                                                 "Concealed":  {
                                                                                                                   "type":  "boolean",
                                                                                                                   "description":  "bit"
                                                                                                               },
                                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                                "format":  "uuid",
                                                                                                                                "description":  "uniqueidentifier",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                 "Id":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                                                 "EntityCreatedDateTime":  {
                                                                                                                               "format":  "date-time",
                                                                                                                               "description":  "datetimeoffset",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                 "BrandId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to CRM.Brands"
                                                                                                             },
                                                                                                 "EntityUpdatedDateTime":  {
                                                                                                                               "format":  "date-time",
                                                                                                                               "description":  "datetimeoffset",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                 "ProductComponentModelPricingRequestId":  {
                                                                                                                                               "type":  "string",
                                                                                                                                               "description":  "FK to CRM.ProductComponentModelPricingRequests"
                                                                                                                                           },
                                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                                "format":  "uuid",
                                                                                                                                "description":  "uniqueidentifier",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                 "Tenant":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            }
                                                                                             },
                                                                              "type":  "object"
                                                                          },
                        "CRM.ProductComponentModelPricingRequests":  {
                                                                         "properties":  {
                                                                                            "Concealed":  {
                                                                                                              "type":  "boolean",
                                                                                                              "description":  "bit"
                                                                                                          },
                                                                                            "Description":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "nvarchar"
                                                                                                            },
                                                                                            "EntityUpdatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "ProductComponentId":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                            "EntityCreatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "ModelContractTemplateId":  {
                                                                                                                            "type":  "string",
                                                                                                                            "description":  "FK to CRM.ModelContractTemplates"
                                                                                                                        },
                                                                                            "Name":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                            "SourceInAdvanceVolumeLimit":  {
                                                                                                                               "type":  "integer",
                                                                                                                               "description":  "int"
                                                                                                                           },
                                                                                            "EntityUpdatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "CustomerId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to CRM.Customers"
                                                                                                           },
                                                                                            "Tenant":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                            "InternalReference":  {
                                                                                                                      "type":  "string",
                                                                                                                      "description":  "nvarchar"
                                                                                                                  },
                                                                                            "Id":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                            "EntityCreatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      }
                                                                                        },
                                                                         "type":  "object"
                                                                     },
                        "CRM.ProductComponentModelPricingRequest_ProductComponent":  {
                                                                                         "properties":  {

                                                                                                        },
                                                                                         "type":  "object"
                                                                                     }
                    },
    "title":  "CRM.PropositionProductComponentModelPricingRequest",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Sales Batch

Aggregate Root: SalesBatch

Represents batches of sales activities and transactions for processing and management.

erDiagram
    "CRM.SalesBatchDetails" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int PricingStage 
        bit UserOverwritableOnPricing 
    }

    "CRM.SalesBatchGeneratorDetails" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchGeneratorId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int PricingStage 
        bit UserOverwritableOnPricing 
    }

    "CRM.SalesBatchGenerators" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        int AllowedScoringType 
        bit MustEstimateSalesVolumes 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit SourceInAdvance 
        uniqueidentifier CustomerId FK
        int SalesBatchForecastType 
        uniqueidentifier ScriptId 
    }

    "CRM.SalesBatchSeries" {
        uniqueidentifier Id PK
        nvarchar Name 
        datetimeoffset Start 
        datetimeoffset End 
        nvarchar Schedule 
        datetimeoffset NextRunTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.SalesBatchSeries_SalesBatchGenerator" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchSeriesId FK
        uniqueidentifier SalesBatchGeneratorId FK
        nvarchar Schedule 
        datetimeoffset NextRunTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int OrderIndex 
    }

    "CRM.SalesBatchStrategies" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchStrategyProductComponentMPRGroupId FK
        int SourcingType 
        uniqueidentifier ProductElementId 
        decimal Percentage 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        decimal StopLossThreshold 
        int StopLossThresholdUnit 
        int FallbackStrategySourcingType 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset ProcurementEnd 
        datetimeoffset ProcurementStart 
    }

    "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchStrategyProductComponentMPRGroupId FK
        uniqueidentifier ProductComponentModelPricingRequestId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.SalesBatchStrategyProductComponentMPRGroups" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.SalesBatches" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier SalesBatchSeriesId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        datetimeoffset Timestamp 
        bit Concealed 
        bit SourceInAdvance 
        uniqueidentifier CustomerId FK
        int SalesBatchForecastType 
        uniqueidentifier ScriptId 
        bit WaitingOnScript 
        nvarchar ErrorMessage 
    }

    "CRM.SalesBatchDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.ProductComponentSalesBatchItem_SalesBatchGenerator" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.PropositionSalesBatchItem_SalesBatchGenerator" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.SalesBatchGenerator_PropositionModelPricingRequest" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.SalesBatchGenerators" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.SalesBatchSeries_SalesBatchGenerator" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.SalesBatches" }o--|| "CRM.SalesBatchSeries" : "SalesBatchSeriesId"
    "CRM.SalesBatchSeries_SalesBatchGenerator" }o--|| "CRM.SalesBatchSeries" : "SalesBatchSeriesId"
    "CRM.SalesBatchStrategies" }o--|| "CRM.SalesBatchStrategyProductComponentMPRGroups" : "SalesBatchStrategyProductComponentMPRGroupId"
    "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR" }o--|| "CRM.SalesBatchStrategyProductComponentMPRGroups" : "SalesBatchStrategyProductComponentMPRGroupId"
    "CRM.SalesBatchStrategyProductComponentMPRGroups" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.ProductComponentSalesBatchItems" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.PropositionSalesBatchItems" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.SalesBatch_TSSelector" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.SalesBatches" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.EstimatedSalesVolumes" }o--|| "CRM.SalesBatches" : "SalesBatchId"
erDiagram
    "CRM.SalesBatchDetails" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int PricingStage 
        bit UserOverwritableOnPricing 
    }

    "CRM.SalesBatchGeneratorDetails" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchGeneratorId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int PricingStage 
        bit UserOverwritableOnPricing 
    }

    "CRM.SalesBatchGenerators" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        int AllowedScoringType 
        bit MustEstimateSalesVolumes 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit SourceInAdvance 
        uniqueidentifier CustomerId FK
        int SalesBatchForecastType 
        uniqueidentifier ScriptId 
    }

    "CRM.SalesBatchSeries" {
        uniqueidentifier Id PK
        nvarchar Name 
        datetimeoffset Start 
        datetimeoffset End 
        nvarchar Schedule 
        datetimeoffset NextRunTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.SalesBatchSeries_SalesBatchGenerator" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchSeriesId FK
        uniqueidentifier SalesBatchGeneratorId FK
        nvarchar Schedule 
        datetimeoffset NextRunTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int OrderIndex 
    }

    "CRM.SalesBatchStrategies" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchStrategyProductComponentMPRGroupId FK
        int SourcingType 
        uniqueidentifier ProductElementId 
        decimal Percentage 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        decimal StopLossThreshold 
        int StopLossThresholdUnit 
        int FallbackStrategySourcingType 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset ProcurementEnd 
        datetimeoffset ProcurementStart 
    }

    "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchStrategyProductComponentMPRGroupId FK
        uniqueidentifier ProductComponentModelPricingRequestId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.SalesBatchStrategyProductComponentMPRGroups" {
        uniqueidentifier Id PK
        uniqueidentifier SalesBatchId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.SalesBatches" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier SalesBatchSeriesId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        datetimeoffset Timestamp 
        bit Concealed 
        bit SourceInAdvance 
        uniqueidentifier CustomerId FK
        int SalesBatchForecastType 
        uniqueidentifier ScriptId 
        bit WaitingOnScript 
        nvarchar ErrorMessage 
    }

    "CRM.SalesBatchDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.ProductComponentSalesBatchItem_SalesBatchGenerator" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.PropositionSalesBatchItem_SalesBatchGenerator" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.SalesBatchGenerator_PropositionModelPricingRequest" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.SalesBatchGenerators" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.SalesBatchSeries_SalesBatchGenerator" }o--|| "CRM.SalesBatchGenerators" : "SalesBatchGeneratorId"
    "CRM.SalesBatches" }o--|| "CRM.SalesBatchSeries" : "SalesBatchSeriesId"
    "CRM.SalesBatchSeries_SalesBatchGenerator" }o--|| "CRM.SalesBatchSeries" : "SalesBatchSeriesId"
    "CRM.SalesBatchStrategies" }o--|| "CRM.SalesBatchStrategyProductComponentMPRGroups" : "SalesBatchStrategyProductComponentMPRGroupId"
    "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR" }o--|| "CRM.ProductComponentModelPricingRequests" : "ProductComponentModelPricingRequestId"
    "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR" }o--|| "CRM.SalesBatchStrategyProductComponentMPRGroups" : "SalesBatchStrategyProductComponentMPRGroupId"
    "CRM.SalesBatchStrategyProductComponentMPRGroups" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.ProductComponentSalesBatchItems" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.PropositionSalesBatchItems" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.SalesBatch_TSSelector" }o--|| "CRM.SalesBatches" : "SalesBatchId"
    "CRM.SalesBatches" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.EstimatedSalesVolumes" }o--|| "CRM.SalesBatches" : "SalesBatchId"
{
    "definitions":  {
                        "CRM.SalesBatchStrategyProductComponentMPRGroup_ProductComponentMPR":  {
                                                                                                   "properties":  {
                                                                                                                      "Concealed":  {
                                                                                                                                        "type":  "boolean",
                                                                                                                                        "description":  "bit"
                                                                                                                                    },
                                                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                                                     "format":  "uuid",
                                                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                                                     "type":  "string"
                                                                                                                                                 },
                                                                                                                      "Id":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                                                     "format":  "uuid",
                                                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                                                     "type":  "string"
                                                                                                                                                 },
                                                                                                                      "EntityCreatedDateTime":  {
                                                                                                                                                    "format":  "date-time",
                                                                                                                                                    "description":  "datetimeoffset",
                                                                                                                                                    "type":  "string"
                                                                                                                                                },
                                                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                                                    "format":  "date-time",
                                                                                                                                                    "description":  "datetimeoffset",
                                                                                                                                                    "type":  "string"
                                                                                                                                                },
                                                                                                                      "ProductComponentModelPricingRequestId":  {
                                                                                                                                                                    "type":  "string",
                                                                                                                                                                    "description":  "FK to CRM.ProductComponentModelPricingRequests"
                                                                                                                                                                },
                                                                                                                      "SalesBatchStrategyProductComponentMPRGroupId":  {
                                                                                                                                                                           "type":  "string",
                                                                                                                                                                           "description":  "FK to CRM.SalesBatchStrategyProductComponentMPRGroups"
                                                                                                                                                                       },
                                                                                                                      "Tenant":  {
                                                                                                                                     "format":  "uuid",
                                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                                     "type":  "string"
                                                                                                                                 }
                                                                                                                  },
                                                                                                   "type":  "object"
                                                                                               },
                        "CRM.SalesBatchSeries":  {
                                                     "properties":  {
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "Start":  {
                                                                                      "format":  "date-time",
                                                                                      "description":  "datetimeoffset",
                                                                                      "type":  "string"
                                                                                  },
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "Schedule":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "Name":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "NextRunTime":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "End":  {
                                                                                    "format":  "date-time",
                                                                                    "description":  "datetimeoffset",
                                                                                    "type":  "string"
                                                                                }
                                                                    },
                                                     "type":  "object"
                                                 },
                        "CRM.SalesBatchGeneratorDetails":  {
                                                               "properties":  {
                                                                                  "PricingStage":  {
                                                                                                       "type":  "integer",
                                                                                                       "description":  "int"
                                                                                                   },
                                                                                  "Id":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "Concealed":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                                  "Value":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "UserOverwritableOnPricing":  {
                                                                                                                    "type":  "boolean",
                                                                                                                    "description":  "bit"
                                                                                                                },
                                                                                  "SalesBatchGeneratorId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to CRM.SalesBatchGenerators"
                                                                                                            },
                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "Tenant":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                  "Key":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                                  "EntityCreatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "FormatType":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 },
                                                                                  "CustomEnumId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to PM.CustomEnums"
                                                                                                   }
                                                                              },
                                                               "type":  "object"
                                                           },
                        "CRM.SalesBatchDetails":  {
                                                      "properties":  {
                                                                         "PricingStage":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "Value":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "UserOverwritableOnPricing":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                         "SalesBatchId":  {
                                                                                              "type":  "string",
                                                                                              "description":  "FK to CRM.SalesBatches"
                                                                                          },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                         "Key":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "FormatType":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                         "CustomEnumId":  {
                                                                                              "type":  "string",
                                                                                              "description":  "FK to PM.CustomEnums"
                                                                                          }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "CRM.SalesBatches":  {
                                                 "properties":  {
                                                                    "ScriptId":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                    "Id":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                    "EntityUpdatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Concealed":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "EntityCreatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "CustomerId":  {
                                                                                       "type":  "string",
                                                                                       "description":  "FK to CRM.Customers"
                                                                                   },
                                                                    "EntityUpdatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "ErrorMessage":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                    "ExternalReference":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                    "Tenant":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                    "InternalReference":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                    "SalesBatchSeriesId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to CRM.SalesBatchSeries"
                                                                                           },
                                                                    "WaitingOnScript":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                    "SourceInAdvance":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                    "EntityCreatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "SalesBatchForecastType":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                    "Timestamp":  {
                                                                                      "format":  "date-time",
                                                                                      "description":  "datetimeoffset",
                                                                                      "type":  "string"
                                                                                  }
                                                                },
                                                 "type":  "object"
                                             },
                        "CRM.SalesBatchGenerators":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "ScriptId":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                            "Description":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Name":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "CustomerId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to CRM.Customers"
                                                                                           },
                                                                            "AllowedScoringType":  {
                                                                                                       "type":  "integer",
                                                                                                       "description":  "int"
                                                                                                   },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                            "SourceInAdvance":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "SalesBatchForecastType":  {
                                                                                                           "type":  "integer",
                                                                                                           "description":  "int"
                                                                                                       },
                                                                            "MustEstimateSalesVolumes":  {
                                                                                                             "type":  "boolean",
                                                                                                             "description":  "bit"
                                                                                                         }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "CRM.SalesBatchStrategies":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "SourcingType":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "FallbackStrategySourcingType":  {
                                                                                                                 "type":  "integer",
                                                                                                                 "description":  "int"
                                                                                                             },
                                                                            "ProcurementEnd":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "ProcurementPeriodInMonths":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                            "EndDate":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                                            "Percentage":  {
                                                                                               "type":  "string",
                                                                                               "description":  "decimal"
                                                                                           },
                                                                            "ProcurementStart":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "ProcurementOffsetPeriodInMonths":  {
                                                                                                                    "type":  "integer",
                                                                                                                    "description":  "int"
                                                                                                                },
                                                                            "SalesBatchStrategyProductComponentMPRGroupId":  {
                                                                                                                                 "type":  "string",
                                                                                                                                 "description":  "FK to CRM.SalesBatchStrategyProductComponentMPRGroups"
                                                                                                                             },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                            "StopLossThresholdUnit":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                            "ProcurementDeliveryPeriodInMonths":  {
                                                                                                                      "type":  "integer",
                                                                                                                      "description":  "int"
                                                                                                                  },
                                                                            "ProductElementId":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                            "StartDate":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                            "StopLossThreshold":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "decimal"
                                                                                                  }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "CRM.SalesBatchSeries_SalesBatchGenerator":  {
                                                                         "properties":  {
                                                                                            "Id":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                            "EntityUpdatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Concealed":  {
                                                                                                              "type":  "boolean",
                                                                                                              "description":  "bit"
                                                                                                          },
                                                                                            "EntityCreatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Schedule":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                                            "SalesBatchGeneratorId":  {
                                                                                                                          "type":  "string",
                                                                                                                          "description":  "FK to CRM.SalesBatchGenerators"
                                                                                                                      },
                                                                                            "EntityUpdatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "OrderIndex":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                            "Tenant":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                            "NextRunTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                            "SalesBatchSeriesId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to CRM.SalesBatchSeries"
                                                                                                                   },
                                                                                            "EntityCreatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      }
                                                                                        },
                                                                         "type":  "object"
                                                                     },
                        "CRM.SalesBatchStrategyProductComponentMPRGroups":  {
                                                                                "properties":  {
                                                                                                   "Concealed":  {
                                                                                                                     "type":  "boolean",
                                                                                                                     "description":  "bit"
                                                                                                                 },
                                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                                  "format":  "uuid",
                                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                                  "type":  "string"
                                                                                                                              },
                                                                                                   "Id":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                                   "EntityCreatedDateTime":  {
                                                                                                                                 "format":  "date-time",
                                                                                                                                 "description":  "datetimeoffset",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                                 "format":  "date-time",
                                                                                                                                 "description":  "datetimeoffset",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                   "SalesBatchId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to CRM.SalesBatches"
                                                                                                                    },
                                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                                  "format":  "uuid",
                                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                                  "type":  "string"
                                                                                                                              },
                                                                                                   "Tenant":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              }
                                                                                               },
                                                                                "type":  "object"
                                                                            }
                    },
    "title":  "CRM.SalesBatch",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Sales Channel

Aggregate Root: SalesChannel

Represents different channels through which sales are conducted and managed.

erDiagram
    "CRM.SalesChannels" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }
erDiagram
    "CRM.SalesChannels" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }
{
    "definitions":  {
                        "CRM.SalesChannels":  {
                                                  "properties":  {
                                                                     "Concealed":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "bit"
                                                                                   },
                                                                     "EntityUpdatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Id":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                     "EntityCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "EntityUpdatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "EntityCreatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Tenant":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                }
                                                                 },
                                                  "type":  "object"
                                              }
                    },
    "title":  "CRM.SalesChannel",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

SBI

Aggregate Root: SBI

Represents SBI (Standard Business Identifier) entities for business classification and identification.

erDiagram
    "CRM.SBIs" {
        uniqueidentifier Id PK
        nvarchar Code 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customer_SBI" }o--|| "CRM.SBIs" : "SBIId"
erDiagram
    "CRM.SBIs" {
        uniqueidentifier Id PK
        nvarchar Code 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Customer_SBI" }o--|| "CRM.SBIs" : "SBIId"
{
    "definitions":  {
                        "CRM.SBIs":  {
                                         "properties":  {
                                                            "Concealed":  {
                                                                              "type":  "boolean",
                                                                              "description":  "bit"
                                                                          },
                                                            "EntityUpdatedAuthToken":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                            "Id":  {
                                                                       "format":  "uuid",
                                                                       "description":  "uniqueidentifier",
                                                                       "type":  "string"
                                                                   },
                                                            "Description":  {
                                                                                "type":  "string",
                                                                                "description":  "nvarchar"
                                                                            },
                                                            "EntityCreatedDateTime":  {
                                                                                          "format":  "date-time",
                                                                                          "description":  "datetimeoffset",
                                                                                          "type":  "string"
                                                                                      },
                                                            "EntityUpdatedDateTime":  {
                                                                                          "format":  "date-time",
                                                                                          "description":  "datetimeoffset",
                                                                                          "type":  "string"
                                                                                      },
                                                            "Code":  {
                                                                         "type":  "string",
                                                                         "description":  "nvarchar"
                                                                     },
                                                            "EntityCreatedAuthToken":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                            "Tenant":  {
                                                                           "format":  "uuid",
                                                                           "description":  "uniqueidentifier",
                                                                           "type":  "string"
                                                                       }
                                                        },
                                         "type":  "object"
                                     }
                    },
    "title":  "CRM.SBI",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Site

Aggregate Root: Site

Represents physical sites with their associated metering points and installations.

erDiagram
    "CRM.Site_MeteringPoint" {
        uniqueidentifier Id PK
        uniqueidentifier SiteId FK
        uniqueidentifier MeteringPointId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Sites" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier CustomerId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Installations" }o--|| "CRM.Site_MeteringPoint" : "SiteMeteringPointId"
    "CRM.Site_MeteringPoint" }o--|| "CRM.Sites" : "SiteId"
    "CRM.Site_MeteringPoint_TimeSeries" }o--|| "CRM.Site_MeteringPoint" : "SiteMeteringPointId"
    "CRM.Installations" }o--|| "CRM.Sites" : "SiteId"
    "CRM.Site_TimeSeries" }o--|| "CRM.Sites" : "SiteId"
    "CRM.Sites" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.ContractVersion_Site" }o--|| "CRM.Sites" : "SiteId"
erDiagram
    "CRM.Site_MeteringPoint" {
        uniqueidentifier Id PK
        uniqueidentifier SiteId FK
        uniqueidentifier MeteringPointId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Sites" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier CustomerId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.Installations" }o--|| "CRM.Site_MeteringPoint" : "SiteMeteringPointId"
    "CRM.Site_MeteringPoint" }o--|| "CRM.Sites" : "SiteId"
    "CRM.Site_MeteringPoint_TimeSeries" }o--|| "CRM.Site_MeteringPoint" : "SiteMeteringPointId"
    "CRM.Installations" }o--|| "CRM.Sites" : "SiteId"
    "CRM.Site_TimeSeries" }o--|| "CRM.Sites" : "SiteId"
    "CRM.Sites" }o--|| "CRM.Customers" : "CustomerId"
    "CRM.ContractVersion_Site" }o--|| "CRM.Sites" : "SiteId"
{
    "definitions":  {
                        "CRM.Site_MeteringPoint":  {
                                                       "properties":  {
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "SiteId":  {
                                                                                         "type":  "string",
                                                                                         "description":  "FK to CRM.Sites"
                                                                                     },
                                                                          "MeteringPointId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "CRM.Sites":  {
                                          "properties":  {
                                                             "Concealed":  {
                                                                               "type":  "boolean",
                                                                               "description":  "bit"
                                                                           },
                                                             "EntityUpdatedAuthToken":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                             "Id":  {
                                                                        "format":  "uuid",
                                                                        "description":  "uniqueidentifier",
                                                                        "type":  "string"
                                                                    },
                                                             "CustomerId":  {
                                                                                "type":  "string",
                                                                                "description":  "FK to CRM.Customers"
                                                                            },
                                                             "EntityCreatedDateTime":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                             "Name":  {
                                                                          "type":  "string",
                                                                          "description":  "nvarchar"
                                                                      },
                                                             "EntityUpdatedDateTime":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                             "EntityCreatedAuthToken":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                             "Tenant":  {
                                                                            "format":  "uuid",
                                                                            "description":  "uniqueidentifier",
                                                                            "type":  "string"
                                                                        }
                                                         },
                                          "type":  "object"
                                      }
                    },
    "title":  "CRM.Site",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Custom Enum

Aggregate Root: CustomEnum

Represents custom enumerations with components, values, and key values for flexible data classification.

erDiagram
    "CRM.CustomEnumComponentValueKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentValueId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.CustomEnumComponentValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentId FK
        nvarchar Value 
        nvarchar ScriptValue 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.CustomEnumComponents" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumId FK
        nvarchar Name 
        nvarchar ExternalReference 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.CustomEnums" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
erDiagram
    "CRM.CustomEnumComponentValueKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentValueId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.CustomEnumComponentValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentId FK
        nvarchar Value 
        nvarchar ScriptValue 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.CustomEnumComponents" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumId FK
        nvarchar Name 
        nvarchar ExternalReference 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "CRM.CustomEnums" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.ModelContractTemplateDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.SalesBatchGeneratorDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.ContractTemplateDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
{
    "definitions":  {
                        "CRM.CustomEnumComponents":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Name":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "EndDate":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                            "ExternalReference":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "StartDate":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                            "CustomEnumId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to PM.CustomEnums"
                                                                                             }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "CRM.CustomEnumComponentValues":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "CustomEnumComponentId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to PM.CustomEnumComponents"
                                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "ScriptValue":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                 "Value":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                 "StartDate":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "CRM.CustomEnums":  {
                                                "properties":  {
                                                                   "Concealed":  {
                                                                                     "type":  "boolean",
                                                                                     "description":  "bit"
                                                                                 },
                                                                   "EntityUpdatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Id":  {
                                                                              "format":  "uuid",
                                                                              "description":  "uniqueidentifier",
                                                                              "type":  "string"
                                                                          },
                                                                   "Description":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                   "EntityCreatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "Name":  {
                                                                                "type":  "string",
                                                                                "description":  "nvarchar"
                                                                            },
                                                                   "EntityUpdatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "EntityCreatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Tenant":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              }
                                                               },
                                                "type":  "object"
                                            },
                        "CRM.CustomEnumComponentValueKeyValues":  {
                                                                      "properties":  {
                                                                                         "Concealed":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Id":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                         "Key":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                         "CustomEnumComponentValueId":  {
                                                                                                                            "type":  "string",
                                                                                                                            "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                        },
                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Value":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "EntityCreatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "Tenant":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    }
                                                                                     },
                                                                      "type":  "object"
                                                                  }
                    },
    "title":  "CRM.CustomEnum",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

2 - Pricing module

The Pricing module in Vertex

This is a description of the Pricing module

2.1 - Pricing Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Common Product Element

Aggregate Root: CommonProductElement

Represents common product elements with versions, rules, and custom enums for pricing calculations.

erDiagram
    "Pricing.CommonProductElementVersionCustomEnums" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementVersionId FK
        uniqueidentifier CustomEnumId 
        bit IsNullable 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CommonProductElementVersionKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "Pricing.CommonProductElementVersionRules" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementVersionId FK
        int RuleType 
        int Unit 
        int FeeType 
        bit Editable 
        bit Required 
        int PricingStage 
        bit ExternallyAvailable 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Rule 
    }

    "Pricing.CommonProductElementVersion_Script" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementVersionId FK
        uniqueidentifier ScriptId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CommonProductElementVersions" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementId FK
        datetimeoffset StartDate 
        int VersionNumber 
        nvarchar Comment 
        bit ResultsCanBeCopiedFromSourcePricing 
        int DeliveryPeriodDivisionType 
        bit DealsAreLeading 
        uniqueidentifier SourcingProductElementId 
        int Precision 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset PeriodDivisionDate 
        uniqueidentifier PriceForwardCurveGroupId 
        int PricingResultType 
    }

    "Pricing.CommonProductElements" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        nvarchar InternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CommonProductElementVersionCustomEnums" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.CommonProductElementVersionKeyValues" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.CommonProductElementVersionRules" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.CommonProductElementVersion_Script" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.ProductElements" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.CommonProductElementVersions" }o--|| "Pricing.CommonProductElements" : "CommonProductElementId"
erDiagram
    "Pricing.CommonProductElementVersionCustomEnums" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementVersionId FK
        uniqueidentifier CustomEnumId 
        bit IsNullable 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CommonProductElementVersionKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "Pricing.CommonProductElementVersionRules" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementVersionId FK
        int RuleType 
        int Unit 
        int FeeType 
        bit Editable 
        bit Required 
        int PricingStage 
        bit ExternallyAvailable 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Rule 
    }

    "Pricing.CommonProductElementVersion_Script" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementVersionId FK
        uniqueidentifier ScriptId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CommonProductElementVersions" {
        uniqueidentifier Id PK
        uniqueidentifier CommonProductElementId FK
        datetimeoffset StartDate 
        int VersionNumber 
        nvarchar Comment 
        bit ResultsCanBeCopiedFromSourcePricing 
        int DeliveryPeriodDivisionType 
        bit DealsAreLeading 
        uniqueidentifier SourcingProductElementId 
        int Precision 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset PeriodDivisionDate 
        uniqueidentifier PriceForwardCurveGroupId 
        int PricingResultType 
    }

    "Pricing.CommonProductElements" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        nvarchar InternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CommonProductElementVersionCustomEnums" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.CommonProductElementVersionKeyValues" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.CommonProductElementVersionRules" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.CommonProductElementVersion_Script" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.ProductElements" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.CommonProductElementVersions" }o--|| "Pricing.CommonProductElements" : "CommonProductElementId"
{
    "definitions":  {
                        "Pricing.CommonProductElementVersionCustomEnums":  {
                                                                               "properties":  {
                                                                                                  "CustomEnumId":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                  "CommonProductElementVersionId":  {
                                                                                                                                        "type":  "string",
                                                                                                                                        "description":  "FK to Pricing.CommonProductElementVersions"
                                                                                                                                    },
                                                                                                  "Id":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                                  "IsNullable":  {
                                                                                                                     "type":  "boolean",
                                                                                                                     "description":  "bit"
                                                                                                                 },
                                                                                                  "Concealed":  {
                                                                                                                    "type":  "boolean",
                                                                                                                    "description":  "bit"
                                                                                                                },
                                                                                                  "EntityCreatedDateTime":  {
                                                                                                                                "format":  "date-time",
                                                                                                                                "description":  "datetimeoffset",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                                "format":  "date-time",
                                                                                                                                "description":  "datetimeoffset",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                  "Tenant":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             }
                                                                                              },
                                                                               "type":  "object"
                                                                           },
                        "Pricing.CommonProductElementVersionRules":  {
                                                                         "properties":  {
                                                                                            "PricingStage":  {
                                                                                                                 "type":  "integer",
                                                                                                                 "description":  "int"
                                                                                                             },
                                                                                            "Required":  {
                                                                                                             "type":  "boolean",
                                                                                                             "description":  "bit"
                                                                                                         },
                                                                                            "FeeType":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                                            "EntityUpdatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Concealed":  {
                                                                                                              "type":  "boolean",
                                                                                                              "description":  "bit"
                                                                                                          },
                                                                                            "RuleType":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                            "CommonProductElementVersionId":  {
                                                                                                                                  "type":  "string",
                                                                                                                                  "description":  "FK to Pricing.CommonProductElementVersions"
                                                                                                                              },
                                                                                            "ExternallyAvailable":  {
                                                                                                                        "type":  "boolean",
                                                                                                                        "description":  "bit"
                                                                                                                    },
                                                                                            "EntityUpdatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "Rule":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                            "Tenant":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                            "Id":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                            "Unit":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                            "EntityCreatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "EntityCreatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Editable":  {
                                                                                                             "type":  "boolean",
                                                                                                             "description":  "bit"
                                                                                                         }
                                                                                        },
                                                                         "type":  "object"
                                                                     },
                        "Pricing.CommonProductElements":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "Description":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Name":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                                 "InternalReference":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "nvarchar"
                                                                                                       },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "Pricing.CommonProductElementVersion_Script":  {
                                                                           "properties":  {
                                                                                              "Concealed":  {
                                                                                                                "type":  "boolean",
                                                                                                                "description":  "bit"
                                                                                                            },
                                                                                              "EntityUpdatedAuthToken":  {
                                                                                                                             "format":  "uuid",
                                                                                                                             "description":  "uniqueidentifier",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                              "CommonProductElementVersionId":  {
                                                                                                                                    "type":  "string",
                                                                                                                                    "description":  "FK to Pricing.CommonProductElementVersions"
                                                                                                                                },
                                                                                              "Id":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                              "ScriptId":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                              "EntityCreatedDateTime":  {
                                                                                                                            "format":  "date-time",
                                                                                                                            "description":  "datetimeoffset",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                              "EntityUpdatedDateTime":  {
                                                                                                                            "format":  "date-time",
                                                                                                                            "description":  "datetimeoffset",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                              "EntityCreatedAuthToken":  {
                                                                                                                             "format":  "uuid",
                                                                                                                             "description":  "uniqueidentifier",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                              "Tenant":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         }
                                                                                          },
                                                                           "type":  "object"
                                                                       },
                        "Pricing.CommonProductElementVersions":  {
                                                                     "properties":  {
                                                                                        "Precision":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                        "PriceForwardCurveGroupId":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "DealsAreLeading":  {
                                                                                                                "type":  "boolean",
                                                                                                                "description":  "bit"
                                                                                                            },
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "DeliveryPeriodDivisionType":  {
                                                                                                                           "type":  "integer",
                                                                                                                           "description":  "int"
                                                                                                                       },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "PricingResultType":  {
                                                                                                                  "type":  "integer",
                                                                                                                  "description":  "int"
                                                                                                              },
                                                                                        "SourcingProductElementId":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "Comment":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "ResultsCanBeCopiedFromSourcePricing":  {
                                                                                                                                    "type":  "boolean",
                                                                                                                                    "description":  "bit"
                                                                                                                                },
                                                                                        "VersionNumber":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                                        "CommonProductElementId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to Pricing.CommonProductElements"
                                                                                                                   },
                                                                                        "StartDate":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "PeriodDivisionDate":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "Pricing.CommonProductElementVersionKeyValues":  {
                                                                             "properties":  {
                                                                                                "Concealed":  {
                                                                                                                  "type":  "boolean",
                                                                                                                  "description":  "bit"
                                                                                                              },
                                                                                                "EntityUpdatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "CommonProductElementVersionId":  {
                                                                                                                                      "type":  "string",
                                                                                                                                      "description":  "FK to Pricing.CommonProductElementVersions"
                                                                                                                                  },
                                                                                                "Value":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "nvarchar"
                                                                                                          },
                                                                                                "Id":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                                "Key":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                                "EntityCreatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "EntityUpdatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "EntityCreatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "Tenant":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           }
                                                                                            },
                                                                             "type":  "object"
                                                                         }
                    },
    "title":  "Pricing.CommonProductElement",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Pricing

Aggregate Root: Pricing

Represents the main pricing entity with all associated details, results, agreements, and delivery periods for comprehensive pricing management.

erDiagram
    "Pricing.FixationQuoteDetails" {
        uniqueidentifier Id PK
        uniqueidentifier FixationQuoteId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "Pricing.FixationQuotes" {
        uniqueidentifier Id PK
        uniqueidentifier PricingAgreementId FK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        bit Indicative 
        datetimeoffset ReceivedTimestamp 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier FixationRequestId 
        decimal Capacity 
        int CapacityUnit 
        int LoadType 
        decimal Percentage 
        uniqueidentifier PriceForwardCurveGroupId 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        int PriceReferenceMoment 
        decimal TargetPercentage 
        int TradeDirection 
        decimal Volume 
        int VolumeUnit 
    }

    "Pricing.FixationSubQuoteDetails" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubQuoteId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "Pricing.FixationSubQuotes" {
        uniqueidentifier Id PK
        uniqueidentifier FixationQuoteId FK
        decimal Volume 
        int VolumeUnit 
        decimal Capacity 
        int CapacityUnit 
        decimal Percentage 
        decimal TargetPercentage 
        uniqueidentifier PriceForwardCurveGroupId 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        int TradeDirection 
        int LoadType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ManualPricingValueMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier ManualPricingValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int Key 
        nvarchar Value 
        int Format 
        bit FromFeeRule 
        bit IsPricingOption 
        uniqueidentifier CustomEnumId FK
    }

    "Pricing.ManualPricingValues" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier SourcingAgreementId FK
        decimal Fee 
        int Precision 
        int Unit 
        bit IsSubResult 
        int SourceType 
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        uniqueidentifier SourcePricingResultId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementDetailMetadatas" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingAgreementDetailId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementMeteringPointDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingAgreementMeteringPointId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementMeteringPoints" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementOptions" {
        uniqueidentifier Id PK
        decimal Percentage 
        uniqueidentifier CustomEnumComponentId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementPricingResultTotals" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingAgreementId FK
        decimal Fee 
        int Unit 
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsIncomplete 
        int Precision 
    }

    "Pricing.PricingAgreementStrategies" {
        uniqueidentifier Id PK
        uniqueidentifier PricingAgreementId FK
        int SourcingType 
        uniqueidentifier ProductElementId FK
        decimal Percentage 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        decimal StopLossThreshold 
        int StopLossThresholdUnit 
        int FallbackStrategySourcingType 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset ProcurementEnd 
        datetimeoffset ProcurementStart 
    }

    "Pricing.PricingAgreements" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        datetimeoffset Scored 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        nvarchar Comment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier BrandId 
        bit Concealed 
        uniqueidentifier PropositionTemplateVersionId FK
    }

    "Pricing.PricingCosts" {
        uniqueidentifier Id PK
        uniqueidentifier PricingDeliveryPeriodCostTrackerId FK
        decimal Fee 
        int Unit 
        uniqueidentifier ProductElementId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier DirectionCustomEnumComponentValueId 
        bit Concealed 
    }

    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" {
        uniqueidentifier Id PK
        uniqueidentifier PricingDeliveryPeriodCostTrackerId FK
        nvarchar Reason 
        uniqueidentifier ProductElementId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingDeliveryPeriodCostTrackers" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier PricingAgreementId FK
        int Status 
        int PricingStage 
        datetimeoffset NextRecheckDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier SourcingAgreementId FK
    }

    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" {
        uniqueidentifier Id PK
        uniqueidentifier PricingDeliveryPeriodResultTrackerId FK
        nvarchar Reason 
        uniqueidentifier ProductElementId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ScriptVersionId 
        datetimeoffset RevisitDate 
        bit Concealed 
    }

    "Pricing.PricingDeliveryPeriodResultTrackers" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier PricingDeliveryPeriodId FK
        int Status 
        int PricingStage 
        datetimeoffset NextRecheckDate 
        uniqueidentifier LastPricingRunId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier SourcingAgreementId FK
    }

    "Pricing.PricingDeliveryPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        nvarchar Description 
        int DeliveryPeriodDivisionType 
        datetimeoffset Start 
        datetimeoffset End 
        bit IsPartial 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset PeriodDivisionDate 
    }

    "Pricing.PricingDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit UserOverwritable 
        int PricingStage 
    }

    "Pricing.PricingGenerationTriggers" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier PricingRequestId FK
        int TriggerType 
        nvarchar TriggerConfiguration 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingProvidedValueMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier PricingProvidedValueId FK
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingProvidedValues" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingValueProviderTypeImplementationId 
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingResultMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier PricingResultId FK
        int Key 
        nvarchar Value 
        int Format 
        bit FromFeeRule 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit IsPricingOption 
        bit Concealed 
    }

    "Pricing.PricingResultTotals" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        decimal Fee 
        int Unit 
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsIncomplete 
        int Precision 
    }

    "Pricing.PricingResults" {
        uniqueidentifier Id PK
        decimal Fee 
        int Unit 
        bit IsEditable 
        bit IsRequired 
        int PricingStage 
        int SourceType 
        uniqueidentifier PricingRunId FK
        uniqueidentifier ParentProductElementRuleId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier SourcePricingResultId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        bit IsSubResult 
        bit Concealed 
        uniqueidentifier MigratedFromPricingResultId FK
        bit IsIncomplete 
        decimal CompletionPercentage 
        int Precision 
        uniqueidentifier PriceForwardCurveId 
        int PricingResultType 
    }

    "Pricing.PricingRuns" {
        uniqueidentifier Id PK
        datetimeoffset Timestamp 
        datetimeoffset ValidFrom 
        datetimeoffset ValidUntil 
        uniqueidentifier PricingId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar SourcePricingInternalReference 
        bit Concealed 
        uniqueidentifier SourcingAgreementId FK
        int PricingRunType 
    }

    "Pricing.PricingStatus" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        int StatusType 
        nvarchar Reason 
        datetimeoffset Timestamp 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingValueProviderKeyValues" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PricingValueProviderStateId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingValueProviderStates" {
        uniqueidentifier Id PK
        uniqueidentifier PricingValueProviderTypeImplementationId 
        int State 
        nvarchar StatusMessage 
        bit AllowPricingActivation 
        datetimeoffset ContinuationDateTimeOffset 
        uniqueidentifier PricingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int StatusType 
    }

    "Pricing.PricingVolumeGroupDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingVolumeGroupId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingVolumeGroups" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier PricingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapShotTimestamp 
        nvarchar TimeSeriesCode 
    }

    "Pricing.Pricing_BrandRelation" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier BrandId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.Pricing_ProductComponentRelation" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ProductComponentModelPricingRequestId 
        bit Concealed 
    }

    "Pricing.Pricings" {
        uniqueidentifier Id PK
        datetimeoffset IssueOn 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        nvarchar ReuseIdentifier 
        bit AllowMultipleAgreements 
        uniqueidentifier PricingRequestId FK
        uniqueidentifier PropositionTemplateVersionId FK
        uniqueidentifier ProductComponentVersionId FK
        uniqueidentifier CorrespondenceId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar SourcePricingInternalReference 
        uniqueidentifier SalesBatchId 
        uniqueidentifier SalesBatchItemId 
        uniqueidentifier ModelPricingRequestId 
        datetimeoffset ContractStartDate 
        datetimeoffset ContractEndDate 
        datetimeoffset PublicationDate 
        bit SourceInAdvance 
        datetimeoffset ScoringValidUntil 
        uniqueidentifier OptionPhaseDetailSetId 
        bit Concealed 
        datetimeoffset ValidFromOverride 
        datetimeoffset ValidUntilOverride 
    }

    "Pricing.SourcingAgreementDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier SourcingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SourcingAgreementPricingResultTotals" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier SourcingAgreementId FK
        decimal Fee 
        int Unit 
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsIncomplete 
        int Precision 
    }

    "Pricing.SourcingAgreementVolumeGroupDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier SourcingAgreementVolumeGroupId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SourcingAgreementVolumeGroups" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier SourcingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SourcingAgreement_ProductComponent" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingAgreementId FK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SourcingAgreements" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        datetimeoffset DateSourced 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        nvarchar Comment 
        datetimeoffset PositionClosingDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier PropositionTemplateVersionId FK
    }

    "Pricing.FixationQuoteDetails" }o--|| "Pricing.FixationQuotes" : "FixationQuoteId"
    "Pricing.FixationQuotes" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.FixationSubQuotes" }o--|| "Pricing.FixationQuotes" : "FixationQuoteId"
    "Pricing.FixationSubQuoteDetails" }o--|| "Pricing.FixationSubQuotes" : "FixationSubQuoteId"
    "Pricing.FixationSubQuotePeriods" }o--|| "Pricing.FixationSubQuotes" : "FixationSubQuoteId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "Pricing.ManualPricingValues" : "ManualPricingValueId"
    "Pricing.ManualPricingValues" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.PricingResults" : "SourcePricingResultId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "Pricing.PricingAgreementDetails" : "PricingAgreementDetailId"
    "Pricing.PricingAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "Pricing.PricingAgreementMeteringPoints" : "PricingAgreementMeteringPointId"
    "Pricing.PricingAgreementMeteringPoints" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementOptions" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingAgreementStrategies" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementStrategies" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingRuns" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreements" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingAgreements" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PricingDeliveryPeriodCostTrackers" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingCosts" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "Pricing.PricingDeliveryPeriodCostTrackers" : "PricingDeliveryPeriodCostTrackerId"
    "Pricing.PricingCosts" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingCosts" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingCosts" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.PricingDeliveryPeriodCostTrackers" : "PricingDeliveryPeriodCostTrackerId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodCostTrackers" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingDeliveryPeriodCostTrackers" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingDeliveryPeriodCostTrackers" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.PricingDeliveryPeriodResultTrackers" : "PricingDeliveryPeriodResultTrackerId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.PricingRuns" : "LastPricingRunId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.PricingDeliveryPeriods" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingResults" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingGenerationTriggers" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingGenerationTriggers" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "Pricing.PricingProvidedValues" : "PricingProvidedValueId"
    "Pricing.PricingProvidedValues" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingResultMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "Pricing.PricingResults" : "PricingResultId"
    "Pricing.PricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingResults" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.PricingResults" : "MigratedFromPricingResultId"
    "Pricing.PricingResults" }o--|| "Pricing.PricingResults" : "SourcePricingResultId"
    "Pricing.PricingResults" }o--|| "Pricing.PricingRuns" : "PricingRunId"
    "Pricing.PricingResults" }o--|| "Pricing.ProductElementRules" : "ParentProductElementRuleId"
    "Pricing.PricingResults" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingResults" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingRuns" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingRuns" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.PricingStatus" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingValueProviderKeyValues" }o--|| "Pricing.PricingValueProviderStates" : "PricingValueProviderStateId"
    "Pricing.PricingValueProviderStates" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "Pricing.PricingVolumeGroups" : "PricingVolumeGroupId"
    "Pricing.PricingVolumeGroups" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.Pricing_BrandRelation" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.Pricing_ProductComponentRelation" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.Pricing_ProductComponentRelation" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.Pricings" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.Pricings" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.Pricings" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.SourcingAgreements" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.SourcingAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "Pricing.SourcingAgreementVolumeGroups" : "SourcingAgreementVolumeGroupId"
    "Pricing.SourcingAgreementVolumeGroups" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.SourcingAgreement_ProductComponent" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.SourcingAgreement_ProductComponent" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.SourcingAgreements" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
erDiagram
    "Pricing.FixationQuoteDetails" {
        uniqueidentifier Id PK
        uniqueidentifier FixationQuoteId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "Pricing.FixationQuotes" {
        uniqueidentifier Id PK
        uniqueidentifier PricingAgreementId FK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        bit Indicative 
        datetimeoffset ReceivedTimestamp 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier FixationRequestId 
        decimal Capacity 
        int CapacityUnit 
        int LoadType 
        decimal Percentage 
        uniqueidentifier PriceForwardCurveGroupId 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        int PriceReferenceMoment 
        decimal TargetPercentage 
        int TradeDirection 
        decimal Volume 
        int VolumeUnit 
    }

    "Pricing.FixationSubQuoteDetails" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubQuoteId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "Pricing.FixationSubQuotes" {
        uniqueidentifier Id PK
        uniqueidentifier FixationQuoteId FK
        decimal Volume 
        int VolumeUnit 
        decimal Capacity 
        int CapacityUnit 
        decimal Percentage 
        decimal TargetPercentage 
        uniqueidentifier PriceForwardCurveGroupId 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        int TradeDirection 
        int LoadType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ManualPricingValueMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier ManualPricingValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int Key 
        nvarchar Value 
        int Format 
        bit FromFeeRule 
        bit IsPricingOption 
        uniqueidentifier CustomEnumId FK
    }

    "Pricing.ManualPricingValues" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier SourcingAgreementId FK
        decimal Fee 
        int Precision 
        int Unit 
        bit IsSubResult 
        int SourceType 
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        uniqueidentifier SourcePricingResultId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementDetailMetadatas" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingAgreementDetailId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementMeteringPointDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingAgreementMeteringPointId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementMeteringPoints" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementOptions" {
        uniqueidentifier Id PK
        decimal Percentage 
        uniqueidentifier CustomEnumComponentId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingAgreementPricingResultTotals" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingAgreementId FK
        decimal Fee 
        int Unit 
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsIncomplete 
        int Precision 
    }

    "Pricing.PricingAgreementStrategies" {
        uniqueidentifier Id PK
        uniqueidentifier PricingAgreementId FK
        int SourcingType 
        uniqueidentifier ProductElementId FK
        decimal Percentage 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        decimal StopLossThreshold 
        int StopLossThresholdUnit 
        int FallbackStrategySourcingType 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset ProcurementEnd 
        datetimeoffset ProcurementStart 
    }

    "Pricing.PricingAgreements" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        datetimeoffset Scored 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        nvarchar Comment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier BrandId 
        bit Concealed 
        uniqueidentifier PropositionTemplateVersionId FK
    }

    "Pricing.PricingCosts" {
        uniqueidentifier Id PK
        uniqueidentifier PricingDeliveryPeriodCostTrackerId FK
        decimal Fee 
        int Unit 
        uniqueidentifier ProductElementId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier DirectionCustomEnumComponentValueId 
        bit Concealed 
    }

    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" {
        uniqueidentifier Id PK
        uniqueidentifier PricingDeliveryPeriodCostTrackerId FK
        nvarchar Reason 
        uniqueidentifier ProductElementId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingDeliveryPeriodCostTrackers" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier PricingAgreementId FK
        int Status 
        int PricingStage 
        datetimeoffset NextRecheckDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier SourcingAgreementId FK
    }

    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" {
        uniqueidentifier Id PK
        uniqueidentifier PricingDeliveryPeriodResultTrackerId FK
        nvarchar Reason 
        uniqueidentifier ProductElementId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ScriptVersionId 
        datetimeoffset RevisitDate 
        bit Concealed 
    }

    "Pricing.PricingDeliveryPeriodResultTrackers" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier PricingDeliveryPeriodId FK
        int Status 
        int PricingStage 
        datetimeoffset NextRecheckDate 
        uniqueidentifier LastPricingRunId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier SourcingAgreementId FK
    }

    "Pricing.PricingDeliveryPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        nvarchar Description 
        int DeliveryPeriodDivisionType 
        datetimeoffset Start 
        datetimeoffset End 
        bit IsPartial 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset PeriodDivisionDate 
    }

    "Pricing.PricingDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit UserOverwritable 
        int PricingStage 
    }

    "Pricing.PricingGenerationTriggers" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier PricingRequestId FK
        int TriggerType 
        nvarchar TriggerConfiguration 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingProvidedValueMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier PricingProvidedValueId FK
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingProvidedValues" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier PricingValueProviderTypeImplementationId 
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingResultMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier PricingResultId FK
        int Key 
        nvarchar Value 
        int Format 
        bit FromFeeRule 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit IsPricingOption 
        bit Concealed 
    }

    "Pricing.PricingResultTotals" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        decimal Fee 
        int Unit 
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsIncomplete 
        int Precision 
    }

    "Pricing.PricingResults" {
        uniqueidentifier Id PK
        decimal Fee 
        int Unit 
        bit IsEditable 
        bit IsRequired 
        int PricingStage 
        int SourceType 
        uniqueidentifier PricingRunId FK
        uniqueidentifier ParentProductElementRuleId FK
        uniqueidentifier ProductElementRuleId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier SourcePricingResultId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        bit IsSubResult 
        bit Concealed 
        uniqueidentifier MigratedFromPricingResultId FK
        bit IsIncomplete 
        decimal CompletionPercentage 
        int Precision 
        uniqueidentifier PriceForwardCurveId 
        int PricingResultType 
    }

    "Pricing.PricingRuns" {
        uniqueidentifier Id PK
        datetimeoffset Timestamp 
        datetimeoffset ValidFrom 
        datetimeoffset ValidUntil 
        uniqueidentifier PricingId FK
        uniqueidentifier PricingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar SourcePricingInternalReference 
        bit Concealed 
        uniqueidentifier SourcingAgreementId FK
        int PricingRunType 
    }

    "Pricing.PricingStatus" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        int StatusType 
        nvarchar Reason 
        datetimeoffset Timestamp 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingValueProviderKeyValues" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PricingValueProviderStateId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingValueProviderStates" {
        uniqueidentifier Id PK
        uniqueidentifier PricingValueProviderTypeImplementationId 
        int State 
        nvarchar StatusMessage 
        bit AllowPricingActivation 
        datetimeoffset ContinuationDateTimeOffset 
        uniqueidentifier PricingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int StatusType 
    }

    "Pricing.PricingVolumeGroupDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingVolumeGroupId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingVolumeGroups" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier PricingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapShotTimestamp 
        nvarchar TimeSeriesCode 
    }

    "Pricing.Pricing_BrandRelation" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier BrandId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.Pricing_ProductComponentRelation" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ProductComponentModelPricingRequestId 
        bit Concealed 
    }

    "Pricing.Pricings" {
        uniqueidentifier Id PK
        datetimeoffset IssueOn 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        nvarchar ReuseIdentifier 
        bit AllowMultipleAgreements 
        uniqueidentifier PricingRequestId FK
        uniqueidentifier PropositionTemplateVersionId FK
        uniqueidentifier ProductComponentVersionId FK
        uniqueidentifier CorrespondenceId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar SourcePricingInternalReference 
        uniqueidentifier SalesBatchId 
        uniqueidentifier SalesBatchItemId 
        uniqueidentifier ModelPricingRequestId 
        datetimeoffset ContractStartDate 
        datetimeoffset ContractEndDate 
        datetimeoffset PublicationDate 
        bit SourceInAdvance 
        datetimeoffset ScoringValidUntil 
        uniqueidentifier OptionPhaseDetailSetId 
        bit Concealed 
        datetimeoffset ValidFromOverride 
        datetimeoffset ValidUntilOverride 
    }

    "Pricing.SourcingAgreementDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier SourcingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SourcingAgreementPricingResultTotals" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        uniqueidentifier SourcingAgreementId FK
        decimal Fee 
        int Unit 
        uniqueidentifier PricingDeliveryPeriodId FK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier TariffCustomEnumComponentValueId FK
        uniqueidentifier DirectionCustomEnumComponentValueId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsIncomplete 
        int Precision 
    }

    "Pricing.SourcingAgreementVolumeGroupDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier SourcingAgreementVolumeGroupId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SourcingAgreementVolumeGroups" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier SourcingAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SourcingAgreement_ProductComponent" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingAgreementId FK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SourcingAgreements" {
        uniqueidentifier Id PK
        uniqueidentifier PricingId FK
        datetimeoffset DateSourced 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        nvarchar Comment 
        datetimeoffset PositionClosingDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier PropositionTemplateVersionId FK
    }

    "Pricing.FixationQuoteDetails" }o--|| "Pricing.FixationQuotes" : "FixationQuoteId"
    "Pricing.FixationQuotes" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.FixationSubQuotes" }o--|| "Pricing.FixationQuotes" : "FixationQuoteId"
    "Pricing.FixationSubQuoteDetails" }o--|| "Pricing.FixationSubQuotes" : "FixationSubQuoteId"
    "Pricing.FixationSubQuotePeriods" }o--|| "Pricing.FixationSubQuotes" : "FixationSubQuoteId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "Pricing.ManualPricingValues" : "ManualPricingValueId"
    "Pricing.ManualPricingValues" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.PricingResults" : "SourcePricingResultId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "Pricing.PricingAgreementDetails" : "PricingAgreementDetailId"
    "Pricing.PricingAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "Pricing.PricingAgreementMeteringPoints" : "PricingAgreementMeteringPointId"
    "Pricing.PricingAgreementMeteringPoints" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementOptions" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingAgreementStrategies" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreementStrategies" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingRuns" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingAgreements" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingAgreements" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PricingDeliveryPeriodCostTrackers" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.PricingAgreements" : "PricingAgreementId"
    "Pricing.PricingCosts" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "Pricing.PricingDeliveryPeriodCostTrackers" : "PricingDeliveryPeriodCostTrackerId"
    "Pricing.PricingCosts" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingCosts" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingCosts" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.PricingDeliveryPeriodCostTrackers" : "PricingDeliveryPeriodCostTrackerId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodCostTrackers" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingDeliveryPeriodCostTrackers" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingDeliveryPeriodCostTrackers" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.PricingDeliveryPeriodResultTrackers" : "PricingDeliveryPeriodResultTrackerId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.PricingRuns" : "LastPricingRunId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingDeliveryPeriodResultTrackers" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.PricingDeliveryPeriods" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingResults" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.PricingDeliveryPeriods" : "PricingDeliveryPeriodId"
    "Pricing.PricingDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingGenerationTriggers" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingGenerationTriggers" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "Pricing.PricingProvidedValues" : "PricingProvidedValueId"
    "Pricing.PricingProvidedValues" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingResultMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "Pricing.PricingResults" : "PricingResultId"
    "Pricing.PricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingResults" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.PricingResults" : "MigratedFromPricingResultId"
    "Pricing.PricingResults" }o--|| "Pricing.PricingResults" : "SourcePricingResultId"
    "Pricing.PricingResults" }o--|| "Pricing.PricingRuns" : "PricingRunId"
    "Pricing.PricingResults" }o--|| "Pricing.ProductElementRules" : "ParentProductElementRuleId"
    "Pricing.PricingResults" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingResults" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingRuns" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingRuns" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.PricingStatus" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingValueProviderKeyValues" }o--|| "Pricing.PricingValueProviderStates" : "PricingValueProviderStateId"
    "Pricing.PricingValueProviderStates" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "Pricing.PricingVolumeGroups" : "PricingVolumeGroupId"
    "Pricing.PricingVolumeGroups" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.Pricing_BrandRelation" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.Pricing_ProductComponentRelation" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.Pricing_ProductComponentRelation" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.Pricings" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.Pricings" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.Pricings" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.SourcingAgreements" }o--|| "Pricing.Pricings" : "PricingId"
    "Pricing.SourcingAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "Pricing.SourcingAgreementVolumeGroups" : "SourcingAgreementVolumeGroupId"
    "Pricing.SourcingAgreementVolumeGroups" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.SourcingAgreement_ProductComponent" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.SourcingAgreement_ProductComponent" }o--|| "Pricing.SourcingAgreements" : "SourcingAgreementId"
    "Pricing.SourcingAgreements" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
{
    "definitions":  {
                        "Pricing.SourcingAgreement_ProductComponent":  {
                                                                           "properties":  {
                                                                                              "Concealed":  {
                                                                                                                "type":  "boolean",
                                                                                                                "description":  "bit"
                                                                                                            },
                                                                                              "EntityUpdatedAuthToken":  {
                                                                                                                             "format":  "uuid",
                                                                                                                             "description":  "uniqueidentifier",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                              "Id":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                              "SourcingAgreementId":  {
                                                                                                                          "type":  "string",
                                                                                                                          "description":  "FK to Pricing.SourcingAgreements"
                                                                                                                      },
                                                                                              "EntityCreatedDateTime":  {
                                                                                                                            "format":  "date-time",
                                                                                                                            "description":  "datetimeoffset",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                              "EntityUpdatedDateTime":  {
                                                                                                                            "format":  "date-time",
                                                                                                                            "description":  "datetimeoffset",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                              "ProductComponentId":  {
                                                                                                                         "type":  "string",
                                                                                                                         "description":  "FK to Pricing.ProductComponents"
                                                                                                                     },
                                                                                              "EntityCreatedAuthToken":  {
                                                                                                                             "format":  "uuid",
                                                                                                                             "description":  "uniqueidentifier",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                              "Tenant":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         }
                                                                                          },
                                                                           "type":  "object"
                                                                       },
                        "Pricing.PricingValueProviderKeyValues":  {
                                                                      "properties":  {
                                                                                         "Concealed":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Id":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                         "Key":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Value":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "PricingValueProviderStateId":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "FK to Pricing.PricingValueProviderStates"
                                                                                                                         },
                                                                                         "EntityCreatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "Tenant":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    }
                                                                                     },
                                                                      "type":  "object"
                                                                  },
                        "Pricing.Pricing_BrandRelation":  {
                                                              "properties":  {
                                                                                 "PricingId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to Pricing.Pricings"
                                                                                               },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "BrandId":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "Pricing.PricingAgreementStrategies":  {
                                                                   "properties":  {
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "SourcingType":  {
                                                                                                           "type":  "integer",
                                                                                                           "description":  "int"
                                                                                                       },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "FallbackStrategySourcingType":  {
                                                                                                                           "type":  "integer",
                                                                                                                           "description":  "int"
                                                                                                                       },
                                                                                      "ProcurementEnd":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "ProcurementPeriodInMonths":  {
                                                                                                                        "type":  "integer",
                                                                                                                        "description":  "int"
                                                                                                                    },
                                                                                      "EndDate":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                                      "Percentage":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "decimal"
                                                                                                     },
                                                                                      "ProcurementStart":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "PricingAgreementId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Pricing.PricingAgreements"
                                                                                                             },
                                                                                      "ProcurementOffsetPeriodInMonths":  {
                                                                                                                              "type":  "integer",
                                                                                                                              "description":  "int"
                                                                                                                          },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                      "StopLossThresholdUnit":  {
                                                                                                                    "type":  "integer",
                                                                                                                    "description":  "int"
                                                                                                                },
                                                                                      "ProcurementDeliveryPeriodInMonths":  {
                                                                                                                                "type":  "integer",
                                                                                                                                "description":  "int"
                                                                                                                            },
                                                                                      "ProductElementId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to Pricing.ProductElements"
                                                                                                           },
                                                                                      "StartDate":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                      "StopLossThreshold":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "decimal"
                                                                                                            }
                                                                                  },
                                                                   "type":  "object"
                                                               },
                        "Pricing.PricingDetails":  {
                                                       "properties":  {
                                                                          "PricingStage":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "Value":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Format":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "Key":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                          "UserOverwritable":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "PricingId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to Pricing.Pricings"
                                                                                        },
                                                                          "CustomEnumId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to PM.CustomEnums"
                                                                                           }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "Pricing.PricingDeliveryPeriods":  {
                                                               "properties":  {
                                                                                  "End":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                                  "Description":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "Concealed":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                                  "DeliveryPeriodDivisionType":  {
                                                                                                                     "type":  "integer",
                                                                                                                     "description":  "int"
                                                                                                                 },
                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "Start":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "Tenant":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                  "Id":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                                  "PeriodDivisionDate":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                  "EntityCreatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "PricingId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to Pricing.Pricings"
                                                                                                },
                                                                                  "IsPartial":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                }
                                                                              },
                                                               "type":  "object"
                                                           },
                        "Pricing.PricingAgreementMeteringPointDetails":  {
                                                                             "properties":  {
                                                                                                "Id":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                                "EntityUpdatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "Concealed":  {
                                                                                                                  "type":  "boolean",
                                                                                                                  "description":  "bit"
                                                                                                              },
                                                                                                "Value":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "nvarchar"
                                                                                                          },
                                                                                                "EntityCreatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "EndDate":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                                "Format":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                                "EntityUpdatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "PricingAgreementMeteringPointId":  {
                                                                                                                                        "type":  "string",
                                                                                                                                        "description":  "FK to Pricing.PricingAgreementMeteringPoints"
                                                                                                                                    },
                                                                                                "Tenant":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                                "Key":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                                                "EntityCreatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "StartDate":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                                "CustomEnumId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to PM.CustomEnums"
                                                                                                                 }
                                                                                            },
                                                                             "type":  "object"
                                                                         },
                        "Pricing.PricingVolumeGroupDetails":  {
                                                                  "properties":  {
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "PricingVolumeGroupId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to Pricing.PricingVolumeGroups"
                                                                                                              },
                                                                                     "Value":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Format":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "Key":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "CustomEnumId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to PM.CustomEnums"
                                                                                                      }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Pricing.PricingResults":  {
                                                       "properties":  {
                                                                          "SalesProductVersionId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to Pricing.SalesProductVersions"
                                                                                                    },
                                                                          "Unit":  {
                                                                                       "type":  "integer",
                                                                                       "description":  "int"
                                                                                   },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "MigratedFromPricingResultId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to Pricing.PricingResults"
                                                                                                          },
                                                                          "IsSubResult":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                          "Precision":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                          "SourceType":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "PriceForwardCurveId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "DirectionCustomEnumComponentValueId":  {
                                                                                                                      "type":  "string",
                                                                                                                      "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                  },
                                                                          "PricingRunId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to Pricing.PricingRuns"
                                                                                           },
                                                                          "IsIncomplete":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                          "PricingDeliveryPeriodId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to Pricing.PricingDeliveryPeriods"
                                                                                                      },
                                                                          "CompletionPercentage":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "decimal"
                                                                                                   },
                                                                          "Fee":  {
                                                                                      "type":  "string",
                                                                                      "description":  "decimal"
                                                                                  },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "IsEditable":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                          "IsRequired":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                          "TariffCustomEnumComponentValueId":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                               },
                                                                          "PricingStage":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                          "SourcePricingResultId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to Pricing.PricingResults"
                                                                                                    },
                                                                          "ProductElementRuleId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to Pricing.ProductElementRules"
                                                                                                   },
                                                                          "PricingResultType":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "ParentProductElementRuleId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to Pricing.ProductElementRules"
                                                                                                         }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "Pricing.ManualPricingValues":  {
                                                            "properties":  {
                                                                               "Precision":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                               "SourcingAgreementId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to Pricing.SourcingAgreements"
                                                                                                       },
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "SourceType":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                               "ProductElementRuleId":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "FK to Pricing.ProductElementRules"
                                                                                                        },
                                                                               "SalesProductVersionId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to Pricing.SalesProductVersions"
                                                                                                         },
                                                                               "PricingDeliveryPeriodId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to Pricing.PricingDeliveryPeriods"
                                                                                                           },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "PricingAgreementId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to Pricing.PricingAgreements"
                                                                                                      },
                                                                               "Fee":  {
                                                                                           "type":  "string",
                                                                                           "description":  "decimal"
                                                                                       },
                                                                               "IsSubResult":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                               "SourcePricingResultId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to Pricing.PricingResults"
                                                                                                         },
                                                                               "DirectionCustomEnumComponentValueId":  {
                                                                                                                           "type":  "string",
                                                                                                                           "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                       },
                                                                               "Unit":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "PricingId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to Pricing.Pricings"
                                                                                             },
                                                                               "TariffCustomEnumComponentValueId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                    }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "Pricing.PricingDeliveryPeriodResultTrackers":  {
                                                                            "properties":  {
                                                                                               "PricingStage":  {
                                                                                                                    "type":  "integer",
                                                                                                                    "description":  "int"
                                                                                                                },
                                                                                               "SourcingAgreementId":  {
                                                                                                                           "type":  "string",
                                                                                                                           "description":  "FK to Pricing.SourcingAgreements"
                                                                                                                       },
                                                                                               "Id":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                               "EntityUpdatedAuthToken":  {
                                                                                                                              "format":  "uuid",
                                                                                                                              "description":  "uniqueidentifier",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                               "Concealed":  {
                                                                                                                 "type":  "boolean",
                                                                                                                 "description":  "bit"
                                                                                                             },
                                                                                               "EntityCreatedAuthToken":  {
                                                                                                                              "format":  "uuid",
                                                                                                                              "description":  "uniqueidentifier",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                               "PricingDeliveryPeriodId":  {
                                                                                                                               "type":  "string",
                                                                                                                               "description":  "FK to Pricing.PricingDeliveryPeriods"
                                                                                                                           },
                                                                                               "EntityUpdatedDateTime":  {
                                                                                                                             "format":  "date-time",
                                                                                                                             "description":  "datetimeoffset",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                               "PricingAgreementId":  {
                                                                                                                          "type":  "string",
                                                                                                                          "description":  "FK to Pricing.PricingAgreements"
                                                                                                                      },
                                                                                               "Tenant":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                               "LastPricingRunId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to Pricing.PricingRuns"
                                                                                                                    },
                                                                                               "Status":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                                               "EntityCreatedDateTime":  {
                                                                                                                             "format":  "date-time",
                                                                                                                             "description":  "datetimeoffset",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                               "NextRecheckDate":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                               "PricingId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Pricing.Pricings"
                                                                                                             }
                                                                                           },
                                                                            "type":  "object"
                                                                        },
                        "Pricing.FixationSubQuoteDetails":  {
                                                                "properties":  {
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "Key":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                   "Value":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "FixationSubQuoteId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to Pricing.FixationSubQuotes"
                                                                                                          },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "Pricing.SourcingAgreementVolumeGroupDetails":  {
                                                                            "properties":  {
                                                                                               "Id":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                               "EntityUpdatedAuthToken":  {
                                                                                                                              "format":  "uuid",
                                                                                                                              "description":  "uniqueidentifier",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                               "Concealed":  {
                                                                                                                 "type":  "boolean",
                                                                                                                 "description":  "bit"
                                                                                                             },
                                                                                               "Value":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                                               "EntityCreatedAuthToken":  {
                                                                                                                              "format":  "uuid",
                                                                                                                              "description":  "uniqueidentifier",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                               "Format":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                                               "EntityUpdatedDateTime":  {
                                                                                                                             "format":  "date-time",
                                                                                                                             "description":  "datetimeoffset",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                               "SourcingAgreementVolumeGroupId":  {
                                                                                                                                      "type":  "string",
                                                                                                                                      "description":  "FK to Pricing.SourcingAgreementVolumeGroups"
                                                                                                                                  },
                                                                                               "Tenant":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                               "Key":  {
                                                                                                           "type":  "integer",
                                                                                                           "description":  "int"
                                                                                                       },
                                                                                               "EntityCreatedDateTime":  {
                                                                                                                             "format":  "date-time",
                                                                                                                             "description":  "datetimeoffset",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                               "CustomEnumId":  {
                                                                                                                    "type":  "string",
                                                                                                                    "description":  "FK to PM.CustomEnums"
                                                                                                                }
                                                                                           },
                                                                            "type":  "object"
                                                                        },
                        "Pricing.PricingAgreementPricingResultTotals":  {
                                                                            "properties":  {
                                                                                               "Precision":  {
                                                                                                                 "type":  "integer",
                                                                                                                 "description":  "int"
                                                                                                             },
                                                                                               "SalesProductVersionId":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "FK to Pricing.SalesProductVersions"
                                                                                                                         },
                                                                                               "Id":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                               "EntityUpdatedAuthToken":  {
                                                                                                                              "format":  "uuid",
                                                                                                                              "description":  "uniqueidentifier",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                               "Concealed":  {
                                                                                                                 "type":  "boolean",
                                                                                                                 "description":  "bit"
                                                                                                             },
                                                                                               "EntityCreatedAuthToken":  {
                                                                                                                              "format":  "uuid",
                                                                                                                              "description":  "uniqueidentifier",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                               "Fee":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "decimal"
                                                                                                       },
                                                                                               "PricingDeliveryPeriodId":  {
                                                                                                                               "type":  "string",
                                                                                                                               "description":  "FK to Pricing.PricingDeliveryPeriods"
                                                                                                                           },
                                                                                               "EntityUpdatedDateTime":  {
                                                                                                                             "format":  "date-time",
                                                                                                                             "description":  "datetimeoffset",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                               "PricingAgreementId":  {
                                                                                                                          "type":  "string",
                                                                                                                          "description":  "FK to Pricing.PricingAgreements"
                                                                                                                      },
                                                                                               "IsIncomplete":  {
                                                                                                                    "type":  "boolean",
                                                                                                                    "description":  "bit"
                                                                                                                },
                                                                                               "Tenant":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                               "DirectionCustomEnumComponentValueId":  {
                                                                                                                                           "type":  "string",
                                                                                                                                           "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                                       },
                                                                                               "Unit":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                                               "EntityCreatedDateTime":  {
                                                                                                                             "format":  "date-time",
                                                                                                                             "description":  "datetimeoffset",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                               "PricingId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Pricing.Pricings"
                                                                                                             },
                                                                                               "TariffCustomEnumComponentValueId":  {
                                                                                                                                        "type":  "string",
                                                                                                                                        "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                                    }
                                                                                           },
                                                                            "type":  "object"
                                                                        },
                        "Pricing.PricingAgreementDetails":  {
                                                                "properties":  {
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "Value":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Format":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "PricingAgreementId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to Pricing.PricingAgreements"
                                                                                                          },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                   "Key":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "CustomEnumId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to PM.CustomEnums"
                                                                                                    }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "Pricing.Pricings":  {
                                                 "properties":  {
                                                                    "OptionPhaseDetailSetId":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "EntityUpdatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "InternalReference":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                    "PricingRequestId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to Pricing.PricingRequests"
                                                                                         },
                                                                    "ModelPricingRequestId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "ContractStartDate":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                    "SalesBatchId":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                    "Tenant":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                    "ProductComponentVersionId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to Pricing.ProductComponentVersions"
                                                                                                  },
                                                                    "SourceInAdvance":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                    "EntityUpdatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "EntityCreatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "SalesBatchItemId":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                    "IssueOn":  {
                                                                                    "format":  "date-time",
                                                                                    "description":  "datetimeoffset",
                                                                                    "type":  "string"
                                                                                },
                                                                    "ValidFromOverride":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                    "ReuseIdentifier":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                    "PropositionTemplateVersionId":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "FK to Pricing.PropositionTemplateVersions"
                                                                                                     },
                                                                    "EntityCreatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Id":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                    "ExternalReference":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                    "ValidUntilOverride":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                    "AllowMultipleAgreements":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                    "ContractEndDate":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                                    "ScoringValidUntil":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                    "PublicationDate":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                                    "CorrespondenceId":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                    "Concealed":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "SourcePricingInternalReference":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "nvarchar"
                                                                                                       }
                                                                },
                                                 "type":  "object"
                                             },
                        "Pricing.PricingDeliveryPeriodCostTrackers":  {
                                                                          "properties":  {
                                                                                             "PricingStage":  {
                                                                                                                  "type":  "integer",
                                                                                                                  "description":  "int"
                                                                                                              },
                                                                                             "SourcingAgreementId":  {
                                                                                                                         "type":  "string",
                                                                                                                         "description":  "FK to Pricing.SourcingAgreements"
                                                                                                                     },
                                                                                             "Id":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                             "EntityUpdatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "Concealed":  {
                                                                                                               "type":  "boolean",
                                                                                                               "description":  "bit"
                                                                                                           },
                                                                                             "EntityCreatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "PricingDeliveryPeriodId":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "FK to Pricing.PricingDeliveryPeriods"
                                                                                                                         },
                                                                                             "EntityUpdatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "PricingAgreementId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to Pricing.PricingAgreements"
                                                                                                                    },
                                                                                             "Tenant":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                                             "Status":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                                             "EntityCreatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "NextRecheckDate":  {
                                                                                                                     "format":  "date-time",
                                                                                                                     "description":  "datetimeoffset",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                             "PricingId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to Pricing.Pricings"
                                                                                                           }
                                                                                         },
                                                                          "type":  "object"
                                                                      },
                        "Pricing.PricingAgreementMeteringPoints":  {
                                                                       "properties":  {
                                                                                          "Concealed":  {
                                                                                                            "type":  "boolean",
                                                                                                            "description":  "bit"
                                                                                                        },
                                                                                          "Id":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                          "EntityUpdatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "Name":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                          "EAN":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                          "EntityCreatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "EndDate":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                          "EntityUpdatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "PricingAgreementId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to Pricing.PricingAgreements"
                                                                                                                 },
                                                                                          "Tenant":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                          "EntityCreatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "StartDate":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        }
                                                                                      },
                                                                       "type":  "object"
                                                                   },
                        "Pricing.PricingRuns":  {
                                                    "properties":  {
                                                                       "SourcingAgreementId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to Pricing.SourcingAgreements"
                                                                                               },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "SourcePricingInternalReference":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "nvarchar"
                                                                                                          },
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "PricingRunType":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                       "ValidUntil":  {
                                                                                          "format":  "date-time",
                                                                                          "description":  "datetimeoffset",
                                                                                          "type":  "string"
                                                                                      },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "PricingAgreementId":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "FK to Pricing.PricingAgreements"
                                                                                              },
                                                                       "ValidFrom":  {
                                                                                         "format":  "date-time",
                                                                                         "description":  "datetimeoffset",
                                                                                         "type":  "string"
                                                                                     },
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "PricingId":  {
                                                                                         "type":  "string",
                                                                                         "description":  "FK to Pricing.Pricings"
                                                                                     },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Timestamp":  {
                                                                                         "format":  "date-time",
                                                                                         "description":  "datetimeoffset",
                                                                                         "type":  "string"
                                                                                     }
                                                                   },
                                                    "type":  "object"
                                                },
                        "Pricing.PricingStatus":  {
                                                      "properties":  {
                                                                         "PricingId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to Pricing.Pricings"
                                                                                       },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "StatusType":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Reason":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Timestamp":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "Pricing.PricingValueProviderStates":  {
                                                                   "properties":  {
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "ContinuationDateTimeOffset":  {
                                                                                                                         "format":  "date-time",
                                                                                                                         "description":  "datetimeoffset",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                      "StatusMessage":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "PricingValueProviderTypeImplementationId":  {
                                                                                                                                       "format":  "uuid",
                                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                                       "type":  "string"
                                                                                                                                   },
                                                                                      "StatusType":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                      "State":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "PricingId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to Pricing.Pricings"
                                                                                                    },
                                                                                      "AllowPricingActivation":  {
                                                                                                                     "type":  "boolean",
                                                                                                                     "description":  "bit"
                                                                                                                 }
                                                                                  },
                                                                   "type":  "object"
                                                               },
                        "Pricing.PricingResultMetadatas":  {
                                                               "properties":  {
                                                                                  "Id":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "Concealed":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                                  "IsPricingOption":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                  "Value":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "FromFeeRule":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                  "Format":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "EntityCreatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "Key":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                                  "Tenant":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                  "PricingResultId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to Pricing.PricingResults"
                                                                                                      },
                                                                                  "CustomEnumId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to PM.CustomEnums"
                                                                                                   }
                                                                              },
                                                               "type":  "object"
                                                           },
                        "Pricing.PricingProvidedValueMetadatas":  {
                                                                      "properties":  {
                                                                                         "Id":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Concealed":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                                         "PricingProvidedValueId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to Pricing.PricingProvidedValues"
                                                                                                                    },
                                                                                         "Value":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Format":  {
                                                                                                        "type":  "integer",
                                                                                                        "description":  "int"
                                                                                                    },
                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "Tenant":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                         "Key":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 },
                                                                                         "EntityCreatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "CustomEnumId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to PM.CustomEnums"
                                                                                                          }
                                                                                     },
                                                                      "type":  "object"
                                                                  },
                        "Pricing.FixationSubQuotes":  {
                                                          "properties":  {
                                                                             "TradeDirection":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                             "PriceForwardCurveGroupId":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                             "DeliveryPeriodEnd":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "DeliveryPeriodStart":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                             "VolumeUnit":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Percentage":  {
                                                                                                "type":  "string",
                                                                                                "description":  "decimal"
                                                                                            },
                                                                             "FixationQuoteId":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "FK to Pricing.FixationQuotes"
                                                                                                 },
                                                                             "LoadType":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "TargetPercentage":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "decimal"
                                                                                                  },
                                                                             "Capacity":  {
                                                                                              "type":  "string",
                                                                                              "description":  "decimal"
                                                                                          },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "Volume":  {
                                                                                            "type":  "string",
                                                                                            "description":  "decimal"
                                                                                        },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "CapacityUnit":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                             "PriceIndexReferenceDateTimeOffset":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   }
                                                                         },
                                                          "type":  "object"
                                                      },
                        "Pricing.SourcingAgreementDetails":  {
                                                                 "properties":  {
                                                                                    "SourcingAgreementId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to Pricing.SourcingAgreements"
                                                                                                            },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "Value":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Format":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                    "Key":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "CustomEnumId":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "FK to PM.CustomEnums"
                                                                                                     }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "Pricing.ManualPricingValueMetadatas":  {
                                                                    "properties":  {
                                                                                       "Id":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                       "EntityUpdatedAuthToken":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                       "Concealed":  {
                                                                                                         "type":  "boolean",
                                                                                                         "description":  "bit"
                                                                                                     },
                                                                                       "IsPricingOption":  {
                                                                                                               "type":  "boolean",
                                                                                                               "description":  "bit"
                                                                                                           },
                                                                                       "Value":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                       "EntityCreatedAuthToken":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                       "FromFeeRule":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                                       "Format":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                                       "EntityUpdatedDateTime":  {
                                                                                                                     "format":  "date-time",
                                                                                                                     "description":  "datetimeoffset",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                       "ManualPricingValueId":  {
                                                                                                                    "type":  "string",
                                                                                                                    "description":  "FK to Pricing.ManualPricingValues"
                                                                                                                },
                                                                                       "Tenant":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                                       "Key":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                                       "EntityCreatedDateTime":  {
                                                                                                                     "format":  "date-time",
                                                                                                                     "description":  "datetimeoffset",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                       "CustomEnumId":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "FK to PM.CustomEnums"
                                                                                                        }
                                                                                   },
                                                                    "type":  "object"
                                                                },
                        "Pricing.SourcingAgreements":  {
                                                           "properties":  {
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "DateSourced":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "PositionClosingDate":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "PropositionTemplateVersionId":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "FK to Pricing.PropositionTemplateVersions"
                                                                                                               },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "Comment":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                              "InternalReference":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                              "ExternalReference":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "PricingId":  {
                                                                                                "type":  "string",
                                                                                                "description":  "FK to Pricing.Pricings"
                                                                                            }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons":  {
                                                                                        "properties":  {
                                                                                                           "ScriptVersionId":  {
                                                                                                                                   "format":  "uuid",
                                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                                   "type":  "string"
                                                                                                                               },
                                                                                                           "Id":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                                           "ProductElementId":  {
                                                                                                                                    "type":  "string",
                                                                                                                                    "description":  "FK to Pricing.ProductElements"
                                                                                                                                },
                                                                                                           "EntityUpdatedAuthToken":  {
                                                                                                                                          "format":  "uuid",
                                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                                          "type":  "string"
                                                                                                                                      },
                                                                                                           "Concealed":  {
                                                                                                                             "type":  "boolean",
                                                                                                                             "description":  "bit"
                                                                                                                         },
                                                                                                           "EntityCreatedAuthToken":  {
                                                                                                                                          "format":  "uuid",
                                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                                          "type":  "string"
                                                                                                                                      },
                                                                                                           "ProductElementRuleId":  {
                                                                                                                                        "type":  "string",
                                                                                                                                        "description":  "FK to Pricing.ProductElementRules"
                                                                                                                                    },
                                                                                                           "EntityUpdatedDateTime":  {
                                                                                                                                         "format":  "date-time",
                                                                                                                                         "description":  "datetimeoffset",
                                                                                                                                         "type":  "string"
                                                                                                                                     },
                                                                                                           "Reason":  {
                                                                                                                          "type":  "string",
                                                                                                                          "description":  "nvarchar"
                                                                                                                      },
                                                                                                           "RevisitDate":  {
                                                                                                                               "format":  "date-time",
                                                                                                                               "description":  "datetimeoffset",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                           "Tenant":  {
                                                                                                                          "format":  "uuid",
                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                                           "PricingDeliveryPeriodResultTrackerId":  {
                                                                                                                                                        "type":  "string",
                                                                                                                                                        "description":  "FK to Pricing.PricingDeliveryPeriodResultTrackers"
                                                                                                                                                    },
                                                                                                           "EntityCreatedDateTime":  {
                                                                                                                                         "format":  "date-time",
                                                                                                                                         "description":  "datetimeoffset",
                                                                                                                                         "type":  "string"
                                                                                                                                     }
                                                                                                       },
                                                                                        "type":  "object"
                                                                                    },
                        "Pricing.FixationQuoteDetails":  {
                                                             "properties":  {
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "Key":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                                "Value":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "FixationQuoteId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to Pricing.FixationQuotes"
                                                                                                    }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "Pricing.Pricing_ProductComponentRelation":  {
                                                                         "properties":  {
                                                                                            "PricingId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to Pricing.Pricings"
                                                                                                          },
                                                                                            "EntityUpdatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Id":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                            "Concealed":  {
                                                                                                              "type":  "boolean",
                                                                                                              "description":  "bit"
                                                                                                          },
                                                                                            "EntityCreatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "EntityUpdatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "ProductComponentModelPricingRequestId":  {
                                                                                                                                          "format":  "uuid",
                                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                                          "type":  "string"
                                                                                                                                      },
                                                                                            "ProductComponentId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to Pricing.ProductComponents"
                                                                                                                   },
                                                                                            "EntityCreatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Tenant":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       }
                                                                                        },
                                                                         "type":  "object"
                                                                     },
                        "Pricing.PricingAgreementOptions":  {
                                                                "properties":  {
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "CustomEnumComponentId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to PM.CustomEnumComponents"
                                                                                                             },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "Percentage":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "decimal"
                                                                                                  },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "PricingAgreementId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to Pricing.PricingAgreements"
                                                                                                          },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "Pricing.SourcingAgreementPricingResultTotals":  {
                                                                             "properties":  {
                                                                                                "Precision":  {
                                                                                                                  "type":  "integer",
                                                                                                                  "description":  "int"
                                                                                                              },
                                                                                                "SourcingAgreementId":  {
                                                                                                                            "type":  "string",
                                                                                                                            "description":  "FK to Pricing.SourcingAgreements"
                                                                                                                        },
                                                                                                "Id":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                                "EntityUpdatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "Concealed":  {
                                                                                                                  "type":  "boolean",
                                                                                                                  "description":  "bit"
                                                                                                              },
                                                                                                "Tenant":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                                "EntityCreatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "Fee":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "decimal"
                                                                                                        },
                                                                                                "PricingDeliveryPeriodId":  {
                                                                                                                                "type":  "string",
                                                                                                                                "description":  "FK to Pricing.PricingDeliveryPeriods"
                                                                                                                            },
                                                                                                "EntityUpdatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "IsIncomplete":  {
                                                                                                                     "type":  "boolean",
                                                                                                                     "description":  "bit"
                                                                                                                 },
                                                                                                "SalesProductVersionId":  {
                                                                                                                              "type":  "string",
                                                                                                                              "description":  "FK to Pricing.SalesProductVersions"
                                                                                                                          },
                                                                                                "DirectionCustomEnumComponentValueId":  {
                                                                                                                                            "type":  "string",
                                                                                                                                            "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                                        },
                                                                                                "Unit":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                                "EntityCreatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "PricingId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to Pricing.Pricings"
                                                                                                              },
                                                                                                "TariffCustomEnumComponentValueId":  {
                                                                                                                                         "type":  "string",
                                                                                                                                         "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                                     }
                                                                                            },
                                                                             "type":  "object"
                                                                         },
                        "Pricing.FixationQuotes":  {
                                                       "properties":  {
                                                                          "TradeDirection":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "VolumeUnit":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Percentage":  {
                                                                                             "type":  "string",
                                                                                             "description":  "decimal"
                                                                                         },
                                                                          "PriceIndexReferenceDateTimeOffset":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                          "LoadType":  {
                                                                                           "type":  "integer",
                                                                                           "description":  "int"
                                                                                       },
                                                                          "PriceReferenceMoment":  {
                                                                                                       "type":  "integer",
                                                                                                       "description":  "int"
                                                                                                   },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "PricingAgreementId":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "FK to Pricing.PricingAgreements"
                                                                                                 },
                                                                          "TargetPercentage":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "decimal"
                                                                                               },
                                                                          "Capacity":  {
                                                                                           "type":  "string",
                                                                                           "description":  "decimal"
                                                                                       },
                                                                          "ReceivedTimestamp":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "InternalReference":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                          "ExternalReference":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                          "Indicative":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                          "Volume":  {
                                                                                         "type":  "string",
                                                                                         "description":  "decimal"
                                                                                     },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "FixationRequestId":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                          "CapacityUnit":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                          "PriceForwardCurveGroupId":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons":  {
                                                                                      "properties":  {
                                                                                                         "ProductElementId":  {
                                                                                                                                  "type":  "string",
                                                                                                                                  "description":  "FK to Pricing.ProductElements"
                                                                                                                              },
                                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                                        "format":  "uuid",
                                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                                        "type":  "string"
                                                                                                                                    },
                                                                                                         "Id":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                                         "PricingDeliveryPeriodCostTrackerId":  {
                                                                                                                                                    "type":  "string",
                                                                                                                                                    "description":  "FK to Pricing.PricingDeliveryPeriodCostTrackers"
                                                                                                                                                },
                                                                                                         "Concealed":  {
                                                                                                                           "type":  "boolean",
                                                                                                                           "description":  "bit"
                                                                                                                       },
                                                                                                         "EntityCreatedDateTime":  {
                                                                                                                                       "format":  "date-time",
                                                                                                                                       "description":  "datetimeoffset",
                                                                                                                                       "type":  "string"
                                                                                                                                   },
                                                                                                         "ProductElementRuleId":  {
                                                                                                                                      "type":  "string",
                                                                                                                                      "description":  "FK to Pricing.ProductElementRules"
                                                                                                                                  },
                                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                                       "format":  "date-time",
                                                                                                                                       "description":  "datetimeoffset",
                                                                                                                                       "type":  "string"
                                                                                                                                   },
                                                                                                         "Reason":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "nvarchar"
                                                                                                                    },
                                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                                        "format":  "uuid",
                                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                                        "type":  "string"
                                                                                                                                    },
                                                                                                         "Tenant":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    }
                                                                                                     },
                                                                                      "type":  "object"
                                                                                  },
                        "Pricing.PricingAgreementDetailMetadatas":  {
                                                                        "properties":  {
                                                                                           "PricingAgreementDetailId":  {
                                                                                                                            "type":  "string",
                                                                                                                            "description":  "FK to Pricing.PricingAgreementDetails"
                                                                                                                        },
                                                                                           "Id":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                                           "EntityUpdatedAuthToken":  {
                                                                                                                          "format":  "uuid",
                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                           "Concealed":  {
                                                                                                             "type":  "boolean",
                                                                                                             "description":  "bit"
                                                                                                         },
                                                                                           "Value":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                           "EntityCreatedAuthToken":  {
                                                                                                                          "format":  "uuid",
                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                           "Format":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                           "EntityUpdatedDateTime":  {
                                                                                                                         "format":  "date-time",
                                                                                                                         "description":  "datetimeoffset",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                           "Tenant":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                           "Key":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                           "EntityCreatedDateTime":  {
                                                                                                                         "format":  "date-time",
                                                                                                                         "description":  "datetimeoffset",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                           "CustomEnumId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to PM.CustomEnums"
                                                                                                            }
                                                                                       },
                                                                        "type":  "object"
                                                                    },
                        "Pricing.SourcingAgreementVolumeGroups":  {
                                                                      "properties":  {
                                                                                         "SourcingAgreementId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to Pricing.SourcingAgreements"
                                                                                                                 },
                                                                                         "Id":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Concealed":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                                         "EAN":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Name":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "EndDate":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                         "Tenant":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                         "EntityCreatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "StartDate":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       }
                                                                                     },
                                                                      "type":  "object"
                                                                  },
                        "Pricing.PricingCosts":  {
                                                     "properties":  {
                                                                        "PricingDeliveryPeriodCostTrackerId":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "FK to Pricing.PricingDeliveryPeriodCostTrackers"
                                                                                                               },
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "ProductElementId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to Pricing.ProductElements"
                                                                                             },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "ProductElementRuleId":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "FK to Pricing.ProductElementRules"
                                                                                                 },
                                                                        "Fee":  {
                                                                                    "type":  "string",
                                                                                    "description":  "decimal"
                                                                                },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                        "DirectionCustomEnumComponentValueId":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                        "Unit":  {
                                                                                     "type":  "integer",
                                                                                     "description":  "int"
                                                                                 },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "SalesProductVersionId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to Pricing.SalesProductVersions"
                                                                                                  },
                                                                        "TariffCustomEnumComponentValueId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                             }
                                                                    },
                                                     "type":  "object"
                                                 },
                        "Pricing.PricingResultTotals":  {
                                                            "properties":  {
                                                                               "Precision":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                               "SalesProductVersionId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to Pricing.SalesProductVersions"
                                                                                                         },
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Fee":  {
                                                                                           "type":  "string",
                                                                                           "description":  "decimal"
                                                                                       },
                                                                               "PricingDeliveryPeriodId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to Pricing.PricingDeliveryPeriods"
                                                                                                           },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "IsIncomplete":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                               "DirectionCustomEnumComponentValueId":  {
                                                                                                                           "type":  "string",
                                                                                                                           "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                       },
                                                                               "Unit":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "PricingId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to Pricing.Pricings"
                                                                                             },
                                                                               "TariffCustomEnumComponentValueId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                    }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "Pricing.PricingVolumeGroups":  {
                                                            "properties":  {
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Name":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                               "EAN":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "EndDate":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "DataSlotReference":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                               "TimeSeriesCode":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                               "SnapShotTimestamp":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "Revision":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                               "PricingId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to Pricing.Pricings"
                                                                                             },
                                                                               "StartDate":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "Pricing.PricingGenerationTriggers":  {
                                                                  "properties":  {
                                                                                     "TriggerConfiguration":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "nvarchar"
                                                                                                              },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "TriggerType":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "ProductComponentId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to Pricing.ProductComponents"
                                                                                                            },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "PricingRequestId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to Pricing.PricingRequests"
                                                                                                          }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Pricing.PricingAgreements":  {
                                                          "properties":  {
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "PropositionTemplateVersionId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to Pricing.PropositionTemplateVersions"
                                                                                                              },
                                                                             "Scored":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "Comment":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "InternalReference":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                             "ExternalReference":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "BrandId":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                             "PricingId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to Pricing.Pricings"
                                                                                           }
                                                                         },
                                                          "type":  "object"
                                                      },
                        "Pricing.PricingProvidedValues":  {
                                                              "properties":  {
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "Value":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Format":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                 "Key":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                                 "PricingValueProviderTypeImplementationId":  {
                                                                                                                                  "format":  "uuid",
                                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                                  "type":  "string"
                                                                                                                              },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "PricingId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to Pricing.Pricings"
                                                                                               }
                                                                             },
                                                              "type":  "object"
                                                          }
                    },
    "title":  "Pricing.Pricing",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Pricing Request

Aggregate Root: PricingRequest

Represents pricing requests with their details, metering points, and associated brands and product components.

erDiagram
    "Pricing.ContractVolumeDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier ContractVolumeId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ContractVolumes" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier PricingRequestId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequestDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingRequestId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit UserOverwritableInPricing 
        int PricingStage 
    }

    "Pricing.PricingRequestMeteringPointDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingRequestMeteringPointId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequestMeteringPoints" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier PricingRequestId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequestStrategies" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestId FK
        int SourcingType 
        uniqueidentifier ProductElementId FK
        decimal Percentage 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        decimal StopLossThreshold 
        int StopLossThresholdUnit 
        int FallbackStrategySourcingType 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset ProcurementEnd 
        datetimeoffset ProcurementStart 
    }

    "Pricing.PricingRequest_BrandRelation" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestId FK
        uniqueidentifier BrandId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequest_ProductComponentRelation" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestId FK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ProductComponentModelPricingRequestId 
        bit Concealed 
    }

    "Pricing.PricingRequest_TSSelector" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapShotTimeStamp 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequests" {
        uniqueidentifier Id PK
        datetimeoffset IssueOn 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        nvarchar Comment 
        nvarchar SourceApplication 
        uniqueidentifier PropositionTemplateId FK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar SourcePricingInternalReference 
        uniqueidentifier SalesBatchId 
        uniqueidentifier SalesBatchItemId 
        uniqueidentifier ModelPricingRequestId 
        datetimeoffset ContractStartDate 
        datetimeoffset ContractEndDate 
        bit SourceInAdvance 
        uniqueidentifier OptionPhaseDetailSetId 
        bit Concealed 
    }

    "Pricing.ContractVolumeDetails" }o--|| "Pricing.ContractVolumes" : "ContractVolumeId"
    "Pricing.ContractVolumeDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumes" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequestDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "Pricing.PricingRequestMeteringPoints" : "PricingRequestMeteringPointId"
    "Pricing.PricingRequestMeteringPoints" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequestStrategies" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequestStrategies" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingRequest_BrandRelation" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequest_ProductComponentRelation" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequest_ProductComponentRelation" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingRequest_TSSelector" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingGenerationTriggers" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequests" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingRequests" }o--|| "Pricing.PropositionTemplates" : "PropositionTemplateId"
    "Pricing.Pricings" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
erDiagram
    "Pricing.ContractVolumeDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier ContractVolumeId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ContractVolumes" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier PricingRequestId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequestDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingRequestId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit UserOverwritableInPricing 
        int PricingStage 
    }

    "Pricing.PricingRequestMeteringPointDetails" {
        uniqueidentifier Id PK
        int Key 
        nvarchar Value 
        int Format 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier PricingRequestMeteringPointId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequestMeteringPoints" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar EAN 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier PricingRequestId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequestStrategies" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestId FK
        int SourcingType 
        uniqueidentifier ProductElementId FK
        decimal Percentage 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        decimal StopLossThreshold 
        int StopLossThresholdUnit 
        int FallbackStrategySourcingType 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset ProcurementEnd 
        datetimeoffset ProcurementStart 
    }

    "Pricing.PricingRequest_BrandRelation" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestId FK
        uniqueidentifier BrandId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequest_ProductComponentRelation" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestId FK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ProductComponentModelPricingRequestId 
        bit Concealed 
    }

    "Pricing.PricingRequest_TSSelector" {
        uniqueidentifier Id PK
        uniqueidentifier PricingRequestId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapShotTimeStamp 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PricingRequests" {
        uniqueidentifier Id PK
        datetimeoffset IssueOn 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        nvarchar Comment 
        nvarchar SourceApplication 
        uniqueidentifier PropositionTemplateId FK
        uniqueidentifier ProductComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar SourcePricingInternalReference 
        uniqueidentifier SalesBatchId 
        uniqueidentifier SalesBatchItemId 
        uniqueidentifier ModelPricingRequestId 
        datetimeoffset ContractStartDate 
        datetimeoffset ContractEndDate 
        bit SourceInAdvance 
        uniqueidentifier OptionPhaseDetailSetId 
        bit Concealed 
    }

    "Pricing.ContractVolumeDetails" }o--|| "Pricing.ContractVolumes" : "ContractVolumeId"
    "Pricing.ContractVolumeDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumes" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequestDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "Pricing.PricingRequestMeteringPoints" : "PricingRequestMeteringPointId"
    "Pricing.PricingRequestMeteringPoints" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequestStrategies" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequestStrategies" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingRequest_BrandRelation" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequest_ProductComponentRelation" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequest_ProductComponentRelation" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingRequest_TSSelector" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingGenerationTriggers" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
    "Pricing.PricingRequests" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingRequests" }o--|| "Pricing.PropositionTemplates" : "PropositionTemplateId"
    "Pricing.Pricings" }o--|| "Pricing.PricingRequests" : "PricingRequestId"
{
    "definitions":  {
                        "Pricing.PricingRequestMeteringPoints":  {
                                                                     "properties":  {
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EAN":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Name":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EndDate":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                        "PricingRequestId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Pricing.PricingRequests"
                                                                                                             },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "StartDate":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "Pricing.PricingRequest_ProductComponentRelation":  {
                                                                                "properties":  {
                                                                                                   "Tenant":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                                  "format":  "uuid",
                                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                                  "type":  "string"
                                                                                                                              },
                                                                                                   "Id":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                                   "Concealed":  {
                                                                                                                     "type":  "boolean",
                                                                                                                     "description":  "bit"
                                                                                                                 },
                                                                                                   "EntityCreatedDateTime":  {
                                                                                                                                 "format":  "date-time",
                                                                                                                                 "description":  "datetimeoffset",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                                 "format":  "date-time",
                                                                                                                                 "description":  "datetimeoffset",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                   "ProductComponentModelPricingRequestId":  {
                                                                                                                                                 "format":  "uuid",
                                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                                 "type":  "string"
                                                                                                                                             },
                                                                                                   "ProductComponentId":  {
                                                                                                                              "type":  "string",
                                                                                                                              "description":  "FK to Pricing.ProductComponents"
                                                                                                                          },
                                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                                  "format":  "uuid",
                                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                                  "type":  "string"
                                                                                                                              },
                                                                                                   "PricingRequestId":  {
                                                                                                                            "type":  "string",
                                                                                                                            "description":  "FK to Pricing.PricingRequests"
                                                                                                                        }
                                                                                               },
                                                                                "type":  "object"
                                                                            },
                        "Pricing.PricingRequest_TSSelector":  {
                                                                  "properties":  {
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "SnapShotTimeStamp":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "DataSlotReference":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "nvarchar"
                                                                                                           },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "TimeSeriesCode":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                     "PricingRequestId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to Pricing.PricingRequests"
                                                                                                          },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "Revision":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Pricing.PricingRequestStrategies":  {
                                                                 "properties":  {
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "SourcingType":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "FallbackStrategySourcingType":  {
                                                                                                                         "type":  "integer",
                                                                                                                         "description":  "int"
                                                                                                                     },
                                                                                    "ProcurementEnd":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                    "ProcurementDeliveryPeriodInMonths":  {
                                                                                                                              "type":  "integer",
                                                                                                                              "description":  "int"
                                                                                                                          },
                                                                                    "ProcurementPeriodInMonths":  {
                                                                                                                      "type":  "integer",
                                                                                                                      "description":  "int"
                                                                                                                  },
                                                                                    "EndDate":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                    "Percentage":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "decimal"
                                                                                                   },
                                                                                    "ProcurementStart":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "ProcurementOffsetPeriodInMonths":  {
                                                                                                                            "type":  "integer",
                                                                                                                            "description":  "int"
                                                                                                                        },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                    "StopLossThresholdUnit":  {
                                                                                                                  "type":  "integer",
                                                                                                                  "description":  "int"
                                                                                                              },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "PricingRequestId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to Pricing.PricingRequests"
                                                                                                         },
                                                                                    "ProductElementId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to Pricing.ProductElements"
                                                                                                         },
                                                                                    "StartDate":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                                    "StopLossThreshold":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "decimal"
                                                                                                          }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "Pricing.PricingRequests":  {
                                                        "properties":  {
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "ProductComponentId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to Pricing.ProductComponents"
                                                                                                  },
                                                                           "SalesBatchItemId":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                           "ContractStartDate":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "SalesBatchId":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                           "OptionPhaseDetailSetId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "Comment":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                           "SourcePricingInternalReference":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "nvarchar"
                                                                                                              },
                                                                           "ModelPricingRequestId":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "IssueOn":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                                           "InternalReference":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                           "ExternalReference":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                           "SourceInAdvance":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                           "PropositionTemplateId":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "FK to Pricing.PropositionTemplates"
                                                                                                     },
                                                                           "SourceApplication":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                           "ContractEndDate":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               }
                                                                       },
                                                        "type":  "object"
                                                    },
                        "Pricing.PricingRequestDetails":  {
                                                              "properties":  {
                                                                                 "PricingStage":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "Value":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Format":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                                 "UserOverwritableInPricing":  {
                                                                                                                   "type":  "boolean",
                                                                                                                   "description":  "bit"
                                                                                                               },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                 "Key":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                                 "PricingRequestId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to Pricing.PricingRequests"
                                                                                                      },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "CustomEnumId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to PM.CustomEnums"
                                                                                                  }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "Pricing.PricingRequestMeteringPointDetails":  {
                                                                           "properties":  {
                                                                                              "Id":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                              "EntityUpdatedAuthToken":  {
                                                                                                                             "format":  "uuid",
                                                                                                                             "description":  "uniqueidentifier",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                              "Concealed":  {
                                                                                                                "type":  "boolean",
                                                                                                                "description":  "bit"
                                                                                                            },
                                                                                              "PricingRequestMeteringPointId":  {
                                                                                                                                    "type":  "string",
                                                                                                                                    "description":  "FK to Pricing.PricingRequestMeteringPoints"
                                                                                                                                },
                                                                                              "Value":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                              "EntityCreatedAuthToken":  {
                                                                                                                             "format":  "uuid",
                                                                                                                             "description":  "uniqueidentifier",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                              "EndDate":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                              "Format":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                              "EntityUpdatedDateTime":  {
                                                                                                                            "format":  "date-time",
                                                                                                                            "description":  "datetimeoffset",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                              "Tenant":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                              "Key":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                              "EntityCreatedDateTime":  {
                                                                                                                            "format":  "date-time",
                                                                                                                            "description":  "datetimeoffset",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                              "StartDate":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                              "CustomEnumId":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "FK to PM.CustomEnums"
                                                                                                               }
                                                                                          },
                                                                           "type":  "object"
                                                                       },
                        "Pricing.ContractVolumes":  {
                                                        "properties":  {
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "EAN":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Name":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EndDate":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                           "PricingRequestId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to Pricing.PricingRequests"
                                                                                                },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "StartDate":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         }
                                                                       },
                                                        "type":  "object"
                                                    },
                        "Pricing.PricingRequest_BrandRelation":  {
                                                                     "properties":  {
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "BrandId":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "PricingRequestId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Pricing.PricingRequests"
                                                                                                             }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "Pricing.ContractVolumeDetails":  {
                                                              "properties":  {
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "Value":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Format":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "ContractVolumeId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to Pricing.ContractVolumes"
                                                                                                      },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                 "Key":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "CustomEnumId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to PM.CustomEnums"
                                                                                                  }
                                                                             },
                                                              "type":  "object"
                                                          }
                    },
    "title":  "Pricing.PricingRequest",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Product Component

Aggregate Root: ProductComponent

Represents product components with their versions, rules, key values, and associated product elements for pricing calculations.

erDiagram
    "Pricing.ProductComponentKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentVersionId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductComponentPricingValueProviders" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentVersionId FK
        uniqueidentifier PricingValueProviderTypeImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductComponentRules" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentVersionId FK
        int RuleType 
        nvarchar Rule 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductComponentVersions" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentId FK
        datetimeoffset StartDate 
        int VersionNumber 
        nvarchar Comment 
        bit InterruptCalculationOnMissingPricing 
        bit GenerateMissingPricing 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier VolumeGroupGenerationScriptId 
        nvarchar MaxDeliveryPeriodDeviationOnReUse 
        bit Concealed 
        uniqueidentifier SupplyAgreementGenerationScriptId 
        uniqueidentifier ProductCustomEnumComponentId FK
        uniqueidentifier SourcingProductComponentId 
    }

    "Pricing.ProductComponents" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar InternalReference 
    }

    "Pricing.ProductElementCustomEnums" {
        uniqueidentifier Id PK
        uniqueidentifier ProductElementId FK
        uniqueidentifier CustomEnumId 
        bit IsNullable 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductElementKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier ProductElementId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsInheritedFromCPE 
    }

    "Pricing.ProductElementRules" {
        uniqueidentifier Id PK
        uniqueidentifier ProductElementId FK
        int RuleType 
        int Unit 
        int FeeType 
        bit Editable 
        bit Required 
        int PricingStage 
        bit ExternallyAvailable 
        nvarchar Rule 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int ProductComponentPricingPricingStage 
    }

    "Pricing.ProductElement_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentId FK
        nvarchar ProductElementName 
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductElement_Script" {
        uniqueidentifier Id PK
        uniqueidentifier ProductElementId FK
        uniqueidentifier ScriptId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductElements" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier ProductComponentVersionId FK
        int DisplayOrderIndex 
        int CalculationOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit ResultsCanBeCopiedFromSourcePricing 
        int DeliveryPeriodDivisionType 
        bit DealsAreLeading 
        bit Concealed 
        uniqueidentifier SourcingProductElementId 
        int SubResultDeliveryPeriodDivisionType 
        int Precision 
        uniqueidentifier CommonProductElementVersionId FK
        bit SourcingProductElementIdIsInheritedFromCPE 
        datetimeoffset PeriodDivisionDate 
        uniqueidentifier PriceForwardCurveGroupId 
        bit PriceForwardCurveGroupIdIsInheritedFromCPE 
        int PricingResultType 
    }

    "Pricing.ProductComponentKeyValues" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.ProductComponentPricingValueProviders" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.ProductComponentRules" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.Pricings" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.ProductComponentVersions" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.ProductElements" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.SalesProductVersion_ProductComponentVersion" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.PricingGenerationTriggers" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingRequest_ProductComponentRelation" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingRequests" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.ProductElement_CategoryLabel" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.SourcingAgreement_ProductComponent" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.Pricing_ProductComponentRelation" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.ProductElementCustomEnums" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.ProductElementKeyValues" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingResults" }o--|| "Pricing.ProductElementRules" : "ParentProductElementRuleId"
    "Pricing.PricingResults" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.ProductElementRules" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingCosts" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.ProductElement_Script" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.ProductElements" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.PricingRequestStrategies" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingAgreementStrategies" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingCosts" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.ProductElements" : "ProductElementId"
erDiagram
    "Pricing.ProductComponentKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentVersionId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductComponentPricingValueProviders" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentVersionId FK
        uniqueidentifier PricingValueProviderTypeImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductComponentRules" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentVersionId FK
        int RuleType 
        nvarchar Rule 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductComponentVersions" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentId FK
        datetimeoffset StartDate 
        int VersionNumber 
        nvarchar Comment 
        bit InterruptCalculationOnMissingPricing 
        bit GenerateMissingPricing 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier VolumeGroupGenerationScriptId 
        nvarchar MaxDeliveryPeriodDeviationOnReUse 
        bit Concealed 
        uniqueidentifier SupplyAgreementGenerationScriptId 
        uniqueidentifier ProductCustomEnumComponentId FK
        uniqueidentifier SourcingProductComponentId 
    }

    "Pricing.ProductComponents" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar InternalReference 
    }

    "Pricing.ProductElementCustomEnums" {
        uniqueidentifier Id PK
        uniqueidentifier ProductElementId FK
        uniqueidentifier CustomEnumId 
        bit IsNullable 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductElementKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier ProductElementId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit IsInheritedFromCPE 
    }

    "Pricing.ProductElementRules" {
        uniqueidentifier Id PK
        uniqueidentifier ProductElementId FK
        int RuleType 
        int Unit 
        int FeeType 
        bit Editable 
        bit Required 
        int PricingStage 
        bit ExternallyAvailable 
        nvarchar Rule 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int ProductComponentPricingPricingStage 
    }

    "Pricing.ProductElement_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier ProductComponentId FK
        nvarchar ProductElementName 
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductElement_Script" {
        uniqueidentifier Id PK
        uniqueidentifier ProductElementId FK
        uniqueidentifier ScriptId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.ProductElements" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier ProductComponentVersionId FK
        int DisplayOrderIndex 
        int CalculationOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit ResultsCanBeCopiedFromSourcePricing 
        int DeliveryPeriodDivisionType 
        bit DealsAreLeading 
        bit Concealed 
        uniqueidentifier SourcingProductElementId 
        int SubResultDeliveryPeriodDivisionType 
        int Precision 
        uniqueidentifier CommonProductElementVersionId FK
        bit SourcingProductElementIdIsInheritedFromCPE 
        datetimeoffset PeriodDivisionDate 
        uniqueidentifier PriceForwardCurveGroupId 
        bit PriceForwardCurveGroupIdIsInheritedFromCPE 
        int PricingResultType 
    }

    "Pricing.ProductComponentKeyValues" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.ProductComponentPricingValueProviders" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.ProductComponentRules" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.Pricings" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.ProductComponentVersions" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.ProductElements" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.SalesProductVersion_ProductComponentVersion" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.PricingGenerationTriggers" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingRequest_ProductComponentRelation" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.PricingRequests" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.ProductElement_CategoryLabel" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.SourcingAgreement_ProductComponent" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.Pricing_ProductComponentRelation" }o--|| "Pricing.ProductComponents" : "ProductComponentId"
    "Pricing.ProductElementCustomEnums" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.ProductElementKeyValues" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingResults" }o--|| "Pricing.ProductElementRules" : "ParentProductElementRuleId"
    "Pricing.PricingResults" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.ProductElementRules" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingCosts" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.ProductElementRules" : "ProductElementRuleId"
    "Pricing.ProductElement_Script" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodResultTrackerStatusReasons" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.ProductElements" }o--|| "Pricing.CommonProductElementVersions" : "CommonProductElementVersionId"
    "Pricing.PricingRequestStrategies" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingAgreementStrategies" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingCosts" }o--|| "Pricing.ProductElements" : "ProductElementId"
    "Pricing.PricingDeliveryPeriodCostTrackerStatusReasons" }o--|| "Pricing.ProductElements" : "ProductElementId"
{
    "definitions":  {
                        "Pricing.ProductElement_CategoryLabel":  {
                                                                     "properties":  {
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "ProductElementName":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "nvarchar"
                                                                                                               },
                                                                                        "CategoryLabelId":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "CategoryId":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                        "ProductComponentId":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "FK to Pricing.ProductComponents"
                                                                                                               },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "Pricing.ProductComponentVersions":  {
                                                                 "properties":  {
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "ProductComponentId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to Pricing.ProductComponents"
                                                                                                           },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "VolumeGroupGenerationScriptId":  {
                                                                                                                          "format":  "uuid",
                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "SupplyAgreementGenerationScriptId":  {
                                                                                                                              "format":  "uuid",
                                                                                                                              "description":  "uniqueidentifier",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                    "Comment":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                    "SourcingProductComponentId":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                    "MaxDeliveryPeriodDeviationOnReUse":  {
                                                                                                                              "type":  "string",
                                                                                                                              "description":  "nvarchar"
                                                                                                                          },
                                                                                    "GenerateMissingPricing":  {
                                                                                                                   "type":  "boolean",
                                                                                                                   "description":  "bit"
                                                                                                               },
                                                                                    "InterruptCalculationOnMissingPricing":  {
                                                                                                                                 "type":  "boolean",
                                                                                                                                 "description":  "bit"
                                                                                                                             },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "VersionNumber":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                    "StartDate":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                                    "ProductCustomEnumComponentId":  {
                                                                                                                         "type":  "string",
                                                                                                                         "description":  "FK to PM.CustomEnumComponents"
                                                                                                                     }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "Pricing.ProductComponentKeyValues":  {
                                                                  "properties":  {
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "Key":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "ProductComponentVersionId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to Pricing.ProductComponentVersions"
                                                                                                                   },
                                                                                     "Value":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Pricing.ProductComponentPricingValueProviders":  {
                                                                              "properties":  {
                                                                                                 "Concealed":  {
                                                                                                                   "type":  "boolean",
                                                                                                                   "description":  "bit"
                                                                                                               },
                                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                                "format":  "uuid",
                                                                                                                                "description":  "uniqueidentifier",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                 "Id":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                                                 "PricingValueProviderTypeImplementationId":  {
                                                                                                                                                  "format":  "uuid",
                                                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                                                  "type":  "string"
                                                                                                                                              },
                                                                                                 "ProductComponentVersionId":  {
                                                                                                                                   "type":  "string",
                                                                                                                                   "description":  "FK to Pricing.ProductComponentVersions"
                                                                                                                               },
                                                                                                 "EntityCreatedDateTime":  {
                                                                                                                               "format":  "date-time",
                                                                                                                               "description":  "datetimeoffset",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                 "EntityUpdatedDateTime":  {
                                                                                                                               "format":  "date-time",
                                                                                                                               "description":  "datetimeoffset",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                                "format":  "uuid",
                                                                                                                                "description":  "uniqueidentifier",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                 "Tenant":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            }
                                                                                             },
                                                                              "type":  "object"
                                                                          },
                        "Pricing.ProductElementKeyValues":  {
                                                                "properties":  {
                                                                                   "ProductElementId":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "FK to Pricing.ProductElements"
                                                                                                        },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "Key":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "Value":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "IsInheritedFromCPE":  {
                                                                                                              "type":  "boolean",
                                                                                                              "description":  "bit"
                                                                                                          },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "Pricing.ProductComponentRules":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "RuleType":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                                 "ProductComponentVersionId":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "FK to Pricing.ProductComponentVersions"
                                                                                                               },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Rule":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "Pricing.ProductElementCustomEnums":  {
                                                                  "properties":  {
                                                                                     "ProductElementId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to Pricing.ProductElements"
                                                                                                          },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "CustomEnumId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                     "IsNullable":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Pricing.ProductElement_Script":  {
                                                              "properties":  {
                                                                                 "ProductElementId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to Pricing.ProductElements"
                                                                                                      },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "ScriptId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "Pricing.ProductElements":  {
                                                        "properties":  {
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "Description":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                           "SubResultDeliveryPeriodDivisionType":  {
                                                                                                                       "type":  "integer",
                                                                                                                       "description":  "int"
                                                                                                                   },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "CalculationOrderIndex":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                           "CommonProductElementVersionId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Pricing.CommonProductElementVersions"
                                                                                                             },
                                                                           "DeliveryPeriodDivisionType":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "ProductComponentVersionId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to Pricing.ProductComponentVersions"
                                                                                                         },
                                                                           "Name":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                           "DisplayOrderIndex":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "ResultsCanBeCopiedFromSourcePricing":  {
                                                                                                                       "type":  "boolean",
                                                                                                                       "description":  "bit"
                                                                                                                   },
                                                                           "PricingResultType":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 },
                                                                           "Precision":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                           "SourcingProductElementIdIsInheritedFromCPE":  {
                                                                                                                              "type":  "boolean",
                                                                                                                              "description":  "bit"
                                                                                                                          },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                           "DealsAreLeading":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "PeriodDivisionDate":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "SourcingProductElementId":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                           "PriceForwardCurveGroupIdIsInheritedFromCPE":  {
                                                                                                                              "type":  "boolean",
                                                                                                                              "description":  "bit"
                                                                                                                          },
                                                                           "PriceForwardCurveGroupId":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        }
                                                                       },
                                                        "type":  "object"
                                                    },
                        "Pricing.ProductElementRules":  {
                                                            "properties":  {
                                                                               "PricingStage":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                               "Required":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "ProductElementId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to Pricing.ProductElements"
                                                                                                    },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "Rule":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                               "RuleType":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                               "ProductComponentPricingPricingStage":  {
                                                                                                                           "type":  "integer",
                                                                                                                           "description":  "int"
                                                                                                                       },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "ExternallyAvailable":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                               "FeeType":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                               "Editable":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                               "Unit":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "Pricing.ProductComponents":  {
                                                          "properties":  {
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "Description":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Name":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "InternalReference":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        }
                                                                         },
                                                          "type":  "object"
                                                      }
                    },
    "title":  "Pricing.ProductComponent",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Proposition Template

Aggregate Root: PropositionTemplate

Represents proposition templates with their versions, rules, key values, and associated sales product versions.

erDiagram
    "Pricing.PropositionTemplateKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier PropositionTemplateVersionId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PropositionTemplateRules" {
        uniqueidentifier Id PK
        int RuleType 
        uniqueidentifier PropositionTemplateVersionId FK
        nvarchar Rule 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PropositionTemplateVersion_SalesProductVersion" {
        uniqueidentifier Id PK
        uniqueidentifier PropositionTemplateVersionId FK
        uniqueidentifier SalesProductVersionId FK
        int CalculationOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ParentSalesProductVersionId FK
        bit Concealed 
    }

    "Pricing.PropositionTemplateVersions" {
        uniqueidentifier Id PK
        uniqueidentifier PropositionTemplateId FK
        datetimeoffset StartDate 
        int VersionNumber 
        bit IsRevoked 
        nvarchar Comment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier VolumeGroupGenerationScriptId 
        bit Concealed 
        uniqueidentifier SupplyAgreementGenerationScriptId 
    }

    "Pricing.PropositionTemplates" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar InternalReference 
    }

    "Pricing.PropositionTemplateKeyValues" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PropositionTemplateRules" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.SalesProductVersions" : "ParentSalesProductVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.Pricings" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PropositionTemplateVersions" }o--|| "Pricing.PropositionTemplates" : "PropositionTemplateId"
    "Pricing.SourcingAgreements" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PricingAgreements" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PricingRequests" }o--|| "Pricing.PropositionTemplates" : "PropositionTemplateId"
erDiagram
    "Pricing.PropositionTemplateKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier PropositionTemplateVersionId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PropositionTemplateRules" {
        uniqueidentifier Id PK
        int RuleType 
        uniqueidentifier PropositionTemplateVersionId FK
        nvarchar Rule 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.PropositionTemplateVersion_SalesProductVersion" {
        uniqueidentifier Id PK
        uniqueidentifier PropositionTemplateVersionId FK
        uniqueidentifier SalesProductVersionId FK
        int CalculationOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ParentSalesProductVersionId FK
        bit Concealed 
    }

    "Pricing.PropositionTemplateVersions" {
        uniqueidentifier Id PK
        uniqueidentifier PropositionTemplateId FK
        datetimeoffset StartDate 
        int VersionNumber 
        bit IsRevoked 
        nvarchar Comment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier VolumeGroupGenerationScriptId 
        bit Concealed 
        uniqueidentifier SupplyAgreementGenerationScriptId 
    }

    "Pricing.PropositionTemplates" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar InternalReference 
    }

    "Pricing.PropositionTemplateKeyValues" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PropositionTemplateRules" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.SalesProductVersions" : "ParentSalesProductVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.Pricings" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PropositionTemplateVersions" }o--|| "Pricing.PropositionTemplates" : "PropositionTemplateId"
    "Pricing.SourcingAgreements" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PricingAgreements" }o--|| "Pricing.PropositionTemplateVersions" : "PropositionTemplateVersionId"
    "Pricing.PricingRequests" }o--|| "Pricing.PropositionTemplates" : "PropositionTemplateId"
{
    "definitions":  {
                        "Pricing.PropositionTemplateVersions":  {
                                                                    "properties":  {
                                                                                       "Id":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                       "EntityUpdatedAuthToken":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                       "Concealed":  {
                                                                                                         "type":  "boolean",
                                                                                                         "description":  "bit"
                                                                                                     },
                                                                                       "EntityCreatedAuthToken":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                       "VolumeGroupGenerationScriptId":  {
                                                                                                                             "format":  "uuid",
                                                                                                                             "description":  "uniqueidentifier",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                       "IsRevoked":  {
                                                                                                         "type":  "boolean",
                                                                                                         "description":  "bit"
                                                                                                     },
                                                                                       "EntityCreatedDateTime":  {
                                                                                                                     "format":  "date-time",
                                                                                                                     "description":  "datetimeoffset",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                       "Comment":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                       "Tenant":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                                       "SupplyAgreementGenerationScriptId":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                       "EntityUpdatedDateTime":  {
                                                                                                                     "format":  "date-time",
                                                                                                                     "description":  "datetimeoffset",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                       "PropositionTemplateId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to Pricing.PropositionTemplates"
                                                                                                                 },
                                                                                       "VersionNumber":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                       "StartDate":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     }
                                                                                   },
                                                                    "type":  "object"
                                                                },
                        "Pricing.PropositionTemplates":  {
                                                             "properties":  {
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "Description":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Name":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "InternalReference":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "nvarchar"
                                                                                                      },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "Pricing.PropositionTemplateKeyValues":  {
                                                                     "properties":  {
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "Key":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                        "PropositionTemplateVersionId":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "FK to Pricing.PropositionTemplateVersions"
                                                                                                                         },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Value":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "Pricing.PropositionTemplateRules":  {
                                                                 "properties":  {
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "Rule":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "RuleType":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "PropositionTemplateVersionId":  {
                                                                                                                         "type":  "string",
                                                                                                                         "description":  "FK to Pricing.PropositionTemplateVersions"
                                                                                                                     },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "Pricing.PropositionTemplateVersion_SalesProductVersion":  {
                                                                                       "properties":  {
                                                                                                          "Concealed":  {
                                                                                                                            "type":  "boolean",
                                                                                                                            "description":  "bit"
                                                                                                                        },
                                                                                                          "EntityUpdatedAuthToken":  {
                                                                                                                                         "format":  "uuid",
                                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                                         "type":  "string"
                                                                                                                                     },
                                                                                                          "Id":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                                          "SalesProductVersionId":  {
                                                                                                                                        "type":  "string",
                                                                                                                                        "description":  "FK to Pricing.SalesProductVersions"
                                                                                                                                    },
                                                                                                          "PropositionTemplateVersionId":  {
                                                                                                                                               "type":  "string",
                                                                                                                                               "description":  "FK to Pricing.PropositionTemplateVersions"
                                                                                                                                           },
                                                                                                          "ParentSalesProductVersionId":  {
                                                                                                                                              "type":  "string",
                                                                                                                                              "description":  "FK to Pricing.SalesProductVersions"
                                                                                                                                          },
                                                                                                          "EntityCreatedDateTime":  {
                                                                                                                                        "format":  "date-time",
                                                                                                                                        "description":  "datetimeoffset",
                                                                                                                                        "type":  "string"
                                                                                                                                    },
                                                                                                          "EntityUpdatedDateTime":  {
                                                                                                                                        "format":  "date-time",
                                                                                                                                        "description":  "datetimeoffset",
                                                                                                                                        "type":  "string"
                                                                                                                                    },
                                                                                                          "CalculationOrderIndex":  {
                                                                                                                                        "type":  "integer",
                                                                                                                                        "description":  "int"
                                                                                                                                    },
                                                                                                          "EntityCreatedAuthToken":  {
                                                                                                                                         "format":  "uuid",
                                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                                         "type":  "string"
                                                                                                                                     },
                                                                                                          "Tenant":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     }
                                                                                                      },
                                                                                       "type":  "object"
                                                                                   }
                    },
    "title":  "Pricing.PropositionTemplate",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Sales Product

Aggregate Root: SalesProduct

Represents sales products with their versions, rules, key values, and associated product component versions.

erDiagram
    "Pricing.SalesProductKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier SalesProductVersionId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SalesProductRules" {
        uniqueidentifier Id PK
        uniqueidentifier SalesProductVersionId FK
        int RuleType 
        nvarchar Rule 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SalesProductVersion_ProductComponentVersion" {
        uniqueidentifier Id PK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier ProductComponentVersionId FK
        int DisplayOrderIndex 
        int CalculationOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SalesProductVersions" {
        uniqueidentifier Id PK
        uniqueidentifier SalesProductId FK
        datetimeoffset StartDate 
        int VersionNumber 
        nvarchar Comment 
        uniqueidentifier ProductCustomEnumComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SalesProducts" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        int DisplayOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar InternalReference 
        bit Concealed 
    }

    "Pricing.SalesProductKeyValues" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.SalesProductRules" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.SalesProductVersion_ProductComponentVersion" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.SalesProductVersion_ProductComponentVersion" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingResults" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.SalesProductVersions" : "ParentSalesProductVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.SalesProductVersions" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "Pricing.SalesProducts" : "SalesProductId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingCosts" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
erDiagram
    "Pricing.SalesProductKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier SalesProductVersionId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SalesProductRules" {
        uniqueidentifier Id PK
        uniqueidentifier SalesProductVersionId FK
        int RuleType 
        nvarchar Rule 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SalesProductVersion_ProductComponentVersion" {
        uniqueidentifier Id PK
        uniqueidentifier SalesProductVersionId FK
        uniqueidentifier ProductComponentVersionId FK
        int DisplayOrderIndex 
        int CalculationOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SalesProductVersions" {
        uniqueidentifier Id PK
        uniqueidentifier SalesProductId FK
        datetimeoffset StartDate 
        int VersionNumber 
        nvarchar Comment 
        uniqueidentifier ProductCustomEnumComponentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.SalesProducts" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        int DisplayOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar InternalReference 
        bit Concealed 
    }

    "Pricing.SalesProductKeyValues" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.SalesProductRules" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.SalesProductVersion_ProductComponentVersion" }o--|| "Pricing.ProductComponentVersions" : "ProductComponentVersionId"
    "Pricing.SalesProductVersion_ProductComponentVersion" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingResults" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.SalesProductVersions" : "ParentSalesProductVersionId"
    "Pricing.PropositionTemplateVersion_SalesProductVersion" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.SalesProductVersions" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "Pricing.SalesProducts" : "SalesProductId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
    "Pricing.PricingCosts" }o--|| "Pricing.SalesProductVersions" : "SalesProductVersionId"
{
    "definitions":  {
                        "Pricing.SalesProductVersions":  {
                                                             "properties":  {
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Comment":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                "SalesProductId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to Pricing.SalesProducts"
                                                                                                   },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "VersionNumber":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                                "StartDate":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                "ProductCustomEnumComponentId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to PM.CustomEnumComponents"
                                                                                                                 }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "Pricing.SalesProducts":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "DisplayOrderIndex":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "Description":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Name":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "InternalReference":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "Pricing.SalesProductKeyValues":  {
                                                              "properties":  {
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "SalesProductVersionId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to Pricing.SalesProductVersions"
                                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "Value":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Key":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "Pricing.SalesProductVersion_ProductComponentVersion":  {
                                                                                    "properties":  {
                                                                                                       "Concealed":  {
                                                                                                                         "type":  "boolean",
                                                                                                                         "description":  "bit"
                                                                                                                     },
                                                                                                       "DisplayOrderIndex":  {
                                                                                                                                 "type":  "integer",
                                                                                                                                 "description":  "int"
                                                                                                                             },
                                                                                                       "Id":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                                       "SalesProductVersionId":  {
                                                                                                                                     "type":  "string",
                                                                                                                                     "description":  "FK to Pricing.SalesProductVersions"
                                                                                                                                 },
                                                                                                       "EntityUpdatedAuthToken":  {
                                                                                                                                      "format":  "uuid",
                                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                                      "type":  "string"
                                                                                                                                  },
                                                                                                       "ProductComponentVersionId":  {
                                                                                                                                         "type":  "string",
                                                                                                                                         "description":  "FK to Pricing.ProductComponentVersions"
                                                                                                                                     },
                                                                                                       "EntityCreatedDateTime":  {
                                                                                                                                     "format":  "date-time",
                                                                                                                                     "description":  "datetimeoffset",
                                                                                                                                     "type":  "string"
                                                                                                                                 },
                                                                                                       "EntityUpdatedDateTime":  {
                                                                                                                                     "format":  "date-time",
                                                                                                                                     "description":  "datetimeoffset",
                                                                                                                                     "type":  "string"
                                                                                                                                 },
                                                                                                       "CalculationOrderIndex":  {
                                                                                                                                     "type":  "integer",
                                                                                                                                     "description":  "int"
                                                                                                                                 },
                                                                                                       "EntityCreatedAuthToken":  {
                                                                                                                                      "format":  "uuid",
                                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                                      "type":  "string"
                                                                                                                                  },
                                                                                                       "Tenant":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  }
                                                                                                   },
                                                                                    "type":  "object"
                                                                                },
                        "Pricing.SalesProductRules":  {
                                                          "properties":  {
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "SalesProductVersionId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to Pricing.SalesProductVersions"
                                                                                                       },
                                                                             "RuleType":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Rule":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        }
                                                                         },
                                                          "type":  "object"
                                                      }
                    },
    "title":  "Pricing.SalesProduct",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Pricing Engine Queue Item

Aggregate Root: PricingEngineQueueItem

Represents queue items for pricing engine processing and execution.

erDiagram
    "Pricing.PricingEngineQueueItems" {
        uniqueidentifier Id PK
        datetimeoffset Queued 
        int Priority 
        varbinary QueueItemData 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }
erDiagram
    "Pricing.PricingEngineQueueItems" {
        uniqueidentifier Id PK
        datetimeoffset Queued 
        int Priority 
        varbinary QueueItemData 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }
{
    "definitions":  {
                        "Pricing.PricingEngineQueueItems":  {
                                                                "properties":  {
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "Priority":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "QueueItemData":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "varbinary"
                                                                                                     },
                                                                                   "Queued":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            }
                    },
    "title":  "Pricing.PricingEngineQueueItem",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Custom Enum

Aggregate Root: CustomEnum

Represents custom enumerations with components, values, and key values for flexible data classification.

erDiagram
    "Pricing.CustomEnumComponentValueKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentValueId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CustomEnumComponentValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentId FK
        nvarchar Value 
        nvarchar ScriptValue 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CustomEnumComponents" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumId FK
        nvarchar Name 
        nvarchar ExternalReference 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CustomEnums" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "PM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ProductComponentVersions" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementOptions" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
erDiagram
    "Pricing.CustomEnumComponentValueKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentValueId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CustomEnumComponentValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentId FK
        nvarchar Value 
        nvarchar ScriptValue 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CustomEnumComponents" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumId FK
        nvarchar Name 
        nvarchar ExternalReference 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Pricing.CustomEnums" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResults" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ManualPricingValues" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.SourcingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "PM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "DirectionCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingAgreementPricingResultTotals" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "CRM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "Pricing.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "ApplicationCore.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.PricingCosts" }o--|| "PM.CustomEnumComponentValues" : "TariffCustomEnumComponentValueId"
    "Pricing.ProductComponentVersions" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.ProductComponentVersions" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "Pricing.SalesProductVersions" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementOptions" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingAgreementOptions" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.PricingDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingProvidedValueMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingRequestMeteringPointDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingResultMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.ManualPricingValueMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingVolumeGroupDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.ContractVolumeDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.SourcingAgreementVolumeGroupDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetailMetadatas" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.PricingAgreementMeteringPointDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
{
    "definitions":  {
                        "Pricing.CustomEnumComponentValues":  {
                                                                  "properties":  {
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "CustomEnumComponentId":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "FK to PM.CustomEnumComponents"
                                                                                                               },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "ScriptValue":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                     "Value":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                     "StartDate":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Pricing.CustomEnumComponents":  {
                                                             "properties":  {
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Name":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "EndDate":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "ExternalReference":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "nvarchar"
                                                                                                      },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "StartDate":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                "CustomEnumId":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "FK to PM.CustomEnums"
                                                                                                 }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "Pricing.CustomEnumComponentValueKeyValues":  {
                                                                          "properties":  {
                                                                                             "Concealed":  {
                                                                                                               "type":  "boolean",
                                                                                                               "description":  "bit"
                                                                                                           },
                                                                                             "EntityUpdatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "Id":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                             "Key":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                             "CustomEnumComponentValueId":  {
                                                                                                                                "type":  "string",
                                                                                                                                "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                            },
                                                                                             "EntityCreatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "Value":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "nvarchar"
                                                                                                       },
                                                                                             "EntityUpdatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "EntityCreatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "Tenant":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        }
                                                                                         },
                                                                          "type":  "object"
                                                                      },
                        "Pricing.CustomEnums":  {
                                                    "properties":  {
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "Description":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "Name":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  }
                                                                   },
                                                    "type":  "object"
                                                }
                    },
    "title":  "Pricing.CustomEnum",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

3 - Portfolio Management module

The Portfolio Management module in Vertex

This is a description of the Portfolio Management module

3.1 - Sourcing Cluster

Sourcing clusters are automic units that execute a sourcing strategy. They respond to deals/orders and sourcing cluster volume inputs, calculate their own open position based on this data and has scripts to organise their volume and create orders or deals to interact with the rest of the portfolio.

Sourcing Cluster

Entity diagram

Calculations

Sourcing Cluster Actor

The sourcing cluster is implemented as an actor, this means that the actor is implemented as a black box that only has an inbox and an outbox with the outside world. The state that it creates is internal to the actor and shall not be directly viewed or mutated by anything else than an actor. This is why it is important to know the inputs and outputs of the sourcing cluster actor.

Inputs

Inputs from the actor should be introduced into the actor system. This can be done by other actors. There is special actor that can introduce messages from outside the actor system into the actor system. This actor is subscribes to a Kafka topic and publishes the messages to the specific actor that is the receipiant of the message.

Put Sourcing Cluster Volume Input

All volume inputs that are added to the sourcing cluster are also send to the sourcing cluster actor. The volume inputs message will contain the full time series data of the input as well as the metadata of that input.

Deal versions

All deals/deal versions that have a reference to a sourcing cluster are also send to the sourcing cluster. The message contains all the details of the deal version including possible volume or price time series data.

Order versions

All orders/order versions that have a reference to a sourcing cluster are also send to the sourcing cluster. The message contains all the details of the order version including possible volume or price time series data.

Linked order

Sends a message to the sourcing cluster actor whenever a order or deal is linked to an existing order and the sourcing cluster is involved in the parent order.

Initial sourcing cluster config

The message sends the initial configuration from the sourcing cluster to the sourcing cluster actor. This contains the intial configuration like the product type, book id, sourcing cluster key values, agreements on the sourcing cluster, scripts and sourcing product component en element configuration.

Set Process Forecast Responsibility Disabled

Sends a message to the sourcing cluster actor to enable or disable the processing of inputs to its target.

Set Process Open Position Management Disabled

Sends a message to the sourcing cluster actor to enable or disable the processing of open volume in the cluster. If disabled all input will still be processed to calculate a new open position but the cluster will not longer automatically act on this open position.

Sourcing cluster parent set

Send to a sourcing cluster actor to announce that it now has a parent sourcing cluster (actor).

Sourcing cluster child added

Send to a sourcing cluster actor to announce that another sourcing cluster (actor) just became its child.

Sourcing cluster Pricing Agreement Completed

Send to a sourcing cluster actor if a pricing agreement, that is linked to a sourcing cluster, is completed.

Sourcing cluster Sourcing Agreement Completed

Send to a sourcing cluster actor if a sourcing agreement, that is linked to a sourcing cluster, is completed.

Sourcing product component configuration update

Supply Agreement Strategies

Send to a sourcing cluster actor to send it the strategies that have been configured on supply agreements that are linked to sourcing agreements that are linked to the sourcing cluster.

Request rule context

Request the rule context of a sourcing cluster actor. Normally the rule context is created internally in the sourcing cluster actor from its internal state. This is only used for diagnostics of scripts that use the rule context of the sourcing cluster actor.

Diagnostics report request

Request a diagnostics report from a sourcing cluster actor. This is only used for diagnostics and is not used in the normal process.

Sourcing cluster deleted

Send to a sourcing cluster actor to inform it that the sourcing cluster has been deleted

Outputs

Command output

Send commands from the sourcing cluster actor to the CQRS system. It is wrapped in a message so we can use all message mechanics of the actor and to preserve existing transaction boundaries (commands should be send at the end of the message batch).

Position update

Send both the absolute as the relative position of all positions that have changed during the process of a batch of messages

Escalation

Sends a simple text message from the sourcing cluster actor when the sourcing cluster actor want to get the attention of a user.

Diagnostics report

A messages that contains a copy of or a summary of the internal state of the actor. This is only used for diagnostics to check the internal state of an actor.

Rule context output

Contains the rules context that can be used by the user to run scripts with a rule context that contains data from the internal state of the sourcing cluster actor.

3.2 - Book

A book can have actions to run. Everytime a book action is run a book action run is created. A book action run can have multiple attempts.

State diagram

This state diagram shows the flow for a book action run including attempts.

stateDiagram-v2
    RUN: Book run
    state RUN {
        state "Create initial book run" as IBR
        state "Create book run attempt" as CBRA
        state "Book run completed" as BRC
        state "Book run failed" as BRFAILED

        BASG: Book attempt state graph
        state BASG {
            state "Waiting for approval" as WFA
            state "In progress" as IP
            state "Cancelled" as CNL
            state "Completed" as CMPL
            state "Error" as ERR
            state "Manual approval required" as MA

            MF: Message flow
            state MF {
                state "Sending request" as SR
                state "Processing response" as PR
                
                [*] --> SR
                SR --> PR
                SR --> [*]: Request compose failed
                SR --> [*]: Cancelled by user or by related entity
                PR --> [*]
            }

            state approval <<choice>>

            [*] --> MA
            MA --> approval
            approval --> WFA: Start initial attempt with manual approval
            approval --> IP: Start initial attempt without manual approval

            WFA --> IP: Manually approved by user
            WFA --> CNL: Cancelled by user or by related entity

            IP --> CMPL
            IP --> ERR
            IP --> CNL
            IP --> MF: Start sending
            
            MF --> ERR: Response processing failed
            MF --> CNL: Cancelled by user or by related entity
            MF --> CMPL: Response processed

            CMPL --> [*]
            ERR --> [*]
            CNL --> [*]
        }

        [*] --> IBR
        IBR --> CBRA
        CBRA --> BASG
        BRFAILED --> CBRA: Retry book run

        BASG --> BRC: Completed
        BASG --> BRFAILED: Error
        BASG --> BRFAILED: Cancelled

        BRC --> [*]
        BRFAILED --> [*]
    }

    [*] --> RUN
    RUN --> [*]

3.3 - PM Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Book

Aggregate Root: Book

Represents trading books that contain deals, orders, and other trading activities with associated actions and market products.

erDiagram
    "PM.BookActionDetails" {
        uniqueidentifier Id PK
        uniqueidentifier BookActionId FK
        nvarchar Key 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int DetailType 
    }

    "PM.BookActions" {
        uniqueidentifier Id PK
        uniqueidentifier BookId FK
        int BookActionTriggerFlag 
        uniqueidentifier BookProcessor 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit TriggerWhenBookIsSource 
        bit TriggerWhenBookIsTarget 
        int OrderIndex 
        int BookProcessorContextFlag 
        int Interval 
        int IntervalType 
        nvarchar Name 
        bit ManualApprovalRequired 
        bit IsDisabled 
    }

    "PM.BookKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier BookId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.BookMarketProductNamePerLoadTypes" {
        uniqueidentifier Id PK
        uniqueidentifier BookId FK
        nvarchar MarketProductName 
        int LoadType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.Books" {
        uniqueidentifier Id PK
        uniqueidentifier PortfolioId FK
        nvarchar Name 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int BookType 
        uniqueidentifier ProductCustomEnumComponentId FK
        bit Concealed 
        datetimeoffset ActivePeriodStart 
        int ActivePeriodStartType 
        datetimeoffset ActivePeriodEnd 
    }

    "PM.BookActionDetails" }o--|| "PM.BookActions" : "BookActionId"
    "PM.BookActionDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.BookActions" }o--|| "PM.Books" : "BookId"
    "PM.BookActionRuns" }o--|| "PM.BookActions" : "BookActionId"
    "PM.BookKeyValues" }o--|| "PM.Books" : "BookId"
    "PM.BookMarketProductNamePerLoadTypes" }o--|| "PM.Books" : "BookId"
    "PM.Books" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "PM.Portfolios" : "PortfolioId"
    "PM.DealVersions" }o--|| "PM.Books" : "SourceBookId"
    "PM.DealVersions" }o--|| "PM.Books" : "TargetBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "FallbackStrategyBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "SourceBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "TargetBookId"
    "PM.SourcingClusters" }o--|| "PM.Books" : "BookId"
    "PM.TradeSummaries" }o--|| "PM.Books" : "SourceBookId"
    "PM.TradeSummaries" }o--|| "PM.Books" : "TargetBookId"
erDiagram
    "PM.BookActionDetails" {
        uniqueidentifier Id PK
        uniqueidentifier BookActionId FK
        nvarchar Key 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int DetailType 
    }

    "PM.BookActions" {
        uniqueidentifier Id PK
        uniqueidentifier BookId FK
        int BookActionTriggerFlag 
        uniqueidentifier BookProcessor 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit TriggerWhenBookIsSource 
        bit TriggerWhenBookIsTarget 
        int OrderIndex 
        int BookProcessorContextFlag 
        int Interval 
        int IntervalType 
        nvarchar Name 
        bit ManualApprovalRequired 
        bit IsDisabled 
    }

    "PM.BookKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier BookId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.BookMarketProductNamePerLoadTypes" {
        uniqueidentifier Id PK
        uniqueidentifier BookId FK
        nvarchar MarketProductName 
        int LoadType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.Books" {
        uniqueidentifier Id PK
        uniqueidentifier PortfolioId FK
        nvarchar Name 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int BookType 
        uniqueidentifier ProductCustomEnumComponentId FK
        bit Concealed 
        datetimeoffset ActivePeriodStart 
        int ActivePeriodStartType 
        datetimeoffset ActivePeriodEnd 
    }

    "PM.BookActionDetails" }o--|| "PM.BookActions" : "BookActionId"
    "PM.BookActionDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.BookActions" }o--|| "PM.Books" : "BookId"
    "PM.BookActionRuns" }o--|| "PM.BookActions" : "BookActionId"
    "PM.BookKeyValues" }o--|| "PM.Books" : "BookId"
    "PM.BookMarketProductNamePerLoadTypes" }o--|| "PM.Books" : "BookId"
    "PM.Books" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "PM.Portfolios" : "PortfolioId"
    "PM.DealVersions" }o--|| "PM.Books" : "SourceBookId"
    "PM.DealVersions" }o--|| "PM.Books" : "TargetBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "FallbackStrategyBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "SourceBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "TargetBookId"
    "PM.SourcingClusters" }o--|| "PM.Books" : "BookId"
    "PM.TradeSummaries" }o--|| "PM.Books" : "SourceBookId"
    "PM.TradeSummaries" }o--|| "PM.Books" : "TargetBookId"
{
    "definitions":  {
                        "PM.BookMarketProductNamePerLoadTypes":  {
                                                                     "properties":  {
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "BookId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to PM.Books"
                                                                                                   },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "LoadType":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                        "MarketProductName":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "nvarchar"
                                                                                                              },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "PM.Books":  {
                                         "properties":  {
                                                            "Concealed":  {
                                                                              "type":  "boolean",
                                                                              "description":  "bit"
                                                                          },
                                                            "Id":  {
                                                                       "format":  "uuid",
                                                                       "description":  "uniqueidentifier",
                                                                       "type":  "string"
                                                                   },
                                                            "BookType":  {
                                                                             "type":  "integer",
                                                                             "description":  "int"
                                                                         },
                                                            "EntityUpdatedAuthToken":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                            "Name":  {
                                                                         "type":  "string",
                                                                         "description":  "nvarchar"
                                                                     },
                                                            "EntityCreatedAuthToken":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                            "ActivePeriodEnd":  {
                                                                                    "format":  "date-time",
                                                                                    "description":  "datetimeoffset",
                                                                                    "type":  "string"
                                                                                },
                                                            "EntityUpdatedDateTime":  {
                                                                                          "format":  "date-time",
                                                                                          "description":  "datetimeoffset",
                                                                                          "type":  "string"
                                                                                      },
                                                            "ActivePeriodStart":  {
                                                                                      "format":  "date-time",
                                                                                      "description":  "datetimeoffset",
                                                                                      "type":  "string"
                                                                                  },
                                                            "Tenant":  {
                                                                           "format":  "uuid",
                                                                           "description":  "uniqueidentifier",
                                                                           "type":  "string"
                                                                       },
                                                            "InternalReference":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                            "ExternalReference":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                            "PortfolioId":  {
                                                                                "type":  "string",
                                                                                "description":  "FK to PM.Portfolios"
                                                                            },
                                                            "EntityCreatedDateTime":  {
                                                                                          "format":  "date-time",
                                                                                          "description":  "datetimeoffset",
                                                                                          "type":  "string"
                                                                                      },
                                                            "ActivePeriodStartType":  {
                                                                                          "type":  "integer",
                                                                                          "description":  "int"
                                                                                      },
                                                            "ProductCustomEnumComponentId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to PM.CustomEnumComponents"
                                                                                             }
                                                        },
                                         "type":  "object"
                                     },
                        "PM.BookActions":  {
                                               "properties":  {
                                                                  "BookProcessor":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                  "Id":  {
                                                                             "format":  "uuid",
                                                                             "description":  "uniqueidentifier",
                                                                             "type":  "string"
                                                                         },
                                                                  "EntityUpdatedAuthToken":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                  "Concealed":  {
                                                                                    "type":  "boolean",
                                                                                    "description":  "bit"
                                                                                },
                                                                  "EntityCreatedAuthToken":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                  "IntervalType":  {
                                                                                       "type":  "integer",
                                                                                       "description":  "int"
                                                                                   },
                                                                  "Name":  {
                                                                               "type":  "string",
                                                                               "description":  "nvarchar"
                                                                           },
                                                                  "EntityUpdatedDateTime":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                  "ManualApprovalRequired":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                  "OrderIndex":  {
                                                                                     "type":  "integer",
                                                                                     "description":  "int"
                                                                                 },
                                                                  "BookActionTriggerFlag":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                  "Tenant":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             },
                                                                  "Interval":  {
                                                                                   "type":  "integer",
                                                                                   "description":  "int"
                                                                               },
                                                                  "IsDisabled":  {
                                                                                     "type":  "boolean",
                                                                                     "description":  "bit"
                                                                                 },
                                                                  "EntityCreatedDateTime":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                  "BookId":  {
                                                                                 "type":  "string",
                                                                                 "description":  "FK to PM.Books"
                                                                             },
                                                                  "BookProcessorContextFlag":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                  "TriggerWhenBookIsTarget":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                  "TriggerWhenBookIsSource":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              }
                                                              },
                                               "type":  "object"
                                           },
                        "PM.BookActionDetails":  {
                                                     "properties":  {
                                                                        "BookActionId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to PM.BookActions"
                                                                                         },
                                                                        "DetailType":  {
                                                                                           "type":  "integer",
                                                                                           "description":  "int"
                                                                                       },
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "Value":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                        "Key":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "FormatType":  {
                                                                                           "type":  "integer",
                                                                                           "description":  "int"
                                                                                       },
                                                                        "CustomEnumId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to PM.CustomEnums"
                                                                                         }
                                                                    },
                                                     "type":  "object"
                                                 },
                        "PM.BookKeyValues":  {
                                                 "properties":  {
                                                                    "Concealed":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "BookId":  {
                                                                                   "type":  "string",
                                                                                   "description":  "FK to PM.Books"
                                                                               },
                                                                    "Id":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                    "Key":  {
                                                                                "type":  "string",
                                                                                "description":  "nvarchar"
                                                                            },
                                                                    "EntityCreatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "EntityUpdatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Value":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                                    "EntityUpdatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "EntityCreatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "Tenant":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               }
                                                                },
                                                 "type":  "object"
                                             }
                    },
    "title":  "PM.Book",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Book Action Run

Aggregate Root: BookActionRun

Represents execution runs of book actions with detailed tracking and results.

erDiagram
    "PM.BookActionRunAttempts" {
        uniqueidentifier Id PK
        uniqueidentifier BookActionRunId FK
        uniqueidentifier RequestDocumentId 
        uniqueidentifier ResponseDocumentId 
        nvarchar ErrorMessage 
        int BookActionRunAttemptStage 
        uniqueidentifier TriggererAuthToken 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.BookActionRuns" {
        uniqueidentifier Id PK
        uniqueidentifier BookActionId FK
        int BookActionTriggerType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier DealVersionId 
        uniqueidentifier OrderVersionId 
    }

    "PM.BookActionRunAttempts" }o--|| "PM.BookActionRuns" : "BookActionRunId"
    "PM.BookActionRuns" }o--|| "PM.BookActions" : "BookActionId"
erDiagram
    "PM.BookActionRunAttempts" {
        uniqueidentifier Id PK
        uniqueidentifier BookActionRunId FK
        uniqueidentifier RequestDocumentId 
        uniqueidentifier ResponseDocumentId 
        nvarchar ErrorMessage 
        int BookActionRunAttemptStage 
        uniqueidentifier TriggererAuthToken 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.BookActionRuns" {
        uniqueidentifier Id PK
        uniqueidentifier BookActionId FK
        int BookActionTriggerType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier DealVersionId 
        uniqueidentifier OrderVersionId 
    }

    "PM.BookActionRunAttempts" }o--|| "PM.BookActionRuns" : "BookActionRunId"
    "PM.BookActionRuns" }o--|| "PM.BookActions" : "BookActionId"
{
    "definitions":  {
                        "PM.BookActionRunAttempts":  {
                                                         "properties":  {
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "TriggererAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "BookActionRunAttemptStage":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                            "ResponseDocumentId":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                            "RequestDocumentId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "ErrorMessage":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                            "BookActionRunId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to PM.BookActionRuns"
                                                                                                }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "PM.BookActionRuns":  {
                                                  "properties":  {
                                                                     "Concealed":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "bit"
                                                                                   },
                                                                     "EntityUpdatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Id":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                     "OrderVersionId":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                     "DealVersionId":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                     "EntityCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "EntityUpdatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "BookActionId":  {
                                                                                          "type":  "string",
                                                                                          "description":  "FK to PM.BookActions"
                                                                                      },
                                                                     "BookActionTriggerType":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                     "EntityCreatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Tenant":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                }
                                                                 },
                                                  "type":  "object"
                                              }
                    },
    "title":  "PM.BookActionRun",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Commodity Type

Aggregate Root: CommodityType

Defines different types of commodities with their associated key values and configurations.

erDiagram
    "PM.CommodityTypes" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar ShortName 
        nvarchar ColorCode 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersions" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.OrderVersions" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.FixationRequests" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.TradeSummaries" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
erDiagram
    "PM.CommodityTypes" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar ShortName 
        nvarchar ColorCode 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersions" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.OrderVersions" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.FixationRequests" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.TradeSummaries" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
{
    "definitions":  {
                        "PM.CommodityTypes":  {
                                                  "properties":  {
                                                                     "Concealed":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "bit"
                                                                                   },
                                                                     "ShortName":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                     "Id":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                     "EntityUpdatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "EntityUpdatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "EntityCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "Name":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                                     "ColorCode":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                     "EntityCreatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Tenant":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                }
                                                                 },
                                                  "type":  "object"
                                              }
                    },
    "title":  "PM.CommodityType",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Deal

Aggregate Root: Deal

Represents trading deals with their details, metering points, and associated sourcing agreements.

erDiagram
    "PM.DealConfirmationPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier DealConfirmationId FK
        uniqueidentifier DealVersionPeriodId FK
        nvarchar ExternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int Status 
    }

    "PM.DealConfirmationStatus" {
        uniqueidentifier Id PK
        uniqueidentifier DealConfirmationId FK
        int Status 
        datetimeoffset Timestamp 
        uniqueidentifier DocumentId 
        nvarchar ErrorMessage 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealConfirmations" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionId FK
        nvarchar ExternalReference 
        nvarchar CorrelationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit ConfirmationPerPeriod 
    }

    "PM.DealVersionDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier DealVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersionMarkToMarketReports" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionId FK
        decimal MarkToMarket 
        datetimeoffset DeterminedOn 
        nvarchar PriceForwardCurveTimeSeriesCode 
        nvarchar PriceForwardCurveDataSlotReference 
        nvarchar PriceForwardCurveRevision 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersionPeriodSurcharges" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionPeriodId FK
        nvarchar Name 
        decimal Surcharge 
        int SurchargeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersionPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionId FK
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        decimal ContractedCapacity 
        decimal Price 
        int PeriodHours 
        decimal TotalNotionalContractQuantity 
        decimal ContractedAmount 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        decimal IndicativePrice 
    }

    "PM.DealVersion_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersions" {
        uniqueidentifier Id PK
        uniqueidentifier DealId FK
        int VersionNumber 
        uniqueidentifier TransactionId 
        datetimeoffset TransactionDateTimeOffset 
        int SettlementMethod 
        bit VoiceBrokered 
        datetimeoffset TerminationDate 
        uniqueidentifier CommodityTypeId FK
        decimal ContractedCapacity 
        int ContractedCapacityUnit 
        decimal ContractedPrice 
        int PriceUnit 
        nvarchar Comment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit IsLatestVersion 
        nvarchar ShapeTimeSeriesCode 
        nvarchar ShapeTimeSeriesDataSlotReference 
        nvarchar ShapeTimeSeriesRevision 
        uniqueidentifier SourceBookId FK
        int SourceTradeDirection 
        int SourceOrigin 
        uniqueidentifier TargetBookId FK
        int TargetTradeDirection 
        int TradeContractType 
        int LoadType 
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        datetimeoffset LastTradingMoment 
        int PeriodHours 
        decimal TotalNotionalContractQuantity 
        int TotalNotionalContractQuantityUnit 
        decimal ContractedAmount 
        uniqueidentifier SourceMarketPartyId 
        uniqueidentifier TargetMarketPartyId 
        bit ConfirmedByOrder 
        decimal Surcharge 
        int SurchargeUnit 
        bit Concealed 
        nvarchar PriceTimeSeriesCode 
        nvarchar PriceTimeSeriesDataSlotReference 
        nvarchar PriceTimeSeriesRevision 
        uniqueidentifier SourcingProductElementId FK
        uniqueidentifier SourceSourcingClusterId FK
        uniqueidentifier TargetSourcingClusterId FK
        int PeriodDivisionType 
        uniqueidentifier CreatorSourcingClusterId 
        uniqueidentifier ChainId 
        uniqueidentifier CreatorUserId 
        uniqueidentifier CreatorBookActionId 
        uniqueidentifier CreatorOrderId 
        int PriceTimeSeriesSnapshotTimestamp 
        int ShapeTimeSeriesSnapshotTimestamp 
        nvarchar IndicativePriceTimeSeriesCode 
        nvarchar IndicativePriceTimeSeriesDataSlotReference 
        nvarchar IndicativePriceTimeSeriesRevision 
        int IndicativePriceTimeSeriesSnapshotTimestamp 
        int IndicativePriceUnit 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        uniqueidentifier PriceForwardCurveGroupId 
        nvarchar DeliveryLocationDescription 
        bit ProcessedInPositions 
    }

    "PM.Deals" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier LatestVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier LinkedOrderId FK
        bit Concealed 
        nvarchar LinkedTradeReference 
        uniqueidentifier FixationRequestId FK
        uniqueidentifier FixationSubRequestId FK
        datetimeoffset ExternalUpdateTimestamp 
        nvarchar CounterReason 
        uniqueidentifier CounteredByCounterDealId 
        uniqueidentifier CounteredOriginalDealId 
        bit CounteringCompleted 
    }

    "PM.DealConfirmationPeriods" }o--|| "PM.DealConfirmations" : "DealConfirmationId"
    "PM.DealConfirmationPeriods" }o--|| "PM.DealVersionPeriods" : "DealVersionPeriodId"
    "PM.DealConfirmationStatus" }o--|| "PM.DealConfirmations" : "DealConfirmationId"
    "PM.DealConfirmations" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.DealVersionDetails" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.DealVersionMarkToMarketReports" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.DealVersionPeriodSurcharges" }o--|| "PM.DealVersionPeriods" : "DealVersionPeriodId"
    "PM.DealVersionPeriods" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.DealVersion_CategoryLabel" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.Deals" }o--|| "PM.DealVersions" : "LatestVersionId"
    "PM.DealVersions" }o--|| "PM.Books" : "SourceBookId"
    "PM.DealVersions" }o--|| "PM.Books" : "TargetBookId"
    "PM.DealVersions" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.DealVersions" }o--|| "PM.Deals" : "DealId"
    "PM.DealVersions" }o--|| "PM.SourcingClusters" : "SourceSourcingClusterId"
    "PM.DealVersions" }o--|| "PM.SourcingClusters" : "TargetSourcingClusterId"
    "PM.DealVersions" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.LinkedChildDealTrackers" }o--|| "PM.DealVersions" : "FulfilledChildDealVersionId"
    "PM.Deals" }o--|| "PM.Orders" : "LinkedOrderId"
    "PM.Deals" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.Deals" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
erDiagram
    "PM.DealConfirmationPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier DealConfirmationId FK
        uniqueidentifier DealVersionPeriodId FK
        nvarchar ExternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int Status 
    }

    "PM.DealConfirmationStatus" {
        uniqueidentifier Id PK
        uniqueidentifier DealConfirmationId FK
        int Status 
        datetimeoffset Timestamp 
        uniqueidentifier DocumentId 
        nvarchar ErrorMessage 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealConfirmations" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionId FK
        nvarchar ExternalReference 
        nvarchar CorrelationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        bit ConfirmationPerPeriod 
    }

    "PM.DealVersionDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier DealVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersionMarkToMarketReports" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionId FK
        decimal MarkToMarket 
        datetimeoffset DeterminedOn 
        nvarchar PriceForwardCurveTimeSeriesCode 
        nvarchar PriceForwardCurveDataSlotReference 
        nvarchar PriceForwardCurveRevision 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersionPeriodSurcharges" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionPeriodId FK
        nvarchar Name 
        decimal Surcharge 
        int SurchargeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersionPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionId FK
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        decimal ContractedCapacity 
        decimal Price 
        int PeriodHours 
        decimal TotalNotionalContractQuantity 
        decimal ContractedAmount 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        decimal IndicativePrice 
    }

    "PM.DealVersion_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier DealVersionId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.DealVersions" {
        uniqueidentifier Id PK
        uniqueidentifier DealId FK
        int VersionNumber 
        uniqueidentifier TransactionId 
        datetimeoffset TransactionDateTimeOffset 
        int SettlementMethod 
        bit VoiceBrokered 
        datetimeoffset TerminationDate 
        uniqueidentifier CommodityTypeId FK
        decimal ContractedCapacity 
        int ContractedCapacityUnit 
        decimal ContractedPrice 
        int PriceUnit 
        nvarchar Comment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit IsLatestVersion 
        nvarchar ShapeTimeSeriesCode 
        nvarchar ShapeTimeSeriesDataSlotReference 
        nvarchar ShapeTimeSeriesRevision 
        uniqueidentifier SourceBookId FK
        int SourceTradeDirection 
        int SourceOrigin 
        uniqueidentifier TargetBookId FK
        int TargetTradeDirection 
        int TradeContractType 
        int LoadType 
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        datetimeoffset LastTradingMoment 
        int PeriodHours 
        decimal TotalNotionalContractQuantity 
        int TotalNotionalContractQuantityUnit 
        decimal ContractedAmount 
        uniqueidentifier SourceMarketPartyId 
        uniqueidentifier TargetMarketPartyId 
        bit ConfirmedByOrder 
        decimal Surcharge 
        int SurchargeUnit 
        bit Concealed 
        nvarchar PriceTimeSeriesCode 
        nvarchar PriceTimeSeriesDataSlotReference 
        nvarchar PriceTimeSeriesRevision 
        uniqueidentifier SourcingProductElementId FK
        uniqueidentifier SourceSourcingClusterId FK
        uniqueidentifier TargetSourcingClusterId FK
        int PeriodDivisionType 
        uniqueidentifier CreatorSourcingClusterId 
        uniqueidentifier ChainId 
        uniqueidentifier CreatorUserId 
        uniqueidentifier CreatorBookActionId 
        uniqueidentifier CreatorOrderId 
        int PriceTimeSeriesSnapshotTimestamp 
        int ShapeTimeSeriesSnapshotTimestamp 
        nvarchar IndicativePriceTimeSeriesCode 
        nvarchar IndicativePriceTimeSeriesDataSlotReference 
        nvarchar IndicativePriceTimeSeriesRevision 
        int IndicativePriceTimeSeriesSnapshotTimestamp 
        int IndicativePriceUnit 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        uniqueidentifier PriceForwardCurveGroupId 
        nvarchar DeliveryLocationDescription 
        bit ProcessedInPositions 
    }

    "PM.Deals" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier LatestVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier LinkedOrderId FK
        bit Concealed 
        nvarchar LinkedTradeReference 
        uniqueidentifier FixationRequestId FK
        uniqueidentifier FixationSubRequestId FK
        datetimeoffset ExternalUpdateTimestamp 
        nvarchar CounterReason 
        uniqueidentifier CounteredByCounterDealId 
        uniqueidentifier CounteredOriginalDealId 
        bit CounteringCompleted 
    }

    "PM.DealConfirmationPeriods" }o--|| "PM.DealConfirmations" : "DealConfirmationId"
    "PM.DealConfirmationPeriods" }o--|| "PM.DealVersionPeriods" : "DealVersionPeriodId"
    "PM.DealConfirmationStatus" }o--|| "PM.DealConfirmations" : "DealConfirmationId"
    "PM.DealConfirmations" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.DealVersionDetails" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.DealVersionMarkToMarketReports" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.DealVersionPeriodSurcharges" }o--|| "PM.DealVersionPeriods" : "DealVersionPeriodId"
    "PM.DealVersionPeriods" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.DealVersion_CategoryLabel" }o--|| "PM.DealVersions" : "DealVersionId"
    "PM.Deals" }o--|| "PM.DealVersions" : "LatestVersionId"
    "PM.DealVersions" }o--|| "PM.Books" : "SourceBookId"
    "PM.DealVersions" }o--|| "PM.Books" : "TargetBookId"
    "PM.DealVersions" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.DealVersions" }o--|| "PM.Deals" : "DealId"
    "PM.DealVersions" }o--|| "PM.SourcingClusters" : "SourceSourcingClusterId"
    "PM.DealVersions" }o--|| "PM.SourcingClusters" : "TargetSourcingClusterId"
    "PM.DealVersions" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.LinkedChildDealTrackers" }o--|| "PM.DealVersions" : "FulfilledChildDealVersionId"
    "PM.Deals" }o--|| "PM.Orders" : "LinkedOrderId"
    "PM.Deals" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.Deals" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
{
    "definitions":  {
                        "PM.DealVersionPeriods":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "DeliveryPeriodEnd":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                         "DealVersionId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to PM.DealVersions"
                                                                                           },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "DeliveryPeriodStart":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "IndicativePrice":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "decimal"
                                                                                             },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "ContractedAmount":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "decimal"
                                                                                              },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "TotalNotionalContractQuantity":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "decimal"
                                                                                                           },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                         "ContractedCapacity":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "decimal"
                                                                                                },
                                                                         "PeriodHours":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                         "Price":  {
                                                                                       "type":  "string",
                                                                                       "description":  "decimal"
                                                                                   },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "PM.DealConfirmationStatus":  {
                                                          "properties":  {
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "DocumentId":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                             "ErrorMessage":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              },
                                                                             "Status":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                             "DealConfirmationId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to PM.DealConfirmations"
                                                                                                    },
                                                                             "Timestamp":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           }
                                                                         },
                                                          "type":  "object"
                                                      },
                        "PM.DealVersion_CategoryLabel":  {
                                                             "properties":  {
                                                                                "DealVersionId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to PM.DealVersions"
                                                                                                  },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "CategoryLabelId":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "CategoryId":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "PM.DealConfirmationPeriods":  {
                                                           "properties":  {
                                                                              "DealVersionPeriodId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to PM.DealVersionPeriods"
                                                                                                      },
                                                                              "ExternalReference":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "DealConfirmationId":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "FK to PM.DealConfirmations"
                                                                                                     },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "Status":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "PM.DealVersionMarkToMarketReports":  {
                                                                  "properties":  {
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "PriceForwardCurveDataSlotReference":  {
                                                                                                                                "type":  "string",
                                                                                                                                "description":  "nvarchar"
                                                                                                                            },
                                                                                     "PriceForwardCurveTimeSeriesCode":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "nvarchar"
                                                                                                                         },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "MarkToMarket":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "decimal"
                                                                                                      },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "PriceForwardCurveRevision":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "nvarchar"
                                                                                                                   },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "DealVersionId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to PM.DealVersions"
                                                                                                       },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "DeterminedOn":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "PM.Deals":  {
                                         "properties":  {
                                                            "CounterReason":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                            "Id":  {
                                                                       "format":  "uuid",
                                                                       "description":  "uniqueidentifier",
                                                                       "type":  "string"
                                                                   },
                                                            "EntityUpdatedAuthToken":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                            "Concealed":  {
                                                                              "type":  "boolean",
                                                                              "description":  "bit"
                                                                          },
                                                            "CounteringCompleted":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                            "EntityCreatedAuthToken":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                            "FixationSubRequestId":  {
                                                                                         "type":  "string",
                                                                                         "description":  "FK to PM.FixationSubRequests"
                                                                                     },
                                                            "LatestVersionId":  {
                                                                                    "type":  "string",
                                                                                    "description":  "FK to PM.DealVersions"
                                                                                },
                                                            "EntityUpdatedDateTime":  {
                                                                                          "format":  "date-time",
                                                                                          "description":  "datetimeoffset",
                                                                                          "type":  "string"
                                                                                      },
                                                            "ExternalUpdateTimestamp":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                            "LinkedTradeReference":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                            "ExternalReference":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                            "Tenant":  {
                                                                           "format":  "uuid",
                                                                           "description":  "uniqueidentifier",
                                                                           "type":  "string"
                                                                       },
                                                            "InternalReference":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                            "LinkedOrderId":  {
                                                                                  "type":  "string",
                                                                                  "description":  "FK to PM.Orders"
                                                                              },
                                                            "CounteredOriginalDealId":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                            "CounteredByCounterDealId":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                            "EntityCreatedDateTime":  {
                                                                                          "format":  "date-time",
                                                                                          "description":  "datetimeoffset",
                                                                                          "type":  "string"
                                                                                      },
                                                            "FixationRequestId":  {
                                                                                      "type":  "string",
                                                                                      "description":  "FK to PM.FixationRequests"
                                                                                  }
                                                        },
                                         "type":  "object"
                                     },
                        "PM.DealVersionPeriodSurcharges":  {
                                                               "properties":  {
                                                                                  "DealVersionPeriodId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to PM.DealVersionPeriods"
                                                                                                          },
                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "Id":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                                  "SurchargeUnit":  {
                                                                                                        "type":  "integer",
                                                                                                        "description":  "int"
                                                                                                    },
                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "Concealed":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                                  "EntityCreatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "Name":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "Surcharge":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "decimal"
                                                                                                },
                                                                                  "Tenant":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             }
                                                                              },
                                                               "type":  "object"
                                                           },
                        "PM.DealVersions":  {
                                                "properties":  {
                                                                   "IndicativePriceTimeSeriesDataSlotReference":  {
                                                                                                                      "type":  "string",
                                                                                                                      "description":  "nvarchar"
                                                                                                                  },
                                                                   "VersionNumber":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                   "SourceTradeDirection":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                   "SourceBookId":  {
                                                                                        "type":  "string",
                                                                                        "description":  "FK to PM.Books"
                                                                                    },
                                                                   "CreatorSourcingClusterId":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                   "TerminationDate":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                                   "DealId":  {
                                                                                  "type":  "string",
                                                                                  "description":  "FK to PM.Deals"
                                                                              },
                                                                   "ShapeTimeSeriesDataSlotReference":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                   "IndicativePriceUnit":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                   "DeliveryPeriodEnd":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                                   "IndicativePriceTimeSeriesRevision":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                   "ChainId":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                   "ContractedCapacityUnit":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                   "PriceTimeSeriesRevision":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                   "TransactionDateTimeOffset":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                   "Concealed":  {
                                                                                     "type":  "boolean",
                                                                                     "description":  "bit"
                                                                                 },
                                                                   "ContractedPrice":  {
                                                                                           "type":  "string",
                                                                                           "description":  "decimal"
                                                                                       },
                                                                   "TargetTradeDirection":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                   "SourcingProductElementId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to PM.SourcingProductElements"
                                                                                                },
                                                                   "LastTradingMoment":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                                   "TotalNotionalContractQuantityUnit":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                   "TargetMarketPartyId":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                   "TradeContractType":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                   "Comment":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                                   "SourceOrigin":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                   "PriceIndexReferenceDateTimeOffset":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                   "ShapeTimeSeriesSnapshotTimestamp":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                   "CreatorOrderId":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                   "EntityCreatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "PriceTimeSeriesDataSlotReference":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                   "Tenant":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                   "TransactionId":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                   "Id":  {
                                                                              "format":  "uuid",
                                                                              "description":  "uniqueidentifier",
                                                                              "type":  "string"
                                                                          },
                                                                   "SourceMarketPartyId":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                   "SettlementMethod":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                   "PeriodHours":  {
                                                                                       "type":  "integer",
                                                                                       "description":  "int"
                                                                                   },
                                                                   "ConfirmedByOrder":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                   "CreatorBookActionId":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                   "IndicativePriceTimeSeriesCode":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                   "ShapeTimeSeriesCode":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                   "EntityUpdatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "CreatorUserId":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                   "PriceTimeSeriesCode":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                   "Surcharge":  {
                                                                                     "type":  "string",
                                                                                     "description":  "decimal"
                                                                                 },
                                                                   "SurchargeUnit":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                   "TargetSourcingClusterId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to PM.SourcingClusters"
                                                                                               },
                                                                   "EntityUpdatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "IsLatestVersion":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                   "TotalNotionalContractQuantity":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "decimal"
                                                                                                     },
                                                                   "LoadType":  {
                                                                                    "type":  "integer",
                                                                                    "description":  "int"
                                                                                },
                                                                   "VoiceBrokered":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                   "PeriodDivisionType":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                   "PriceUnit":  {
                                                                                     "type":  "integer",
                                                                                     "description":  "int"
                                                                                 },
                                                                   "DeliveryLocationDescription":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                   "ProcessedInPositions":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                   "DeliveryPeriodStart":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                   "ContractedAmount":  {
                                                                                            "type":  "string",
                                                                                            "description":  "decimal"
                                                                                        },
                                                                   "ShapeTimeSeriesRevision":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                   "ContractedCapacity":  {
                                                                                              "type":  "string",
                                                                                              "description":  "decimal"
                                                                                          },
                                                                   "TargetBookId":  {
                                                                                        "type":  "string",
                                                                                        "description":  "FK to PM.Books"
                                                                                    },
                                                                   "CommodityTypeId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to PM.CommodityTypes"
                                                                                       },
                                                                   "PriceForwardCurveGroupId":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                   "SourceSourcingClusterId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to PM.SourcingClusters"
                                                                                               },
                                                                   "EntityCreatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "IndicativePriceTimeSeriesSnapshotTimestamp":  {
                                                                                                                      "type":  "integer",
                                                                                                                      "description":  "int"
                                                                                                                  },
                                                                   "PriceTimeSeriesSnapshotTimestamp":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        }
                                                               },
                                                "type":  "object"
                                            },
                        "PM.DealVersionDetails":  {
                                                      "properties":  {
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Value":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                         "Key":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                         "DealVersionId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to PM.DealVersions"
                                                                                           },
                                                                         "FormatType":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                         "CustomEnumId":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "PM.DealConfirmations":  {
                                                     "properties":  {
                                                                        "DealVersionId":  {
                                                                                              "type":  "string",
                                                                                              "description":  "FK to PM.DealVersions"
                                                                                          },
                                                                        "ExternalReference":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              },
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "CorrelationId":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                        "ConfirmationPerPeriod":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   }
                                                                    },
                                                     "type":  "object"
                                                 }
                    },
    "title":  "PM.Deal",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Fixation Request

Aggregate Root: FixationRequest

Represents requests for price fixation with associated details and metering points.

erDiagram
    "PM.FixationRequestDetails" {
        uniqueidentifier Id PK
        uniqueidentifier FixationRequestId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationRequest_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier FixationRequestId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationRequests" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        datetimeoffset ReceivedTimestamp 
        datetimeoffset ExternalTimestamp 
        uniqueidentifier DocumentId 
        int Status 
        nvarchar StatusReason 
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier PricingAgreementId 
        uniqueidentifier SourcingAgreementId 
        uniqueidentifier SupplyAgreementId FK
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        uniqueidentifier CommodityTypeId FK
        int LoadType 
        decimal Volume 
        int VolumeUnit 
        decimal Capacity 
        int CapacityUnit 
        decimal Percentage 
        decimal Price 
        int PriceUnit 
        uniqueidentifier PriceForwardCurveGroupId 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        int PriceReferenceMoment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier FixationQuoteId 
        decimal TargetPercentage 
        int TradeDirection 
    }

    "PM.FixationSubRequestDetails" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubRequestId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationSubRequestPeriodSurcharges" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubRequestPeriodId FK
        nvarchar Name 
        decimal Surcharge 
        int SurchargeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationSubRequestPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubRequestId FK
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        decimal Volume 
        int VolumeUnit 
        decimal Capacity 
        int CapacityUnit 
        decimal Percentage 
        decimal Price 
        int PriceUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        decimal TargetPercentage 
    }

    "PM.FixationSubRequestSurcharges" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubRequestId FK
        nvarchar Name 
        decimal Surcharge 
        int SurchargeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationSubRequests" {
        uniqueidentifier Id PK
        uniqueidentifier FixationRequestId FK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        int LoadType 
        decimal Volume 
        int VolumeUnit 
        decimal Capacity 
        int CapacityUnit 
        decimal Percentage 
        decimal Price 
        int PriceUnit 
        uniqueidentifier PriceForwardCurveGroupId 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        int PriceReferenceMoment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset DeliveryPeriodEnd 
        datetimeoffset DeliveryPeriodStart 
        decimal TargetPercentage 
        int TradeDirection 
    }

    "PM.FixationRequestDetails" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.FixationRequest_CategoryLabel" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.FixationRequests" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.FixationRequests" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.FixationRequests" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.FixationSubRequests" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.Deals" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.Orders" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.TradeSummaries" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.FixationSubRequestDetails" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.FixationSubRequestPeriodSurcharges" }o--|| "PM.FixationSubRequestPeriods" : "FixationSubRequestPeriodId"
    "PM.FixationSubRequestPeriods" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.FixationSubRequestSurcharges" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.Deals" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.Orders" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.TradeSummaries" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
erDiagram
    "PM.FixationRequestDetails" {
        uniqueidentifier Id PK
        uniqueidentifier FixationRequestId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationRequest_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier FixationRequestId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationRequests" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        datetimeoffset ReceivedTimestamp 
        datetimeoffset ExternalTimestamp 
        uniqueidentifier DocumentId 
        int Status 
        nvarchar StatusReason 
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier PricingAgreementId 
        uniqueidentifier SourcingAgreementId 
        uniqueidentifier SupplyAgreementId FK
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        uniqueidentifier CommodityTypeId FK
        int LoadType 
        decimal Volume 
        int VolumeUnit 
        decimal Capacity 
        int CapacityUnit 
        decimal Percentage 
        decimal Price 
        int PriceUnit 
        uniqueidentifier PriceForwardCurveGroupId 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        int PriceReferenceMoment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier FixationQuoteId 
        decimal TargetPercentage 
        int TradeDirection 
    }

    "PM.FixationSubRequestDetails" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubRequestId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationSubRequestPeriodSurcharges" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubRequestPeriodId FK
        nvarchar Name 
        decimal Surcharge 
        int SurchargeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationSubRequestPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubRequestId FK
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        decimal Volume 
        int VolumeUnit 
        decimal Capacity 
        int CapacityUnit 
        decimal Percentage 
        decimal Price 
        int PriceUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        decimal TargetPercentage 
    }

    "PM.FixationSubRequestSurcharges" {
        uniqueidentifier Id PK
        uniqueidentifier FixationSubRequestId FK
        nvarchar Name 
        decimal Surcharge 
        int SurchargeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.FixationSubRequests" {
        uniqueidentifier Id PK
        uniqueidentifier FixationRequestId FK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        int LoadType 
        decimal Volume 
        int VolumeUnit 
        decimal Capacity 
        int CapacityUnit 
        decimal Percentage 
        decimal Price 
        int PriceUnit 
        uniqueidentifier PriceForwardCurveGroupId 
        datetimeoffset PriceIndexReferenceDateTimeOffset 
        int PriceReferenceMoment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset DeliveryPeriodEnd 
        datetimeoffset DeliveryPeriodStart 
        decimal TargetPercentage 
        int TradeDirection 
    }

    "PM.FixationRequestDetails" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.FixationRequest_CategoryLabel" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.FixationRequests" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.FixationRequests" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.FixationRequests" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.FixationSubRequests" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.Deals" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.Orders" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.TradeSummaries" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.FixationSubRequestDetails" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.FixationSubRequestPeriodSurcharges" }o--|| "PM.FixationSubRequestPeriods" : "FixationSubRequestPeriodId"
    "PM.FixationSubRequestPeriods" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.FixationSubRequestSurcharges" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.Deals" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.Orders" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.TradeSummaries" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
{
    "definitions":  {
                        "PM.FixationSubRequestPeriods":  {
                                                             "properties":  {
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "DeliveryPeriodStart":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                                "VolumeUnit":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Percentage":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "decimal"
                                                                                               },
                                                                                "FixationSubRequestId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to PM.FixationSubRequests"
                                                                                                         },
                                                                                "PriceUnit":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "TargetPercentage":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "decimal"
                                                                                                     },
                                                                                "DeliveryPeriodEnd":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                "Capacity":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "decimal"
                                                                                             },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "Price":  {
                                                                                              "type":  "string",
                                                                                              "description":  "decimal"
                                                                                          },
                                                                                "Volume":  {
                                                                                               "type":  "string",
                                                                                               "description":  "decimal"
                                                                                           },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "CapacityUnit":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "PM.FixationRequests":  {
                                                    "properties":  {
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                       "PricingAgreementId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                       "StatusReason":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "InternalReference":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "DocumentId":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                       "VolumeUnit":  {
                                                                                          "type":  "integer",
                                                                                          "description":  "int"
                                                                                      },
                                                                       "PriceUnit":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                       "PriceForwardCurveGroupId":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                       "Capacity":  {
                                                                                        "type":  "string",
                                                                                        "description":  "decimal"
                                                                                    },
                                                                       "LoadType":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                       "DeliveryPeriodStart":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "SupplyAgreementId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to PM.SupplyAgreements"
                                                                                             },
                                                                       "SourcingAgreementId":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "CapacityUnit":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                       "SourcingClusterId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to PM.SourcingClusters"
                                                                                             },
                                                                       "ReceivedTimestamp":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                       "Volume":  {
                                                                                      "type":  "string",
                                                                                      "description":  "decimal"
                                                                                  },
                                                                       "Status":  {
                                                                                      "type":  "integer",
                                                                                      "description":  "int"
                                                                                  },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "ExternalReference":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                       "PriceReferenceMoment":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                       "Percentage":  {
                                                                                          "type":  "string",
                                                                                          "description":  "decimal"
                                                                                      },
                                                                       "TargetPercentage":  {
                                                                                                "type":  "string",
                                                                                                "description":  "decimal"
                                                                                            },
                                                                       "TradeDirection":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                       "PriceIndexReferenceDateTimeOffset":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                       "CommodityTypeId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to PM.CommodityTypes"
                                                                                           },
                                                                       "FixationQuoteId":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "ExternalTimestamp":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                       "Price":  {
                                                                                     "type":  "string",
                                                                                     "description":  "decimal"
                                                                                 },
                                                                       "DeliveryPeriodEnd":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             }
                                                                   },
                                                    "type":  "object"
                                                },
                        "PM.FixationSubRequests":  {
                                                       "properties":  {
                                                                          "TradeDirection":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "VolumeUnit":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Percentage":  {
                                                                                             "type":  "string",
                                                                                             "description":  "decimal"
                                                                                         },
                                                                          "TargetPercentage":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "decimal"
                                                                                               },
                                                                          "LoadType":  {
                                                                                           "type":  "integer",
                                                                                           "description":  "int"
                                                                                       },
                                                                          "DeliveryPeriodStart":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                          "PriceUnit":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "DeliveryPeriodEnd":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                          "Capacity":  {
                                                                                           "type":  "string",
                                                                                           "description":  "decimal"
                                                                                       },
                                                                          "ExternalReference":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                          "PriceIndexReferenceDateTimeOffset":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                          "InternalReference":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                          "Price":  {
                                                                                        "type":  "string",
                                                                                        "description":  "decimal"
                                                                                    },
                                                                          "PriceReferenceMoment":  {
                                                                                                       "type":  "integer",
                                                                                                       "description":  "int"
                                                                                                   },
                                                                          "Volume":  {
                                                                                         "type":  "string",
                                                                                         "description":  "decimal"
                                                                                     },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "FixationRequestId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to PM.FixationRequests"
                                                                                                },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "CapacityUnit":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                          "PriceForwardCurveGroupId":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "PM.FixationRequestDetails":  {
                                                          "properties":  {
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "Value":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "Key":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "FormatType":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                             "FixationRequestId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to PM.FixationRequests"
                                                                                                   },
                                                                             "CustomEnumId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                         },
                                                          "type":  "object"
                                                      },
                        "PM.FixationSubRequestPeriodSurcharges":  {
                                                                      "properties":  {
                                                                                         "Concealed":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "FixationSubRequestPeriodId":  {
                                                                                                                            "type":  "string",
                                                                                                                            "description":  "FK to PM.FixationSubRequestPeriods"
                                                                                                                        },
                                                                                         "Id":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                         "SurchargeUnit":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "EntityCreatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "Name":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "Surcharge":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "decimal"
                                                                                                       },
                                                                                         "Tenant":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    }
                                                                                     },
                                                                      "type":  "object"
                                                                  },
                        "PM.FixationRequest_CategoryLabel":  {
                                                                 "properties":  {
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "CategoryLabelId":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                                    "FixationRequestId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to PM.FixationRequests"
                                                                                                          },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "CategoryId":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "PM.FixationSubRequestSurcharges":  {
                                                                "properties":  {
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "FixationSubRequestId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to PM.FixationSubRequests"
                                                                                                            },
                                                                                   "SurchargeUnit":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "Name":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "Surcharge":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "decimal"
                                                                                                 },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "PM.FixationSubRequestDetails":  {
                                                             "properties":  {
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "Value":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "FixationSubRequestId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to PM.FixationSubRequests"
                                                                                                         },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "Key":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "FormatType":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                                "CustomEnumId":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                            },
                                                             "type":  "object"
                                                         }
                    },
    "title":  "PM.FixationRequest",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Order

Aggregate Root: Order

Represents trading orders with their details, key values, and associated metering points.

erDiagram
    "PM.OrderEngineQueueItemItems" {
        uniqueidentifier Id PK
        datetimeoffset Queued 
        int Priority 
        uniqueidentifier OrderId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset ReferenceDateTime 
    }

    "PM.OrderVersionDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier OrderVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.OrderVersionMarkToMarketReports" {
        uniqueidentifier Id PK
        uniqueidentifier OrderVersionId FK
        decimal MarkToMarket 
        datetimeoffset DeterminedOn 
        nvarchar PriceForwardCurveTimeSeriesCode 
        nvarchar PriceForwardCurveDataSlotReference 
        nvarchar PriceForwardCurveRevision 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.OrderVersionPeriodSurcharges" {
        uniqueidentifier Id PK
        uniqueidentifier OrderVersionPeriodId FK
        nvarchar Name 
        decimal Surcharge 
        int SurchargeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.OrderVersionPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier OrderVersionId FK
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        decimal ContractedCapacity 
        decimal Price 
        int PeriodHours 
        decimal TotalNotionalContractQuantity 
        decimal ContractedAmount 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        decimal IndicativePrice 
    }

    "PM.OrderVersion_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier OrderVersionId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.OrderVersions" {
        uniqueidentifier Id PK
        uniqueidentifier OrderId FK
        bit IsLatestVersion 
        int VersionNumber 
        uniqueidentifier TransactionId 
        datetimeoffset TransactionDateTimeOffset 
        bit VoiceBrokered 
        datetimeoffset TerminationDate 
        decimal ContractedCapacity 
        int ContractedCapacityUnit 
        decimal ContractedPrice 
        int PriceUnit 
        nvarchar Comment 
        nvarchar ShapeTimeSeriesCode 
        nvarchar ShapeTimeSeriesDataSlotReference 
        nvarchar ShapeTimeSeriesRevision 
        uniqueidentifier SourceBookId FK
        int SourceTradeDirection 
        int SourceOrigin 
        uniqueidentifier TargetBookId FK
        int TargetTradeDirection 
        int TradeContractType 
        int LoadType 
        int SettlementMethod 
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        datetimeoffset LastTradingMoment 
        uniqueidentifier CommodityTypeId FK
        int PeriodHours 
        decimal TotalNotionalContractQuantity 
        int TotalNotionalContractQuantityUnit 
        decimal ContractedAmount 
        int OrderType 
        int OrderCondition 
        int ProcurementStrategy 
        decimal PriceLimit 
        int PriceLimitUnit 
        int OrderValidity 
        datetimeoffset OrderValidityDateTimeOffset 
        decimal MinimalExecutionVolume 
        int MinimalExecutionVolumeUnit 
        decimal UndisclosedVolume 
        int UndisclosedVolumeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier SourceMarketPartyId 
        uniqueidentifier TargetMarketPartyId 
        bit IsPlaceholder 
        decimal Surcharge 
        int SurchargeUnit 
        bit Concealed 
        bit ConfirmedByParentOrder 
        int StrategyExecutionType 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        decimal StopLossThreshold 
        int StopLossThresholdUnit 
        int FallbackStrategyExecutionType 
        uniqueidentifier FallbackStrategyBookId FK
        datetimeoffset ExecutionDate 
        uniqueidentifier SourcingProductElementId FK
        uniqueidentifier SourceSourcingClusterId FK
        uniqueidentifier TargetSourcingClusterId FK
        int StopLossTriggerOnLoadType 
        int ChildOrderGranularity 
        int ChildOrderVolumeType 
        nvarchar PriceTimeSeriesCode 
        nvarchar PriceTimeSeriesDataSlotReference 
        nvarchar PriceTimeSeriesRevision 
        int PeriodDivisionType 
        uniqueidentifier CreatorSourcingClusterId 
        uniqueidentifier ChainId 
        uniqueidentifier CreatorUserId 
        uniqueidentifier CreatorBookActionId 
        uniqueidentifier CreatorOrderId 
        datetimeoffset ProcurementEnd 
        datetimeoffset ProcurementStart 
        int PriceTimeSeriesSnapshotTimestamp 
        int ShapeTimeSeriesSnapshotTimestamp 
        datetimeoffset IntendedProcurementEnd 
        datetimeoffset IntendedProcurementStart 
        nvarchar DeliveryLocationDescription 
        bit ProcessedInPositions 
    }

    "PM.Orders" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier LinkedOrderId FK
        uniqueidentifier LatestVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int Status 
        nvarchar StatusReason 
        datetimeoffset NextEvaluationDateTimeOffset 
        nvarchar LinkedTradeReference 
        uniqueidentifier FixationRequestId FK
        uniqueidentifier FixationSubRequestId FK
    }

    "PM.OrderVersionDetails" }o--|| "PM.OrderVersions" : "OrderVersionId"
    "PM.OrderVersionMarkToMarketReports" }o--|| "PM.OrderVersions" : "OrderVersionId"
    "PM.OrderVersionPeriodSurcharges" }o--|| "PM.OrderVersionPeriods" : "OrderVersionPeriodId"
    "PM.OrderVersionPeriods" }o--|| "PM.OrderVersions" : "OrderVersionId"
    "PM.OrderVersion_CategoryLabel" }o--|| "PM.OrderVersions" : "OrderVersionId"
    "PM.Orders" }o--|| "PM.OrderVersions" : "LatestVersionId"
    "PM.OrderVersions" }o--|| "PM.Books" : "FallbackStrategyBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "SourceBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "TargetBookId"
    "PM.OrderVersions" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.OrderVersions" }o--|| "PM.Orders" : "OrderId"
    "PM.OrderVersions" }o--|| "PM.SourcingClusters" : "SourceSourcingClusterId"
    "PM.OrderVersions" }o--|| "PM.SourcingClusters" : "TargetSourcingClusterId"
    "PM.OrderVersions" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.LinkedChildOrderTrackers" }o--|| "PM.OrderVersions" : "FulfilledChildOrderVersionId"
    "PM.Deals" }o--|| "PM.Orders" : "LinkedOrderId"
    "PM.Orders" }o--|| "PM.Orders" : "LinkedOrderId"
    "PM.LinkedChildDealTrackers" }o--|| "PM.Orders" : "OrderId"
    "PM.LinkedChildOrderTrackers" }o--|| "PM.Orders" : "OrderId"
    "PM.Orders" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.Orders" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
erDiagram
    "PM.OrderEngineQueueItemItems" {
        uniqueidentifier Id PK
        datetimeoffset Queued 
        int Priority 
        uniqueidentifier OrderId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset ReferenceDateTime 
    }

    "PM.OrderVersionDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier OrderVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.OrderVersionMarkToMarketReports" {
        uniqueidentifier Id PK
        uniqueidentifier OrderVersionId FK
        decimal MarkToMarket 
        datetimeoffset DeterminedOn 
        nvarchar PriceForwardCurveTimeSeriesCode 
        nvarchar PriceForwardCurveDataSlotReference 
        nvarchar PriceForwardCurveRevision 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.OrderVersionPeriodSurcharges" {
        uniqueidentifier Id PK
        uniqueidentifier OrderVersionPeriodId FK
        nvarchar Name 
        decimal Surcharge 
        int SurchargeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.OrderVersionPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier OrderVersionId FK
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        decimal ContractedCapacity 
        decimal Price 
        int PeriodHours 
        decimal TotalNotionalContractQuantity 
        decimal ContractedAmount 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        decimal IndicativePrice 
    }

    "PM.OrderVersion_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier OrderVersionId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.OrderVersions" {
        uniqueidentifier Id PK
        uniqueidentifier OrderId FK
        bit IsLatestVersion 
        int VersionNumber 
        uniqueidentifier TransactionId 
        datetimeoffset TransactionDateTimeOffset 
        bit VoiceBrokered 
        datetimeoffset TerminationDate 
        decimal ContractedCapacity 
        int ContractedCapacityUnit 
        decimal ContractedPrice 
        int PriceUnit 
        nvarchar Comment 
        nvarchar ShapeTimeSeriesCode 
        nvarchar ShapeTimeSeriesDataSlotReference 
        nvarchar ShapeTimeSeriesRevision 
        uniqueidentifier SourceBookId FK
        int SourceTradeDirection 
        int SourceOrigin 
        uniqueidentifier TargetBookId FK
        int TargetTradeDirection 
        int TradeContractType 
        int LoadType 
        int SettlementMethod 
        datetimeoffset DeliveryPeriodStart 
        datetimeoffset DeliveryPeriodEnd 
        datetimeoffset LastTradingMoment 
        uniqueidentifier CommodityTypeId FK
        int PeriodHours 
        decimal TotalNotionalContractQuantity 
        int TotalNotionalContractQuantityUnit 
        decimal ContractedAmount 
        int OrderType 
        int OrderCondition 
        int ProcurementStrategy 
        decimal PriceLimit 
        int PriceLimitUnit 
        int OrderValidity 
        datetimeoffset OrderValidityDateTimeOffset 
        decimal MinimalExecutionVolume 
        int MinimalExecutionVolumeUnit 
        decimal UndisclosedVolume 
        int UndisclosedVolumeUnit 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier SourceMarketPartyId 
        uniqueidentifier TargetMarketPartyId 
        bit IsPlaceholder 
        decimal Surcharge 
        int SurchargeUnit 
        bit Concealed 
        bit ConfirmedByParentOrder 
        int StrategyExecutionType 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        decimal StopLossThreshold 
        int StopLossThresholdUnit 
        int FallbackStrategyExecutionType 
        uniqueidentifier FallbackStrategyBookId FK
        datetimeoffset ExecutionDate 
        uniqueidentifier SourcingProductElementId FK
        uniqueidentifier SourceSourcingClusterId FK
        uniqueidentifier TargetSourcingClusterId FK
        int StopLossTriggerOnLoadType 
        int ChildOrderGranularity 
        int ChildOrderVolumeType 
        nvarchar PriceTimeSeriesCode 
        nvarchar PriceTimeSeriesDataSlotReference 
        nvarchar PriceTimeSeriesRevision 
        int PeriodDivisionType 
        uniqueidentifier CreatorSourcingClusterId 
        uniqueidentifier ChainId 
        uniqueidentifier CreatorUserId 
        uniqueidentifier CreatorBookActionId 
        uniqueidentifier CreatorOrderId 
        datetimeoffset ProcurementEnd 
        datetimeoffset ProcurementStart 
        int PriceTimeSeriesSnapshotTimestamp 
        int ShapeTimeSeriesSnapshotTimestamp 
        datetimeoffset IntendedProcurementEnd 
        datetimeoffset IntendedProcurementStart 
        nvarchar DeliveryLocationDescription 
        bit ProcessedInPositions 
    }

    "PM.Orders" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier LinkedOrderId FK
        uniqueidentifier LatestVersionId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int Status 
        nvarchar StatusReason 
        datetimeoffset NextEvaluationDateTimeOffset 
        nvarchar LinkedTradeReference 
        uniqueidentifier FixationRequestId FK
        uniqueidentifier FixationSubRequestId FK
    }

    "PM.OrderVersionDetails" }o--|| "PM.OrderVersions" : "OrderVersionId"
    "PM.OrderVersionMarkToMarketReports" }o--|| "PM.OrderVersions" : "OrderVersionId"
    "PM.OrderVersionPeriodSurcharges" }o--|| "PM.OrderVersionPeriods" : "OrderVersionPeriodId"
    "PM.OrderVersionPeriods" }o--|| "PM.OrderVersions" : "OrderVersionId"
    "PM.OrderVersion_CategoryLabel" }o--|| "PM.OrderVersions" : "OrderVersionId"
    "PM.Orders" }o--|| "PM.OrderVersions" : "LatestVersionId"
    "PM.OrderVersions" }o--|| "PM.Books" : "FallbackStrategyBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "SourceBookId"
    "PM.OrderVersions" }o--|| "PM.Books" : "TargetBookId"
    "PM.OrderVersions" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.OrderVersions" }o--|| "PM.Orders" : "OrderId"
    "PM.OrderVersions" }o--|| "PM.SourcingClusters" : "SourceSourcingClusterId"
    "PM.OrderVersions" }o--|| "PM.SourcingClusters" : "TargetSourcingClusterId"
    "PM.OrderVersions" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.LinkedChildOrderTrackers" }o--|| "PM.OrderVersions" : "FulfilledChildOrderVersionId"
    "PM.Deals" }o--|| "PM.Orders" : "LinkedOrderId"
    "PM.Orders" }o--|| "PM.Orders" : "LinkedOrderId"
    "PM.LinkedChildDealTrackers" }o--|| "PM.Orders" : "OrderId"
    "PM.LinkedChildOrderTrackers" }o--|| "PM.Orders" : "OrderId"
    "PM.Orders" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.Orders" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
{
    "definitions":  {
                        "PM.Orders":  {
                                          "properties":  {
                                                             "Id":  {
                                                                        "format":  "uuid",
                                                                        "description":  "uniqueidentifier",
                                                                        "type":  "string"
                                                                    },
                                                             "EntityUpdatedAuthToken":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                             "Concealed":  {
                                                                               "type":  "boolean",
                                                                               "description":  "bit"
                                                                           },
                                                             "EntityCreatedAuthToken":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                             "StatusReason":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                             "LatestVersionId":  {
                                                                                     "type":  "string",
                                                                                     "description":  "FK to PM.OrderVersions"
                                                                                 },
                                                             "EntityUpdatedDateTime":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                             "FixationSubRequestId":  {
                                                                                          "type":  "string",
                                                                                          "description":  "FK to PM.FixationSubRequests"
                                                                                      },
                                                             "LinkedTradeReference":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                             "ExternalReference":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                             "Tenant":  {
                                                                            "format":  "uuid",
                                                                            "description":  "uniqueidentifier",
                                                                            "type":  "string"
                                                                        },
                                                             "InternalReference":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                             "LinkedOrderId":  {
                                                                                   "type":  "string",
                                                                                   "description":  "FK to PM.Orders"
                                                                               },
                                                             "Status":  {
                                                                            "type":  "integer",
                                                                            "description":  "int"
                                                                        },
                                                             "EntityCreatedDateTime":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                             "FixationRequestId":  {
                                                                                       "type":  "string",
                                                                                       "description":  "FK to PM.FixationRequests"
                                                                                   },
                                                             "NextEvaluationDateTimeOffset":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              }
                                                         },
                                          "type":  "object"
                                      },
                        "PM.OrderEngineQueueItemItems":  {
                                                             "properties":  {
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "ReferenceDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Queued":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "Priority":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                                "OrderId":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "PM.OrderVersion_CategoryLabel":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "CategoryLabelId":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "CategoryId":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                 "OrderVersionId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to PM.OrderVersions"
                                                                                                    },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "PM.OrderVersionDetails":  {
                                                       "properties":  {
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "OrderVersionId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to PM.OrderVersions"
                                                                                             },
                                                                          "Value":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "Key":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "FormatType":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                          "CustomEnumId":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "PM.OrderVersionPeriodSurcharges":  {
                                                                "properties":  {
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "SurchargeUnit":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                   "OrderVersionPeriodId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to PM.OrderVersionPeriods"
                                                                                                            },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "Name":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "Surcharge":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "decimal"
                                                                                                 },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "PM.OrderVersions":  {
                                                 "properties":  {
                                                                    "MinimalExecutionVolumeUnit":  {
                                                                                                       "type":  "integer",
                                                                                                       "description":  "int"
                                                                                                   },
                                                                    "SourceOrigin":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                    "ProcurementStart":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                                    "ShapeTimeSeriesDataSlotReference":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                    "VersionNumber":  {
                                                                                          "type":  "integer",
                                                                                          "description":  "int"
                                                                                      },
                                                                    "SourceTradeDirection":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                    "SourceBookId":  {
                                                                                         "type":  "string",
                                                                                         "description":  "FK to PM.Books"
                                                                                     },
                                                                    "PriceUnit":  {
                                                                                      "type":  "integer",
                                                                                      "description":  "int"
                                                                                  },
                                                                    "StopLossTriggerOnLoadType":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                    "ProcurementEnd":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                                    "OrderType":  {
                                                                                      "type":  "integer",
                                                                                      "description":  "int"
                                                                                  },
                                                                    "ChildOrderGranularity":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                    "DeliveryPeriodEnd":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                    "ChainId":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                    "ContractedCapacityUnit":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                    "StopLossThreshold":  {
                                                                                              "type":  "string",
                                                                                              "description":  "decimal"
                                                                                          },
                                                                    "TransactionDateTimeOffset":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                    "Concealed":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "PriceLimitUnit":  {
                                                                                           "type":  "integer",
                                                                                           "description":  "int"
                                                                                       },
                                                                    "ContractedPrice":  {
                                                                                            "type":  "string",
                                                                                            "description":  "decimal"
                                                                                        },
                                                                    "TargetTradeDirection":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                    "Id":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                    "LastTradingMoment":  {
                                                                                              "format":  "date-time",
                                                                                              "description":  "datetimeoffset",
                                                                                              "type":  "string"
                                                                                          },
                                                                    "TotalNotionalContractQuantityUnit":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                    "PriceTimeSeriesDataSlotReference":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                    "TargetMarketPartyId":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                    "ExecutionDate":  {
                                                                                          "format":  "date-time",
                                                                                          "description":  "datetimeoffset",
                                                                                          "type":  "string"
                                                                                      },
                                                                    "TradeContractType":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                    "StrategyExecutionType":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                    "OrderValidity":  {
                                                                                          "type":  "integer",
                                                                                          "description":  "int"
                                                                                      },
                                                                    "EntityUpdatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "IsPlaceholder":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                    "ShapeTimeSeriesSnapshotTimestamp":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                    "CreatorOrderId":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                    "EntityCreatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "PriceTimeSeriesRevision":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                    "ProcurementDeliveryPeriodInMonths":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                    "OrderId":  {
                                                                                    "type":  "string",
                                                                                    "description":  "FK to PM.Orders"
                                                                                },
                                                                    "Tenant":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                    "IntendedProcurementStart":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                    "ProcurementStrategy":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                    "FallbackStrategyExecutionType":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                    "ProcurementOffsetPeriodInMonths":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                    "SourceMarketPartyId":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                    "SettlementMethod":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                    "Comment":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                    "CreatorSourcingClusterId":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                    "PeriodHours":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                    "StopLossThresholdUnit":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                    "ConfirmedByParentOrder":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                    "CreatorBookActionId":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                    "SourcingProductElementId":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "FK to PM.SourcingProductElements"
                                                                                                 },
                                                                    "TerminationDate":  {
                                                                                            "format":  "date-time",
                                                                                            "description":  "datetimeoffset",
                                                                                            "type":  "string"
                                                                                        },
                                                                    "ShapeTimeSeriesCode":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                    "EntityUpdatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "FallbackStrategyBookId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to PM.Books"
                                                                                               },
                                                                    "CreatorUserId":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                    "PriceTimeSeriesCode":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                    "Surcharge":  {
                                                                                      "type":  "string",
                                                                                      "description":  "decimal"
                                                                                  },
                                                                    "SurchargeUnit":  {
                                                                                          "type":  "integer",
                                                                                          "description":  "int"
                                                                                      },
                                                                    "TargetSourcingClusterId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to PM.SourcingClusters"
                                                                                                },
                                                                    "ProcurementPeriodInMonths":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                    "IsLatestVersion":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                    "TotalNotionalContractQuantity":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "decimal"
                                                                                                      },
                                                                    "ChildOrderVolumeType":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                    "LoadType":  {
                                                                                     "type":  "integer",
                                                                                     "description":  "int"
                                                                                 },
                                                                    "VoiceBrokered":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                    "UndisclosedVolume":  {
                                                                                              "type":  "string",
                                                                                              "description":  "decimal"
                                                                                          },
                                                                    "OrderValidityDateTimeOffset":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                    "MinimalExecutionVolume":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "decimal"
                                                                                               },
                                                                    "DeliveryLocationDescription":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                    "ProcessedInPositions":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                    "PriceLimit":  {
                                                                                       "type":  "string",
                                                                                       "description":  "decimal"
                                                                                   },
                                                                    "IntendedProcurementEnd":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "DeliveryPeriodStart":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                    "ContractedAmount":  {
                                                                                             "type":  "string",
                                                                                             "description":  "decimal"
                                                                                         },
                                                                    "ShapeTimeSeriesRevision":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                    "UndisclosedVolumeUnit":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                    "ContractedCapacity":  {
                                                                                               "type":  "string",
                                                                                               "description":  "decimal"
                                                                                           },
                                                                    "OrderCondition":  {
                                                                                           "type":  "integer",
                                                                                           "description":  "int"
                                                                                       },
                                                                    "TargetBookId":  {
                                                                                         "type":  "string",
                                                                                         "description":  "FK to PM.Books"
                                                                                     },
                                                                    "CommodityTypeId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to PM.CommodityTypes"
                                                                                        },
                                                                    "SourceSourcingClusterId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to PM.SourcingClusters"
                                                                                                },
                                                                    "PeriodDivisionType":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                    "EntityCreatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "PriceTimeSeriesSnapshotTimestamp":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                    "TransactionId":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      }
                                                                },
                                                 "type":  "object"
                                             },
                        "PM.OrderVersionMarkToMarketReports":  {
                                                                   "properties":  {
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "PriceForwardCurveDataSlotReference":  {
                                                                                                                                 "type":  "string",
                                                                                                                                 "description":  "nvarchar"
                                                                                                                             },
                                                                                      "PriceForwardCurveTimeSeriesCode":  {
                                                                                                                              "type":  "string",
                                                                                                                              "description":  "nvarchar"
                                                                                                                          },
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "OrderVersionId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to PM.OrderVersions"
                                                                                                         },
                                                                                      "MarkToMarket":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "decimal"
                                                                                                       },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "PriceForwardCurveRevision":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "nvarchar"
                                                                                                                    },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "DeterminedOn":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 }
                                                                                  },
                                                                   "type":  "object"
                                                               },
                        "PM.OrderVersionPeriods":  {
                                                       "properties":  {
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "DeliveryPeriodEnd":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "DeliveryPeriodStart":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                          "OrderVersionId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to PM.OrderVersions"
                                                                                             },
                                                                          "IndicativePrice":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "decimal"
                                                                                              },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "ContractedAmount":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "decimal"
                                                                                               },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "TotalNotionalContractQuantity":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "decimal"
                                                                                                            },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "ContractedCapacity":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "decimal"
                                                                                                 },
                                                                          "PeriodHours":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                          "Price":  {
                                                                                        "type":  "string",
                                                                                        "description":  "decimal"
                                                                                    },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 }
                                                                      },
                                                       "type":  "object"
                                                   }
                    },
    "title":  "PM.Order",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Portfolio

Aggregate Root: Portfolio

Represents trading portfolios with their details, key values, and associated metering points.

erDiagram
    "PM.PortfolioGroupingKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier PortfolioGroupingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "PM.PortfolioGroupings" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier ParentPortfolioGroupingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.PortfolioKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier PortfolioId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "PM.Portfolios" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier DefaultMarketPartyId 
        bit Concealed 
        uniqueidentifier PortfolioGroupingId FK
        int PortfolioType 
    }

    "PM.PortfolioGroupingKeyValues" }o--|| "PM.PortfolioGroupings" : "PortfolioGroupingId"
    "PM.PortfolioGroupings" }o--|| "PM.PortfolioGroupings" : "ParentPortfolioGroupingId"
    "PM.Portfolios" }o--|| "PM.PortfolioGroupings" : "PortfolioGroupingId"
    "PM.PortfolioKeyValues" }o--|| "PM.Portfolios" : "PortfolioId"
    "PM.TradeSummaries" }o--|| "PM.Portfolios" : "TargetPortfolioId"
    "PM.Books" }o--|| "PM.Portfolios" : "PortfolioId"
    "PM.TradeSummaries" }o--|| "PM.Portfolios" : "SourcePortfolioId"
erDiagram
    "PM.PortfolioGroupingKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier PortfolioGroupingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "PM.PortfolioGroupings" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier ParentPortfolioGroupingId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.PortfolioKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier PortfolioId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "PM.Portfolios" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier DefaultMarketPartyId 
        bit Concealed 
        uniqueidentifier PortfolioGroupingId FK
        int PortfolioType 
    }

    "PM.PortfolioGroupingKeyValues" }o--|| "PM.PortfolioGroupings" : "PortfolioGroupingId"
    "PM.PortfolioGroupings" }o--|| "PM.PortfolioGroupings" : "ParentPortfolioGroupingId"
    "PM.Portfolios" }o--|| "PM.PortfolioGroupings" : "PortfolioGroupingId"
    "PM.PortfolioKeyValues" }o--|| "PM.Portfolios" : "PortfolioId"
    "PM.TradeSummaries" }o--|| "PM.Portfolios" : "TargetPortfolioId"
    "PM.Books" }o--|| "PM.Portfolios" : "PortfolioId"
    "PM.TradeSummaries" }o--|| "PM.Portfolios" : "SourcePortfolioId"
{
    "definitions":  {
                        "PM.PortfolioGroupingKeyValues":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "Key":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                                 "PortfolioGroupingId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to PM.PortfolioGroupings"
                                                                                                         },
                                                                                 "Value":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "PM.Portfolios":  {
                                              "properties":  {
                                                                 "Concealed":  {
                                                                                   "type":  "boolean",
                                                                                   "description":  "bit"
                                                                               },
                                                                 "PortfolioGroupingId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to PM.PortfolioGroupings"
                                                                                         },
                                                                 "EntityUpdatedAuthToken":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                 "Name":  {
                                                                              "type":  "string",
                                                                              "description":  "nvarchar"
                                                                          },
                                                                 "EntityCreatedAuthToken":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                 "DefaultMarketPartyId":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                 "EntityUpdatedDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                 "PortfolioType":  {
                                                                                       "type":  "integer",
                                                                                       "description":  "int"
                                                                                   },
                                                                 "Tenant":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                 "InternalReference":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                 "ExternalReference":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                 "Id":  {
                                                                            "format":  "uuid",
                                                                            "description":  "uniqueidentifier",
                                                                            "type":  "string"
                                                                        },
                                                                 "EntityCreatedDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           }
                                                             },
                                              "type":  "object"
                                          },
                        "PM.PortfolioGroupings":  {
                                                      "properties":  {
                                                                         "ParentPortfolioGroupingId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to PM.PortfolioGroupings"
                                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Name":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "PM.PortfolioKeyValues":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "Key":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                         "Value":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "PortfolioId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to PM.Portfolios"
                                                                                         },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  }
                    },
    "title":  "PM.Portfolio",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Sourcing Cluster

Aggregate Root: SourcingCluster

Represents clusters for sourcing activities with their details, key values, and associated metering points.

erDiagram
    "PM.SourcingClusterDetails" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterEngineQueueItems" {
        uniqueidentifier Id PK
        datetimeoffset Queued 
        int Priority 
        varbinary QueueItemData 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterInputTimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        nvarchar SubType 
        uniqueidentifier SourcingProductElementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterMetadataTimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        nvarchar SubType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterParentChildRelations" {
        uniqueidentifier Id PK
        uniqueidentifier ParentSourcingClusterId FK
        uniqueidentifier ChildSourcingClusterId FK
        uniqueidentifier SourcingClusterTreeValidatorId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterTreeValidators" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Name 
    }

    "PM.SourcingCluster_CompletedPricingAgreement" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier PricingAgreementId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingCluster_CompletedSourcingAgreement" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier SourcingAgreementId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingCluster_ScriptRelation" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier ScriptId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier ScriptVersionId 
    }

    "PM.SourcingCluster_SourcingClusterInHold" {
        uniqueidentifier SourcingClusterId PK
        uniqueidentifier ChildSourcingClusterId PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
    }

    "PM.SourcingCluster_SupplyAgreement" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier SupplyAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusters" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        bit OpenPositionManagementDisabled 
        uniqueidentifier PricingAgreementId 
        uniqueidentifier SourcingAgreementId 
        uniqueidentifier BookId FK
        uniqueidentifier ParentSourcingClusterId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier SourcingProductComponentId FK
        bit ForecastResponsibilityDisabled 
        uniqueidentifier SourcingClusterTreeValidatorId FK
        uniqueidentifier PositionPartitioningCategoryId 
        bigint SourcingProductComponentLatestUpdateTimeStamp 
    }

    "PM.SourcingClusterDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingClusterInputTimeSeries" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingClusterInputTimeSeries" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.SourcingClusterMetadataTimeSeries" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingClusterParentChildRelations" }o--|| "PM.SourcingClusters" : "ChildSourcingClusterId"
    "PM.SourcingClusterParentChildRelations" }o--|| "PM.SourcingClusters" : "ParentSourcingClusterId"
    "PM.SourcingClusterParentChildRelations" }o--|| "PM.SourcingClusterTreeValidators" : "SourcingClusterTreeValidatorId"
    "PM.SourcingClusters" }o--|| "PM.SourcingClusterTreeValidators" : "SourcingClusterTreeValidatorId"
    "PM.SourcingCluster_CompletedPricingAgreement" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_CompletedSourcingAgreement" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_ScriptRelation" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_SourcingClusterInHold" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_SupplyAgreement" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_SupplyAgreement" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.DealVersions" }o--|| "PM.SourcingClusters" : "SourceSourcingClusterId"
    "PM.DealVersions" }o--|| "PM.SourcingClusters" : "TargetSourcingClusterId"
    "PM.OrderVersions" }o--|| "PM.SourcingClusters" : "SourceSourcingClusterId"
    "PM.OrderVersions" }o--|| "PM.SourcingClusters" : "TargetSourcingClusterId"
    "PM.SourcingClusters" }o--|| "PM.SourcingClusters" : "ParentSourcingClusterId"
    "PM.SourcingClusters" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.FixationRequests" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingClusters" }o--|| "PM.Books" : "BookId"
erDiagram
    "PM.SourcingClusterDetails" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterEngineQueueItems" {
        uniqueidentifier Id PK
        datetimeoffset Queued 
        int Priority 
        varbinary QueueItemData 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterInputTimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        nvarchar SubType 
        uniqueidentifier SourcingProductElementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterMetadataTimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        nvarchar SubType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterParentChildRelations" {
        uniqueidentifier Id PK
        uniqueidentifier ParentSourcingClusterId FK
        uniqueidentifier ChildSourcingClusterId FK
        uniqueidentifier SourcingClusterTreeValidatorId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusterTreeValidators" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Name 
    }

    "PM.SourcingCluster_CompletedPricingAgreement" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier PricingAgreementId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingCluster_CompletedSourcingAgreement" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier SourcingAgreementId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingCluster_ScriptRelation" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier ScriptId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier ScriptVersionId 
    }

    "PM.SourcingCluster_SourcingClusterInHold" {
        uniqueidentifier SourcingClusterId PK
        uniqueidentifier ChildSourcingClusterId PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
    }

    "PM.SourcingCluster_SupplyAgreement" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingClusterId FK
        uniqueidentifier SupplyAgreementId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingClusters" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        bit OpenPositionManagementDisabled 
        uniqueidentifier PricingAgreementId 
        uniqueidentifier SourcingAgreementId 
        uniqueidentifier BookId FK
        uniqueidentifier ParentSourcingClusterId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier SourcingProductComponentId FK
        bit ForecastResponsibilityDisabled 
        uniqueidentifier SourcingClusterTreeValidatorId FK
        uniqueidentifier PositionPartitioningCategoryId 
        bigint SourcingProductComponentLatestUpdateTimeStamp 
    }

    "PM.SourcingClusterDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingClusterInputTimeSeries" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingClusterInputTimeSeries" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.SourcingClusterMetadataTimeSeries" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingClusterParentChildRelations" }o--|| "PM.SourcingClusters" : "ChildSourcingClusterId"
    "PM.SourcingClusterParentChildRelations" }o--|| "PM.SourcingClusters" : "ParentSourcingClusterId"
    "PM.SourcingClusterParentChildRelations" }o--|| "PM.SourcingClusterTreeValidators" : "SourcingClusterTreeValidatorId"
    "PM.SourcingClusters" }o--|| "PM.SourcingClusterTreeValidators" : "SourcingClusterTreeValidatorId"
    "PM.SourcingCluster_CompletedPricingAgreement" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_CompletedSourcingAgreement" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_ScriptRelation" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_SourcingClusterInHold" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_SupplyAgreement" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingCluster_SupplyAgreement" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.DealVersions" }o--|| "PM.SourcingClusters" : "SourceSourcingClusterId"
    "PM.DealVersions" }o--|| "PM.SourcingClusters" : "TargetSourcingClusterId"
    "PM.OrderVersions" }o--|| "PM.SourcingClusters" : "SourceSourcingClusterId"
    "PM.OrderVersions" }o--|| "PM.SourcingClusters" : "TargetSourcingClusterId"
    "PM.SourcingClusters" }o--|| "PM.SourcingClusters" : "ParentSourcingClusterId"
    "PM.SourcingClusters" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.FixationRequests" }o--|| "PM.SourcingClusters" : "SourcingClusterId"
    "PM.SourcingClusters" }o--|| "PM.Books" : "BookId"
{
    "definitions":  {
                        "PM.SourcingClusterParentChildRelations":  {
                                                                       "properties":  {
                                                                                          "Concealed":  {
                                                                                                            "type":  "boolean",
                                                                                                            "description":  "bit"
                                                                                                        },
                                                                                          "ParentSourcingClusterId":  {
                                                                                                                          "type":  "string",
                                                                                                                          "description":  "FK to PM.SourcingClusters"
                                                                                                                      },
                                                                                          "Id":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                          "EntityUpdatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "EntityCreatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "EntityUpdatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "SourcingClusterTreeValidatorId":  {
                                                                                                                                 "type":  "string",
                                                                                                                                 "description":  "FK to PM.SourcingClusterTreeValidators"
                                                                                                                             },
                                                                                          "ChildSourcingClusterId":  {
                                                                                                                         "type":  "string",
                                                                                                                         "description":  "FK to PM.SourcingClusters"
                                                                                                                     },
                                                                                          "EntityCreatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "Tenant":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     }
                                                                                      },
                                                                       "type":  "object"
                                                                   },
                        "PM.SourcingCluster_CompletedPricingAgreement":  {
                                                                             "properties":  {
                                                                                                "Concealed":  {
                                                                                                                  "type":  "boolean",
                                                                                                                  "description":  "bit"
                                                                                                              },
                                                                                                "EntityUpdatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "Id":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                                "EntityCreatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "EntityUpdatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "SourcingClusterId":  {
                                                                                                                          "type":  "string",
                                                                                                                          "description":  "FK to PM.SourcingClusters"
                                                                                                                      },
                                                                                                "PricingAgreementId":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                                "EntityCreatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "Tenant":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           }
                                                                                            },
                                                                             "type":  "object"
                                                                         },
                        "PM.SourcingClusterDetails":  {
                                                          "properties":  {
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "SourcingClusterId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to PM.SourcingClusters"
                                                                                                   },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "CustomEnumId":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "FK to PM.CustomEnums"
                                                                                              },
                                                                             "Value":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Format":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "Key":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        }
                                                                         },
                                                          "type":  "object"
                                                      },
                        "PM.SourcingCluster_SourcingClusterInHold":  {
                                                                         "properties":  {
                                                                                            "EntityUpdatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "EntityCreatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "EntityUpdatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "SourcingClusterId":  {
                                                                                                                      "type":  "string",
                                                                                                                      "description":  "FK to PM.SourcingClusters"
                                                                                                                  },
                                                                                            "ChildSourcingClusterId":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "EntityCreatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Tenant":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       }
                                                                                        },
                                                                         "type":  "object"
                                                                     },
                        "PM.SourcingClusterTreeValidators":  {
                                                                 "properties":  {
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "Name":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "PM.SourcingClusters":  {
                                                    "properties":  {
                                                                       "SourcingAgreementId":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "SourcingClusterTreeValidatorId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to PM.SourcingClusterTreeValidators"
                                                                                                          },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "PositionPartitioningCategoryId":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "PricingAgreementId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                       "SourcingProductComponentId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to PM.SourcingProductComponents"
                                                                                                      },
                                                                       "OpenPositionManagementDisabled":  {
                                                                                                              "type":  "boolean",
                                                                                                              "description":  "bit"
                                                                                                          },
                                                                       "SourcingProductComponentLatestUpdateTimeStamp":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "bigint"
                                                                                                                         },
                                                                       "ParentSourcingClusterId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to PM.SourcingClusters"
                                                                                                   },
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                       "InternalReference":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                       "ForecastResponsibilityDisabled":  {
                                                                                                              "type":  "boolean",
                                                                                                              "description":  "bit"
                                                                                                          },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "BookId":  {
                                                                                      "type":  "string",
                                                                                      "description":  "FK to PM.Books"
                                                                                  }
                                                                   },
                                                    "type":  "object"
                                                },
                        "PM.SourcingClusterInputTimeSeries":  {
                                                                  "properties":  {
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "SourcingClusterId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to PM.SourcingClusters"
                                                                                                           },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "SnapshotTimestamp":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                     "SourcingProductElementId":  {
                                                                                                                      "type":  "string",
                                                                                                                      "description":  "FK to PM.SourcingProductElements"
                                                                                                                  },
                                                                                     "Revision":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                     "DataSlotReference":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "nvarchar"
                                                                                                           },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "TimeSeriesCode":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "SubType":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "PM.SourcingClusterEngineQueueItems":  {
                                                                   "properties":  {
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "Priority":  {
                                                                                                       "type":  "integer",
                                                                                                       "description":  "int"
                                                                                                   },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "QueueItemData":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "varbinary"
                                                                                                        },
                                                                                      "Queued":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                                  },
                                                                   "type":  "object"
                                                               },
                        "PM.SourcingClusterMetadataTimeSeries":  {
                                                                     "properties":  {
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "SourcingClusterId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to PM.SourcingClusters"
                                                                                                              },
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "SnapshotTimestamp":  {
                                                                                                                  "type":  "integer",
                                                                                                                  "description":  "int"
                                                                                                              },
                                                                                        "Revision":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                        "DataSlotReference":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "nvarchar"
                                                                                                              },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                        "TimeSeriesCode":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "nvarchar"
                                                                                                           },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "SubType":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "PM.SourcingCluster_CompletedSourcingAgreement":  {
                                                                              "properties":  {
                                                                                                 "Concealed":  {
                                                                                                                   "type":  "boolean",
                                                                                                                   "description":  "bit"
                                                                                                               },
                                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                                "format":  "uuid",
                                                                                                                                "description":  "uniqueidentifier",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                 "Id":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                                                 "SourcingAgreementId":  {
                                                                                                                             "format":  "uuid",
                                                                                                                             "description":  "uniqueidentifier",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                                 "EntityCreatedDateTime":  {
                                                                                                                               "format":  "date-time",
                                                                                                                               "description":  "datetimeoffset",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                 "EntityUpdatedDateTime":  {
                                                                                                                               "format":  "date-time",
                                                                                                                               "description":  "datetimeoffset",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                 "SourcingClusterId":  {
                                                                                                                           "type":  "string",
                                                                                                                           "description":  "FK to PM.SourcingClusters"
                                                                                                                       },
                                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                                "format":  "uuid",
                                                                                                                                "description":  "uniqueidentifier",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                 "Tenant":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            }
                                                                                             },
                                                                              "type":  "object"
                                                                          },
                        "PM.SourcingCluster_ScriptRelation":  {
                                                                  "properties":  {
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "ScriptVersionId":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                     "ScriptId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "SourcingClusterId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to PM.SourcingClusters"
                                                                                                           },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "PM.SourcingCluster_SupplyAgreement":  {
                                                                   "properties":  {
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "SupplyAgreementId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to PM.SupplyAgreements"
                                                                                                            },
                                                                                      "SourcingClusterId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to PM.SourcingClusters"
                                                                                                            },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                                  },
                                                                   "type":  "object"
                                                               }
                    },
    "title":  "PM.SourcingCluster",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Sourcing Product Component

Aggregate Root: SourcingProductComponent

Represents product components used in sourcing activities with their details and key values.

erDiagram
    "PM.ProductComponent_SourcingProductComponent" {
        uniqueidentifier Id 
        uniqueidentifier ProductComponentId PK
        uniqueidentifier SourcingProductComponentId PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.ProductElement_SourcingProductElement" {
        uniqueidentifier Id 
        uniqueidentifier ProductElementId PK
        uniqueidentifier SourcingProductElementId PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingProductComponentRuleConfigDetailSet" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingProductComponentRuleConfigId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingProductComponentRuleConfigDetails" {
    }

    "PM.SourcingProductComponentRuleConfigs" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingProductComponentId FK
        nvarchar Name 
        int RuleType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingProductComponents" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int CommodityType 
        bigint LatestUpdateTimeStamp 
        int SourcingClusterTargetAssignmentType 
    }

    "PM.SourcingProductElements" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingProductComponentId FK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.ProductComponent_SourcingProductComponent" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.ProductElement_SourcingProductElement" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "PM.SourcingProductComponentRuleConfigs" : "SourcingProductComponentRuleConfigId"
    "PM.SourcingProductComponentRuleConfigs" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.SourcingClusters" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.SourcingProductElements" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.TradeSummaries" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.DealVersions" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.OrderVersions" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.SourcingProductElementRuleConfigs" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.SourcingClusterInputTimeSeries" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
erDiagram
    "PM.ProductComponent_SourcingProductComponent" {
        uniqueidentifier Id 
        uniqueidentifier ProductComponentId PK
        uniqueidentifier SourcingProductComponentId PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.ProductElement_SourcingProductElement" {
        uniqueidentifier Id 
        uniqueidentifier ProductElementId PK
        uniqueidentifier SourcingProductElementId PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingProductComponentRuleConfigDetailSet" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingProductComponentRuleConfigId FK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingProductComponentRuleConfigDetails" {
    }

    "PM.SourcingProductComponentRuleConfigs" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingProductComponentId FK
        nvarchar Name 
        int RuleType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SourcingProductComponents" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int CommodityType 
        bigint LatestUpdateTimeStamp 
        int SourcingClusterTargetAssignmentType 
    }

    "PM.SourcingProductElements" {
        uniqueidentifier Id PK
        uniqueidentifier SourcingProductComponentId FK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.ProductComponent_SourcingProductComponent" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.ProductElement_SourcingProductElement" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "PM.SourcingProductComponentRuleConfigs" : "SourcingProductComponentRuleConfigId"
    "PM.SourcingProductComponentRuleConfigs" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.SourcingClusters" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.SourcingProductElements" }o--|| "PM.SourcingProductComponents" : "SourcingProductComponentId"
    "PM.TradeSummaries" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.DealVersions" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.OrderVersions" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.SourcingProductElementRuleConfigs" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.SourcingClusterInputTimeSeries" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
{
    "definitions":  {
                        "PM.SourcingProductComponentRuleConfigDetails":  {
                                                                             "properties":  {

                                                                                            },
                                                                             "type":  "object"
                                                                         },
                        "PM.ProductElement_SourcingProductElement":  {
                                                                         "properties":  {
                                                                                            "SourcingProductElementId":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "FK to PM.SourcingProductElements"
                                                                                                                         },
                                                                                            "EntityUpdatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Id":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                            "ProductElementId":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                            "Concealed":  {
                                                                                                              "type":  "boolean",
                                                                                                              "description":  "bit"
                                                                                                          },
                                                                                            "EntityCreatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "EntityUpdatedDateTime":  {
                                                                                                                          "format":  "date-time",
                                                                                                                          "description":  "datetimeoffset",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                                            "EntityCreatedAuthToken":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                            "Tenant":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       }
                                                                                        },
                                                                         "type":  "object"
                                                                     },
                        "PM.SourcingProductComponentRuleConfigs":  {
                                                                       "properties":  {
                                                                                          "Concealed":  {
                                                                                                            "type":  "boolean",
                                                                                                            "description":  "bit"
                                                                                                        },
                                                                                          "EntityUpdatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "Id":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                          "RuleType":  {
                                                                                                           "type":  "integer",
                                                                                                           "description":  "int"
                                                                                                       },
                                                                                          "SourcingProductComponentId":  {
                                                                                                                             "type":  "string",
                                                                                                                             "description":  "FK to PM.SourcingProductComponents"
                                                                                                                         },
                                                                                          "EntityCreatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "Name":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                          "EntityUpdatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "EntityCreatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "Tenant":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     }
                                                                                      },
                                                                       "type":  "object"
                                                                   },
                        "PM.SourcingProductComponents":  {
                                                             "properties":  {
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "CommodityType":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                                "SourcingClusterTargetAssignmentType":  {
                                                                                                                            "type":  "integer",
                                                                                                                            "description":  "int"
                                                                                                                        },
                                                                                "LatestUpdateTimeStamp":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "bigint"
                                                                                                          },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Name":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "PM.ProductComponent_SourcingProductComponent":  {
                                                                             "properties":  {
                                                                                                "Concealed":  {
                                                                                                                  "type":  "boolean",
                                                                                                                  "description":  "bit"
                                                                                                              },
                                                                                                "EntityUpdatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "Id":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                                "SourcingProductComponentId":  {
                                                                                                                                   "type":  "string",
                                                                                                                                   "description":  "FK to PM.SourcingProductComponents"
                                                                                                                               },
                                                                                                "EntityCreatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "EntityUpdatedDateTime":  {
                                                                                                                              "format":  "date-time",
                                                                                                                              "description":  "datetimeoffset",
                                                                                                                              "type":  "string"
                                                                                                                          },
                                                                                                "ProductComponentId":  {
                                                                                                                           "format":  "uuid",
                                                                                                                           "description":  "uniqueidentifier",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                                "EntityCreatedAuthToken":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                                "Tenant":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           }
                                                                                            },
                                                                             "type":  "object"
                                                                         },
                        "PM.SourcingProductElements":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "SourcingProductComponentId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to PM.SourcingProductComponents"
                                                                                                             },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "Name":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "PM.SourcingProductComponentRuleConfigDetailSet":  {
                                                                               "properties":  {
                                                                                                  "Id":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                  "Concealed":  {
                                                                                                                    "type":  "boolean",
                                                                                                                    "description":  "bit"
                                                                                                                },
                                                                                                  "Value":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "nvarchar"
                                                                                                            },
                                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                                "format":  "date-time",
                                                                                                                                "description":  "datetimeoffset",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                  "Tenant":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                                  "Key":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "nvarchar"
                                                                                                          },
                                                                                                  "SourcingProductComponentRuleConfigId":  {
                                                                                                                                               "type":  "string",
                                                                                                                                               "description":  "FK to PM.SourcingProductComponentRuleConfigs"
                                                                                                                                           },
                                                                                                  "EntityCreatedDateTime":  {
                                                                                                                                "format":  "date-time",
                                                                                                                                "description":  "datetimeoffset",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                  "FormatType":  {
                                                                                                                     "type":  "integer",
                                                                                                                     "description":  "int"
                                                                                                                 },
                                                                                                  "CustomEnumId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to PM.CustomEnums"
                                                                                                                   }
                                                                                              },
                                                                               "type":  "object"
                                                                           }
                    },
    "title":  "PM.SourcingProductComponent",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Supply Agreement

Aggregate Root: SupplyAgreement

Represents supply agreements with their details, key values, and associated metering points.

erDiagram
    "PM.SupplyAgreementDetails" {
        uniqueidentifier Id PK
        uniqueidentifier SupplyAgreementId FK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SupplyAgreementInputTimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier SupplyAgreementId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        nvarchar SubType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SupplyAgreementMetadataTimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier SupplyAgreementId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        nvarchar SubType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SupplyAgreements" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier PricingAgreementId 
        uniqueidentifier SourcingAgreementId 
        datetimeoffset ExpectedStartDateTimeOffset 
        datetimeoffset ExpectedEndDateTimeOffset 
        datetimeoffset StartDateTimeOffset 
        datetimeoffset EndDateTimeOffset 
        int SupplyAgreementType 
        datetimeoffset PositionClosingDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SupplyAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.SupplyAgreementInputTimeSeries" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.SupplyAgreementMetadataTimeSeries" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.SourcingCluster_SupplyAgreement" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.FixationRequests" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
erDiagram
    "PM.SupplyAgreementDetails" {
        uniqueidentifier Id PK
        uniqueidentifier SupplyAgreementId FK
        nvarchar Key 
        nvarchar Value 
        int Format 
        uniqueidentifier CustomEnumId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SupplyAgreementInputTimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier SupplyAgreementId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        nvarchar SubType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SupplyAgreementMetadataTimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier SupplyAgreementId FK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        nvarchar SubType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SupplyAgreements" {
        uniqueidentifier Id PK
        nvarchar InternalReference 
        nvarchar ExternalReference 
        uniqueidentifier PricingAgreementId 
        uniqueidentifier SourcingAgreementId 
        datetimeoffset ExpectedStartDateTimeOffset 
        datetimeoffset ExpectedEndDateTimeOffset 
        datetimeoffset StartDateTimeOffset 
        datetimeoffset EndDateTimeOffset 
        int SupplyAgreementType 
        datetimeoffset PositionClosingDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.SupplyAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.SupplyAgreementInputTimeSeries" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.SupplyAgreementMetadataTimeSeries" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.SourcingCluster_SupplyAgreement" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
    "PM.FixationRequests" }o--|| "PM.SupplyAgreements" : "SupplyAgreementId"
{
    "definitions":  {
                        "PM.SupplyAgreementMetadataTimeSeries":  {
                                                                     "properties":  {
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "SnapshotTimestamp":  {
                                                                                                                  "type":  "integer",
                                                                                                                  "description":  "int"
                                                                                                              },
                                                                                        "Revision":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                        "DataSlotReference":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "nvarchar"
                                                                                                              },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                        "TimeSeriesCode":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "nvarchar"
                                                                                                           },
                                                                                        "SupplyAgreementId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to PM.SupplyAgreements"
                                                                                                              },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "SubType":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "PM.SupplyAgreements":  {
                                                    "properties":  {
                                                                       "SourcingAgreementId":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "PositionClosingDate":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "ExpectedEndDateTimeOffset":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                       "SupplyAgreementType":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "PricingAgreementId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                       "ExternalReference":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                       "StartDateTimeOffset":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                       "ExpectedStartDateTimeOffset":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                       "InternalReference":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                       "EndDateTimeOffset":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                   },
                                                    "type":  "object"
                                                },
                        "PM.SupplyAgreementInputTimeSeries":  {
                                                                  "properties":  {
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "SnapshotTimestamp":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                     "Revision":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                     "DataSlotReference":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "nvarchar"
                                                                                                           },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "TimeSeriesCode":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                     "SupplyAgreementId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to PM.SupplyAgreements"
                                                                                                           },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "SubType":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "PM.SupplyAgreementDetails":  {
                                                          "properties":  {
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "Value":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Format":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "Key":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                             "SupplyAgreementId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to PM.SupplyAgreements"
                                                                                                   },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "CustomEnumId":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "FK to PM.CustomEnums"
                                                                                              }
                                                                         },
                                                          "type":  "object"
                                                      }
                    },
    "title":  "PM.SupplyAgreement",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Trade Summary

Aggregate Root: TradeSummary

Represents summaries of trading activities with their details and key values for reporting purposes.

erDiagram
    "PM.TradeSummaries" {
        uniqueidentifier Id PK
        bit IsDeal 
        uniqueidentifier AggregateRootId 
        uniqueidentifier LatestVersionId 
        uniqueidentifier AgreementId 
        int StrategyExecutionType 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        int LatestVersionNumber 
        nvarchar AggregateRootInternalReference 
        nvarchar AggregateRootExternalReference 
        datetimeoffset DeliveryPeriodStartDate 
        datetimeoffset DeliveryPeriodEndDate 
        uniqueidentifier SourcingProductElementId FK
        int TradeContractType 
        uniqueidentifier CommodityTypeId FK
        int LoadType 
        int SettlementMethod 
        uniqueidentifier SourcePortfolioId FK
        uniqueidentifier SourceBookId FK
        int SourceTradeDirection 
        uniqueidentifier TargetPortfolioId FK
        uniqueidentifier TargetBookId FK
        int TargetTradeDirection 
        decimal ContractedCapacity 
        int ContractedCapacityUnit 
        int OrderType 
        int OrderCondition 
        decimal MinimalExecutionVolume 
        int MinimalExecutionVolumeUnit 
        decimal UndisclosedVolume 
        int UndisclosedVolumeUnit 
        decimal Price 
        uniqueidentifier ChainId 
        int PriceUnit 
        bit VoiceBrokered 
        datetimeoffset TerminationDate 
        datetimeoffset EntityCreateDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier SourceSourcingClusterId 
        uniqueidentifier TargetSourcingClusterId 
        int DealConfirmationStatus 
        int OrderStatus 
        int SourceBookActionRunLatestStatus 
        int TargetBookActionRunLatestStatus 
        decimal TotalNotionalContractQuantity 
        int TotalNotionalContractQuantityUnit 
        uniqueidentifier FixationRequestId FK
        uniqueidentifier FixationSubRequestId FK
        nvarchar CounterReason 
        uniqueidentifier CounteredByCounterDealId 
        uniqueidentifier CounteredOriginalDealId 
        bit CounteringCompleted 
        nvarchar DeliveryLocationDescription 
        datetimeoffset TransactionDateTimeOffset 
    }

    "PM.TradeSummary_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier TradeSummaryId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.TradeSummaries" }o--|| "PM.Portfolios" : "TargetPortfolioId"
    "PM.TradeSummaries" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.TradeSummary_CategoryLabel" }o--|| "PM.TradeSummaries" : "TradeSummaryId"
    "PM.TradeSummaries" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.TradeSummaries" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.TradeSummaries" }o--|| "PM.Books" : "SourceBookId"
    "PM.TradeSummaries" }o--|| "PM.Books" : "TargetBookId"
    "PM.TradeSummaries" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.TradeSummaries" }o--|| "PM.Portfolios" : "SourcePortfolioId"
erDiagram
    "PM.TradeSummaries" {
        uniqueidentifier Id PK
        bit IsDeal 
        uniqueidentifier AggregateRootId 
        uniqueidentifier LatestVersionId 
        uniqueidentifier AgreementId 
        int StrategyExecutionType 
        int ProcurementPeriodInMonths 
        int ProcurementOffsetPeriodInMonths 
        int ProcurementDeliveryPeriodInMonths 
        int LatestVersionNumber 
        nvarchar AggregateRootInternalReference 
        nvarchar AggregateRootExternalReference 
        datetimeoffset DeliveryPeriodStartDate 
        datetimeoffset DeliveryPeriodEndDate 
        uniqueidentifier SourcingProductElementId FK
        int TradeContractType 
        uniqueidentifier CommodityTypeId FK
        int LoadType 
        int SettlementMethod 
        uniqueidentifier SourcePortfolioId FK
        uniqueidentifier SourceBookId FK
        int SourceTradeDirection 
        uniqueidentifier TargetPortfolioId FK
        uniqueidentifier TargetBookId FK
        int TargetTradeDirection 
        decimal ContractedCapacity 
        int ContractedCapacityUnit 
        int OrderType 
        int OrderCondition 
        decimal MinimalExecutionVolume 
        int MinimalExecutionVolumeUnit 
        decimal UndisclosedVolume 
        int UndisclosedVolumeUnit 
        decimal Price 
        uniqueidentifier ChainId 
        int PriceUnit 
        bit VoiceBrokered 
        datetimeoffset TerminationDate 
        datetimeoffset EntityCreateDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier SourceSourcingClusterId 
        uniqueidentifier TargetSourcingClusterId 
        int DealConfirmationStatus 
        int OrderStatus 
        int SourceBookActionRunLatestStatus 
        int TargetBookActionRunLatestStatus 
        decimal TotalNotionalContractQuantity 
        int TotalNotionalContractQuantityUnit 
        uniqueidentifier FixationRequestId FK
        uniqueidentifier FixationSubRequestId FK
        nvarchar CounterReason 
        uniqueidentifier CounteredByCounterDealId 
        uniqueidentifier CounteredOriginalDealId 
        bit CounteringCompleted 
        nvarchar DeliveryLocationDescription 
        datetimeoffset TransactionDateTimeOffset 
    }

    "PM.TradeSummary_CategoryLabel" {
        uniqueidentifier Id PK
        uniqueidentifier TradeSummaryId FK
        uniqueidentifier CategoryId 
        uniqueidentifier CategoryLabelId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.TradeSummaries" }o--|| "PM.Portfolios" : "TargetPortfolioId"
    "PM.TradeSummaries" }o--|| "PM.SourcingProductElements" : "SourcingProductElementId"
    "PM.TradeSummary_CategoryLabel" }o--|| "PM.TradeSummaries" : "TradeSummaryId"
    "PM.TradeSummaries" }o--|| "PM.FixationRequests" : "FixationRequestId"
    "PM.TradeSummaries" }o--|| "PM.FixationSubRequests" : "FixationSubRequestId"
    "PM.TradeSummaries" }o--|| "PM.Books" : "SourceBookId"
    "PM.TradeSummaries" }o--|| "PM.Books" : "TargetBookId"
    "PM.TradeSummaries" }o--|| "PM.CommodityTypes" : "CommodityTypeId"
    "PM.TradeSummaries" }o--|| "PM.Portfolios" : "SourcePortfolioId"
{
    "definitions":  {
                        "PM.TradeSummary_CategoryLabel":  {
                                                              "properties":  {
                                                                                 "TradeSummaryId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to PM.TradeSummaries"
                                                                                                    },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "CategoryLabelId":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "CategoryId":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "PM.TradeSummaries":  {
                                                  "properties":  {
                                                                     "Tenant":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                     "CounteredOriginalDealId":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                     "AggregateRootInternalReference":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                     "ContractedCapacityUnit":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                     "AggregateRootExternalReference":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                     "ProcurementDeliveryPeriodInMonths":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                     "DeliveryPeriodStartDate":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                     "EntityUpdatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "ContractedCapacity":  {
                                                                                                "type":  "string",
                                                                                                "description":  "decimal"
                                                                                            },
                                                                     "SourceTradeDirection":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                     "CounteringCompleted":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                     "FixationRequestId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to PM.FixationRequests"
                                                                                           },
                                                                     "OrderCondition":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                     "TerminationDate":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                                     "SourceBookId":  {
                                                                                          "type":  "string",
                                                                                          "description":  "FK to PM.Books"
                                                                                      },
                                                                     "AggregateRootId":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                     "AgreementId":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                     "ProcurementPeriodInMonths":  {
                                                                                                       "type":  "integer",
                                                                                                       "description":  "int"
                                                                                                   },
                                                                     "TargetPortfolioId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to PM.Portfolios"
                                                                                           },
                                                                     "TargetSourcingClusterId":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                     "ChainId":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                     "CounteredByCounterDealId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                     "LoadType":  {
                                                                                      "type":  "integer",
                                                                                      "description":  "int"
                                                                                  },
                                                                     "LatestVersionId":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                     "VoiceBrokered":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                     "TotalNotionalContractQuantityUnit":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                     "SourceBookActionRunLatestStatus":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                     "EntityUpdatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "EntityCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "DeliveryLocationDescription":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                     "LatestVersionNumber":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                     "ProcurementOffsetPeriodInMonths":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                     "TransactionDateTimeOffset":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                     "CounterReason":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                     "SourceSourcingClusterId":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                     "IsDeal":  {
                                                                                    "type":  "boolean",
                                                                                    "description":  "bit"
                                                                                },
                                                                     "SourcePortfolioId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to PM.Portfolios"
                                                                                           },
                                                                     "EntityCreatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Id":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                     "TargetTradeDirection":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                     "PriceUnit":  {
                                                                                       "type":  "integer",
                                                                                       "description":  "int"
                                                                                   },
                                                                     "DealConfirmationStatus":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                     "UndisclosedVolumeUnit":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                     "FixationSubRequestId":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "FK to PM.FixationSubRequests"
                                                                                              },
                                                                     "TradeContractType":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                     "SourcingProductElementId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to PM.SourcingProductElements"
                                                                                                  },
                                                                     "EntityCreateDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                     "SettlementMethod":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                     "MinimalExecutionVolume":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "decimal"
                                                                                                },
                                                                     "MinimalExecutionVolumeUnit":  {
                                                                                                        "type":  "integer",
                                                                                                        "description":  "int"
                                                                                                    },
                                                                     "StrategyExecutionType":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                     "CommodityTypeId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to PM.CommodityTypes"
                                                                                         },
                                                                     "TargetBookId":  {
                                                                                          "type":  "string",
                                                                                          "description":  "FK to PM.Books"
                                                                                      },
                                                                     "OrderStatus":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                     "TotalNotionalContractQuantity":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "decimal"
                                                                                                       },
                                                                     "Price":  {
                                                                                   "type":  "string",
                                                                                   "description":  "decimal"
                                                                               },
                                                                     "Concealed":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "bit"
                                                                                   },
                                                                     "UndisclosedVolume":  {
                                                                                               "type":  "string",
                                                                                               "description":  "decimal"
                                                                                           },
                                                                     "TargetBookActionRunLatestStatus":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                     "OrderType":  {
                                                                                       "type":  "integer",
                                                                                       "description":  "int"
                                                                                   },
                                                                     "DeliveryPeriodEndDate":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               }
                                                                 },
                                                  "type":  "object"
                                              }
                    },
    "title":  "PM.TradeSummary",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Custom Enum

Aggregate Root: CustomEnum

Represents custom enumerations with components, values, and key values for flexible data classification.

erDiagram
    "PM.CustomEnumComponentValueKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentValueId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponentValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentId FK
        nvarchar Value 
        nvarchar ScriptValue 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponents" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumId FK
        nvarchar Name 
        nvarchar ExternalReference 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnums" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.Books" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductElementRuleConfigDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductElementRuleConfigDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductElementRuleConfigDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductElementRuleConfigDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
erDiagram
    "PM.CustomEnumComponentValueKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentValueId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponentValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentId FK
        nvarchar Value 
        nvarchar ScriptValue 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponents" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumId FK
        nvarchar Name 
        nvarchar ExternalReference 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnums" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.Books" }o--|| "CRM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "Pricing.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "ApplicationCore.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.Books" }o--|| "PM.CustomEnumComponents" : "ProductCustomEnumComponentId"
    "PM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingClusterDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductComponentRuleConfigDetailSet" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductElementRuleConfigDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductElementRuleConfigDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductElementRuleConfigDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SourcingProductElementRuleConfigDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.SupplyAgreementDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.BookActionDetails" }o--|| "PM.CustomEnums" : "CustomEnumId"
{
    "definitions":  {
                        "PM.CustomEnumComponentValues":  {
                                                             "properties":  {
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "CustomEnumComponentId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to PM.CustomEnumComponents"
                                                                                                          },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "ScriptValue":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                "Value":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                                "StartDate":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "PM.CustomEnumComponents":  {
                                                        "properties":  {
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Name":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "EndDate":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                           "ExternalReference":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "StartDate":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                                           "CustomEnumId":  {
                                                                                                "type":  "string",
                                                                                                "description":  "FK to PM.CustomEnums"
                                                                                            }
                                                                       },
                                                        "type":  "object"
                                                    },
                        "PM.CustomEnumComponentValueKeyValues":  {
                                                                     "properties":  {
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "Key":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                        "CustomEnumComponentValueId":  {
                                                                                                                           "type":  "string",
                                                                                                                           "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                       },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Value":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "PM.CustomEnums":  {
                                               "properties":  {
                                                                  "Concealed":  {
                                                                                    "type":  "boolean",
                                                                                    "description":  "bit"
                                                                                },
                                                                  "EntityUpdatedAuthToken":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                  "Id":  {
                                                                             "format":  "uuid",
                                                                             "description":  "uniqueidentifier",
                                                                             "type":  "string"
                                                                         },
                                                                  "Description":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                  "EntityCreatedDateTime":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                  "Name":  {
                                                                               "type":  "string",
                                                                               "description":  "nvarchar"
                                                                           },
                                                                  "EntityUpdatedDateTime":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                  "EntityCreatedAuthToken":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                  "Tenant":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             }
                                                              },
                                               "type":  "object"
                                           }
                    },
    "title":  "PM.CustomEnum",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

4 - Price Forward Curve module

The Price Forward Curve module in Vertex

This is a description of the Price Forward Curve module

4.1 - PFC Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Price Forward Curve Group

Aggregate Root: PriceForwardCurveGroup

Represents groups of price forward curves with their details and associated curves for price forecasting and analysis.

erDiagram
    "PFC.PriceForwardCurveGroupDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier PriceForwardCurveGroupId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PFC.PriceForwardCurveGroups" {
        uniqueidentifier Id PK
        nvarchar Name 
        int Unit 
        int Interval 
        int IntervalType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier ProductCustomEnumComponentId 
        nvarchar ExternalReference 
        nvarchar InternalReference 
    }

    "PFC.PriceForwardCurves" {
        uniqueidentifier Id PK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        datetimeoffset Start 
        datetimeoffset End 
        uniqueidentifier PriceForwardCurveGroupId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset CalculationDate 
        datetimeoffset CreationDateTime 
        bit Revoked 
    }

    "PFC.PriceForwardCurveGroupDetails" }o--|| "PFC.PriceForwardCurveGroups" : "PriceForwardCurveGroupId"
    "PFC.PriceForwardCurves" }o--|| "PFC.PriceForwardCurveGroups" : "PriceForwardCurveGroupId"
erDiagram
    "PFC.PriceForwardCurveGroupDetails" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        int FormatType 
        uniqueidentifier CustomEnumId 
        uniqueidentifier PriceForwardCurveGroupId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PFC.PriceForwardCurveGroups" {
        uniqueidentifier Id PK
        nvarchar Name 
        int Unit 
        int Interval 
        int IntervalType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier ProductCustomEnumComponentId 
        nvarchar ExternalReference 
        nvarchar InternalReference 
    }

    "PFC.PriceForwardCurves" {
        uniqueidentifier Id PK
        nvarchar TimeSeriesCode 
        nvarchar DataSlotReference 
        nvarchar Revision 
        int SnapshotTimestamp 
        datetimeoffset Start 
        datetimeoffset End 
        uniqueidentifier PriceForwardCurveGroupId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset CalculationDate 
        datetimeoffset CreationDateTime 
        bit Revoked 
    }

    "PFC.PriceForwardCurveGroupDetails" }o--|| "PFC.PriceForwardCurveGroups" : "PriceForwardCurveGroupId"
    "PFC.PriceForwardCurves" }o--|| "PFC.PriceForwardCurveGroups" : "PriceForwardCurveGroupId"
{
    "definitions":  {
                        "PFC.PriceForwardCurveGroups":  {
                                                            "properties":  {
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Name":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                               "InternalReference":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                               "ExternalReference":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                               "Interval":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                               "Unit":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "IntervalType":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                               "ProductCustomEnumComponentId":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "PFC.PriceForwardCurves":  {
                                                       "properties":  {
                                                                          "End":  {
                                                                                      "format":  "date-time",
                                                                                      "description":  "datetimeoffset",
                                                                                      "type":  "string"
                                                                                  },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "SnapshotTimestamp":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                          "CreationDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                          "CalculationDate":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                          "Start":  {
                                                                                        "format":  "date-time",
                                                                                        "description":  "datetimeoffset",
                                                                                        "type":  "string"
                                                                                    },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "DataSlotReference":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "TimeSeriesCode":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                          "Revoked":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "Revision":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                          "PriceForwardCurveGroupId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to PFC.PriceForwardCurveGroups"
                                                                                                       }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "PFC.PriceForwardCurveGroupDetails":  {
                                                                  "properties":  {
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "Value":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "Key":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "FormatType":  {
                                                                                                        "type":  "integer",
                                                                                                        "description":  "int"
                                                                                                    },
                                                                                     "CustomEnumId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                     "PriceForwardCurveGroupId":  {
                                                                                                                      "type":  "string",
                                                                                                                      "description":  "FK to PFC.PriceForwardCurveGroups"
                                                                                                                  }
                                                                                 },
                                                                  "type":  "object"
                                                              }
                    },
    "title":  "PFC.PriceForwardCurveGroup",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

5 - Aggregate module

The Aggregate module in Vertex

This is a description of the Aggregate module

5.1 - Aggregate Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Ingestion Batch

Aggregate Root: IngestionBatch

Represents batches of data ingestion with work items, parts, and tree mutation entries for data processing.

erDiagram
    "Aggregate.AggregationWorkItems" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionBatchId FK
        int Status 
        nvarchar StatusReason 
        uniqueidentifier TargetTreeNodeId 
        nvarchar SerializedAggregationInputTreeNodesDataContainer 
        int Partition 
        bigint Offset 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier TimeSeriesId 
    }

    "Aggregate.IngestionBatches" {
        uniqueidentifier Id PK
        nvarchar ExternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int ExpectedNumberOfWorkItemsInBatch 
        int Status 
        nvarchar StatusReason 
        int BatchType 
        int InitiatorType 
        uniqueidentifier InitiatorId 
        uniqueidentifier TreeId FK
    }

    "Aggregate.IngestionWorkItemParts" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionWorkItemId FK
        uniqueidentifier TargetNodeId FK
        int StartMoment 
        int EndMoment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier TimeSeriesId 
        int Status 
        nvarchar StatusReason 
        bigint Offset 
        int Partition 
    }

    "Aggregate.IngestionWorkItems" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionBatchId FK
        uniqueidentifier IngestionTriggerId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int Status 
        nvarchar StatusReason 
    }

    "Aggregate.TreeMutationEntries" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionBatchId FK
        uniqueidentifier TargetedNodeId 
        int TreeMutationType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int DataType 
        int NodeType 
        int Status 
        nvarchar StatusReason 
        uniqueidentifier LinkedEntityId 
        int LinkedEntityType 
    }

    "Aggregate.TreeMutationEntryMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier TreeMutationEntryId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeMutationMemberships" {
        uniqueidentifier Id PK
        uniqueidentifier TreeMutationEntryId FK
        uniqueidentifier TreeId FK
        uniqueidentifier ParentTreeMutationEntryId FK
        datetimeoffset Start 
        datetimeoffset End 
        datetimeoffset EffectuationMoment 
        int Status 
        nvarchar StatusReason 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.AggregationWorkItems" }o--|| "Aggregate.IngestionBatches" : "IngestionBatchId"
    "Aggregate.TreeMutationEntries" }o--|| "Aggregate.IngestionBatches" : "IngestionBatchId"
    "Aggregate.IngestionBatches" }o--|| "Aggregate.Trees" : "TreeId"
    "Aggregate.IngestionWorkItems" }o--|| "Aggregate.IngestionBatches" : "IngestionBatchId"
    "Aggregate.IngestionWorkItemParts" }o--|| "Aggregate.TreeNodes" : "TargetNodeId"
    "Aggregate.IngestionWorkItemParts" }o--|| "Aggregate.IngestionWorkItems" : "IngestionWorkItemId"
    "Aggregate.IngestionWorkItems" }o--|| "Aggregate.IngestionTriggers" : "IngestionTriggerId"
    "Aggregate.TreeMutationEntryMetadatas" }o--|| "Aggregate.TreeMutationEntries" : "TreeMutationEntryId"
    "Aggregate.TreeMutationMemberships" }o--|| "Aggregate.TreeMutationEntries" : "ParentTreeMutationEntryId"
    "Aggregate.TreeMutationMemberships" }o--|| "Aggregate.TreeMutationEntries" : "TreeMutationEntryId"
    "Aggregate.TreeMutationMemberships" }o--|| "Aggregate.Trees" : "TreeId"
erDiagram
    "Aggregate.AggregationWorkItems" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionBatchId FK
        int Status 
        nvarchar StatusReason 
        uniqueidentifier TargetTreeNodeId 
        nvarchar SerializedAggregationInputTreeNodesDataContainer 
        int Partition 
        bigint Offset 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier TimeSeriesId 
    }

    "Aggregate.IngestionBatches" {
        uniqueidentifier Id PK
        nvarchar ExternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int ExpectedNumberOfWorkItemsInBatch 
        int Status 
        nvarchar StatusReason 
        int BatchType 
        int InitiatorType 
        uniqueidentifier InitiatorId 
        uniqueidentifier TreeId FK
    }

    "Aggregate.IngestionWorkItemParts" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionWorkItemId FK
        uniqueidentifier TargetNodeId FK
        int StartMoment 
        int EndMoment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier TimeSeriesId 
        int Status 
        nvarchar StatusReason 
        bigint Offset 
        int Partition 
    }

    "Aggregate.IngestionWorkItems" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionBatchId FK
        uniqueidentifier IngestionTriggerId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int Status 
        nvarchar StatusReason 
    }

    "Aggregate.TreeMutationEntries" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionBatchId FK
        uniqueidentifier TargetedNodeId 
        int TreeMutationType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int DataType 
        int NodeType 
        int Status 
        nvarchar StatusReason 
        uniqueidentifier LinkedEntityId 
        int LinkedEntityType 
    }

    "Aggregate.TreeMutationEntryMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier TreeMutationEntryId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeMutationMemberships" {
        uniqueidentifier Id PK
        uniqueidentifier TreeMutationEntryId FK
        uniqueidentifier TreeId FK
        uniqueidentifier ParentTreeMutationEntryId FK
        datetimeoffset Start 
        datetimeoffset End 
        datetimeoffset EffectuationMoment 
        int Status 
        nvarchar StatusReason 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.AggregationWorkItems" }o--|| "Aggregate.IngestionBatches" : "IngestionBatchId"
    "Aggregate.TreeMutationEntries" }o--|| "Aggregate.IngestionBatches" : "IngestionBatchId"
    "Aggregate.IngestionBatches" }o--|| "Aggregate.Trees" : "TreeId"
    "Aggregate.IngestionWorkItems" }o--|| "Aggregate.IngestionBatches" : "IngestionBatchId"
    "Aggregate.IngestionWorkItemParts" }o--|| "Aggregate.TreeNodes" : "TargetNodeId"
    "Aggregate.IngestionWorkItemParts" }o--|| "Aggregate.IngestionWorkItems" : "IngestionWorkItemId"
    "Aggregate.IngestionWorkItems" }o--|| "Aggregate.IngestionTriggers" : "IngestionTriggerId"
    "Aggregate.TreeMutationEntryMetadatas" }o--|| "Aggregate.TreeMutationEntries" : "TreeMutationEntryId"
    "Aggregate.TreeMutationMemberships" }o--|| "Aggregate.TreeMutationEntries" : "ParentTreeMutationEntryId"
    "Aggregate.TreeMutationMemberships" }o--|| "Aggregate.TreeMutationEntries" : "TreeMutationEntryId"
    "Aggregate.TreeMutationMemberships" }o--|| "Aggregate.Trees" : "TreeId"
{
    "definitions":  {
                        "Aggregate.TreeMutationMemberships":  {
                                                                  "properties":  {
                                                                                     "End":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "EffectuationMoment":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                     "StatusReason":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "nvarchar"
                                                                                                      },
                                                                                     "Start":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "TreeMutationEntryId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Aggregate.TreeMutationEntries"
                                                                                                             },
                                                                                     "TreeId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to Aggregate.Trees"
                                                                                                },
                                                                                     "Status":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "ParentTreeMutationEntryId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to Aggregate.TreeMutationEntries"
                                                                                                                   }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Aggregate.TreeMutationEntryMetadatas":  {
                                                                     "properties":  {
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "Key":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Value":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "TreeMutationEntryId":  {
                                                                                                                    "type":  "string",
                                                                                                                    "description":  "FK to Aggregate.TreeMutationEntries"
                                                                                                                },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "Aggregate.IngestionBatches":  {
                                                           "properties":  {
                                                                              "BatchType":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "InitiatorId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "StatusReason":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                              "ExpectedNumberOfWorkItemsInBatch":  {
                                                                                                                       "type":  "integer",
                                                                                                                       "description":  "int"
                                                                                                                   },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                              "TreeId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to Aggregate.Trees"
                                                                                         },
                                                                              "ExternalReference":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                              "InitiatorType":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "Status":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "Aggregate.AggregationWorkItems":  {
                                                               "properties":  {
                                                                                  "Id":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "Concealed":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                                  "StatusReason":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                  "SerializedAggregationInputTreeNodesDataContainer":  {
                                                                                                                                           "type":  "string",
                                                                                                                                           "description":  "nvarchar"
                                                                                                                                       },
                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "TargetTreeNodeId":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                  "TimeSeriesId":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "Offset":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "bigint"
                                                                                             },
                                                                                  "IngestionBatchId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to Aggregate.IngestionBatches"
                                                                                                       },
                                                                                  "Tenant":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                  "Partition":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                                  "Status":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                                  "EntityCreatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            }
                                                                              },
                                                               "type":  "object"
                                                           },
                        "Aggregate.IngestionWorkItems":  {
                                                             "properties":  {
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "IngestionBatchId":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "FK to Aggregate.IngestionBatches"
                                                                                                     },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "StatusReason":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "IngestionTriggerId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to Aggregate.IngestionTriggers"
                                                                                                       },
                                                                                "Status":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "Aggregate.IngestionWorkItemParts":  {
                                                                 "properties":  {
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "StatusReason":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                    "IngestionWorkItemId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to Aggregate.IngestionWorkItems"
                                                                                                            },
                                                                                    "TimeSeriesId":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "EndMoment":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                    "Offset":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "bigint"
                                                                                               },
                                                                                    "Partition":  {
                                                                                                      "type":  "integer",
                                                                                                      "description":  "int"
                                                                                                  },
                                                                                    "StartMoment":  {
                                                                                                        "type":  "integer",
                                                                                                        "description":  "int"
                                                                                                    },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "TargetNodeId":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "FK to Aggregate.TreeNodes"
                                                                                                     },
                                                                                    "Status":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "Aggregate.TreeMutationEntries":  {
                                                              "properties":  {
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "TargetedNodeId":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "LinkedEntityType":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "StatusReason":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "IngestionBatchId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to Aggregate.IngestionBatches"
                                                                                                      },
                                                                                 "DataType":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                 "LinkedEntityId":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                 "TreeMutationType":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                 "NodeType":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                                 "Status":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           }
                                                                             },
                                                              "type":  "object"
                                                          }
                    },
    "title":  "Aggregate.IngestionBatch",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Ingestion Trigger

Aggregate Root: IngestionTrigger

Represents triggers for data ingestion with their associated key values for configuration and control.

erDiagram
    "Aggregate.IngestionTriggerKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionTriggerId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "Aggregate.IngestionTriggers" {
        uniqueidentifier Id PK
        nvarchar ExternalReference 
        datetimeoffset CreatedDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset DataEnd 
        datetimeoffset DataExpiration 
        datetimeoffset DataStart 
        uniqueidentifier IngestionBatchId 
    }

    "Aggregate.IngestionTriggerKeyValues" }o--|| "Aggregate.IngestionTriggers" : "IngestionTriggerId"
    "Aggregate.IngestionWorkItems" }o--|| "Aggregate.IngestionTriggers" : "IngestionTriggerId"
erDiagram
    "Aggregate.IngestionTriggerKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier IngestionTriggerId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Key 
        nvarchar Value 
    }

    "Aggregate.IngestionTriggers" {
        uniqueidentifier Id PK
        nvarchar ExternalReference 
        datetimeoffset CreatedDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset DataEnd 
        datetimeoffset DataExpiration 
        datetimeoffset DataStart 
        uniqueidentifier IngestionBatchId 
    }

    "Aggregate.IngestionTriggerKeyValues" }o--|| "Aggregate.IngestionTriggers" : "IngestionTriggerId"
    "Aggregate.IngestionWorkItems" }o--|| "Aggregate.IngestionTriggers" : "IngestionTriggerId"
{
    "definitions":  {
                        "Aggregate.IngestionTriggerKeyValues":  {
                                                                    "properties":  {
                                                                                       "Concealed":  {
                                                                                                         "type":  "boolean",
                                                                                                         "description":  "bit"
                                                                                                     },
                                                                                       "EntityUpdatedAuthToken":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                       "Id":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                       "Key":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                       "Value":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                       "EntityCreatedDateTime":  {
                                                                                                                     "format":  "date-time",
                                                                                                                     "description":  "datetimeoffset",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                       "EntityUpdatedDateTime":  {
                                                                                                                     "format":  "date-time",
                                                                                                                     "description":  "datetimeoffset",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                       "IngestionTriggerId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to Aggregate.IngestionTriggers"
                                                                                                              },
                                                                                       "EntityCreatedAuthToken":  {
                                                                                                                      "format":  "uuid",
                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                       "Tenant":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  }
                                                                                   },
                                                                    "type":  "object"
                                                                },
                        "Aggregate.IngestionTriggers":  {
                                                            "properties":  {
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "CreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                               "DataExpiration":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "IngestionBatchId":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                               "ExternalReference":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                               "DataEnd":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "DataStart":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             }
                                                                           },
                                                            "type":  "object"
                                                        }
                    },
    "title":  "Aggregate.IngestionTrigger",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Tree

Aggregate Root: Tree

Represents hierarchical tree structures for data organization and relationships.

erDiagram
    "Aggregate.TreeMemberships" {
        uniqueidentifier Id PK
        uniqueidentifier TreeId FK
        uniqueidentifier NodeId FK
        int LastCalculationMoment 
        int RecalculationRequest 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset EffectuationMoment 
        datetimeoffset End 
        bit IsLatest 
        uniqueidentifier ParentTreeNodeId 
        datetimeoffset Start 
    }

    "Aggregate.Trees" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeMemberships" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.TreeMemberships" }o--|| "Aggregate.Trees" : "TreeId"
    "Aggregate.TreeMutationMemberships" }o--|| "Aggregate.Trees" : "TreeId"
    "Aggregate.IngestionBatches" }o--|| "Aggregate.Trees" : "TreeId"
erDiagram
    "Aggregate.TreeMemberships" {
        uniqueidentifier Id PK
        uniqueidentifier TreeId FK
        uniqueidentifier NodeId FK
        int LastCalculationMoment 
        int RecalculationRequest 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        datetimeoffset EffectuationMoment 
        datetimeoffset End 
        bit IsLatest 
        uniqueidentifier ParentTreeNodeId 
        datetimeoffset Start 
    }

    "Aggregate.Trees" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeMemberships" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.TreeMemberships" }o--|| "Aggregate.Trees" : "TreeId"
    "Aggregate.TreeMutationMemberships" }o--|| "Aggregate.Trees" : "TreeId"
    "Aggregate.IngestionBatches" }o--|| "Aggregate.Trees" : "TreeId"
{
    "definitions":  {
                        "Aggregate.TreeMemberships":  {
                                                          "properties":  {
                                                                             "End":  {
                                                                                         "format":  "date-time",
                                                                                         "description":  "datetimeoffset",
                                                                                         "type":  "string"
                                                                                     },
                                                                             "LastCalculationMoment":  {
                                                                                                           "type":  "integer",
                                                                                                           "description":  "int"
                                                                                                       },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "IsLatest":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "EffectuationMoment":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                             "Start":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                                             "NodeId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to Aggregate.TreeNodes"
                                                                                        },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "RecalculationRequest":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "TreeId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to Aggregate.Trees"
                                                                                        },
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "ParentTreeNodeId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       }
                                                                         },
                                                          "type":  "object"
                                                      },
                        "Aggregate.Trees":  {
                                                "properties":  {
                                                                   "Concealed":  {
                                                                                     "type":  "boolean",
                                                                                     "description":  "bit"
                                                                                 },
                                                                   "EntityUpdatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Id":  {
                                                                              "format":  "uuid",
                                                                              "description":  "uniqueidentifier",
                                                                              "type":  "string"
                                                                          },
                                                                   "EntityCreatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "Name":  {
                                                                                "type":  "string",
                                                                                "description":  "nvarchar"
                                                                            },
                                                                   "EntityUpdatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "EntityCreatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Tenant":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              }
                                                               },
                                                "type":  "object"
                                            }
                    },
    "title":  "Aggregate.Tree",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Tree Node

Aggregate Root: TreeNode

Represents individual nodes within tree structures with their data references, metadata, and events.

erDiagram
    "Aggregate.CalculatedDataReferences" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        int Key 
        uniqueidentifier TimeSeriesId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier LinkedEntityId 
        int LinkedEntityType 
        int DataVersion 
        bit HasDataRetainClaim 
        int IngestionMoment 
        bit IsPreliminary 
    }

    "Aggregate.DataReferences" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        int Key 
        uniqueidentifier TimeSeriesId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int DataVersion 
        bit HasDataRetainClaim 
        int IngestionMoment 
        bit IsPreliminary 
    }

    "Aggregate.DataRetainClaims" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        int DataVersion 
        uniqueidentifier ClaimedByAuthToken 
        nvarchar ClaimedByProcess 
        nvarchar ClaimedDescription 
        int Expiration 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeNodeEvents" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeNodeMetadataSet" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeNodes" {
        uniqueidentifier Id PK
        int DataType 
        nvarchar Name 
        int NodeType 
        int LastDataVersion 
        int LastCalculatedDataVersion 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier LinkedEntityId 
        int LinkedEntityType 
    }

    "Aggregate.CalculatedDataReferences" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.DataReferences" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.DataRetainClaims" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.TreeNodeEvents" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.TreeNodeMetadataSet" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.IngestionWorkItemParts" }o--|| "Aggregate.TreeNodes" : "TargetNodeId"
    "Aggregate.TreeMemberships" }o--|| "Aggregate.TreeNodes" : "NodeId"
erDiagram
    "Aggregate.CalculatedDataReferences" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        int Key 
        uniqueidentifier TimeSeriesId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier LinkedEntityId 
        int LinkedEntityType 
        int DataVersion 
        bit HasDataRetainClaim 
        int IngestionMoment 
        bit IsPreliminary 
    }

    "Aggregate.DataReferences" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        int Key 
        uniqueidentifier TimeSeriesId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int DataVersion 
        bit HasDataRetainClaim 
        int IngestionMoment 
        bit IsPreliminary 
    }

    "Aggregate.DataRetainClaims" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        int DataVersion 
        uniqueidentifier ClaimedByAuthToken 
        nvarchar ClaimedByProcess 
        nvarchar ClaimedDescription 
        int Expiration 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeNodeEvents" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeNodeMetadataSet" {
        uniqueidentifier Id PK
        uniqueidentifier NodeId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Aggregate.TreeNodes" {
        uniqueidentifier Id PK
        int DataType 
        nvarchar Name 
        int NodeType 
        int LastDataVersion 
        int LastCalculatedDataVersion 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        uniqueidentifier LinkedEntityId 
        int LinkedEntityType 
    }

    "Aggregate.CalculatedDataReferences" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.DataReferences" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.DataRetainClaims" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.TreeNodeEvents" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.TreeNodeMetadataSet" }o--|| "Aggregate.TreeNodes" : "NodeId"
    "Aggregate.IngestionWorkItemParts" }o--|| "Aggregate.TreeNodes" : "TargetNodeId"
    "Aggregate.TreeMemberships" }o--|| "Aggregate.TreeNodes" : "NodeId"
{
    "definitions":  {
                        "Aggregate.DataReferences":  {
                                                         "properties":  {
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "IsPreliminary":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "IngestionMoment":  {
                                                                                                    "type":  "integer",
                                                                                                    "description":  "int"
                                                                                                },
                                                                            "TimeSeriesId":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "DataVersion":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                            "HasDataRetainClaim":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                            "Key":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "NodeId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to Aggregate.TreeNodes"
                                                                                       }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "Aggregate.TreeNodeMetadataSet":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Key":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                                 "NodeId":  {
                                                                                                "type":  "string",
                                                                                                "description":  "FK to Aggregate.TreeNodes"
                                                                                            },
                                                                                 "Value":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "Aggregate.DataRetainClaims":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Expiration":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                              "ClaimedByProcess":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "ClaimedDescription":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                              "NodeId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to Aggregate.TreeNodes"
                                                                                         },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "DataVersion":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                              "ClaimedByAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "Aggregate.TreeNodeEvents":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "NodeId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to Aggregate.TreeNodes"
                                                                                       },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "Aggregate.CalculatedDataReferences":  {
                                                                   "properties":  {
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "IsPreliminary":  {
                                                                                                            "type":  "boolean",
                                                                                                            "description":  "bit"
                                                                                                        },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "LinkedEntityType":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Key":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                                      "IngestionMoment":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                                      "TimeSeriesId":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "DataVersion":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                      "HasDataRetainClaim":  {
                                                                                                                 "type":  "boolean",
                                                                                                                 "description":  "bit"
                                                                                                             },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                      "LinkedEntityId":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "NodeId":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "FK to Aggregate.TreeNodes"
                                                                                                 }
                                                                                  },
                                                                   "type":  "object"
                                                               },
                        "Aggregate.TreeNodes":  {
                                                    "properties":  {
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Name":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                       "LinkedEntityType":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "LastCalculatedDataVersion":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "LastDataVersion":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                       "DataType":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                       "LinkedEntityId":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                       "NodeType":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                   },
                                                    "type":  "object"
                                                }
                    },
    "title":  "Aggregate.TreeNode",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

6 - Greenchoice module

The Greenchoice module in Vertex

This is a description of the Greenchoice module

7 - Documents module

The Documents module in Vertex

This is a description of the document module

7.1 - Documents Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Document Store Composer

Aggregate Root: DocumentStoreComposer

Represents composers for document stores that manage document generation, storage, and retrieval processes.

erDiagram
    "Documents.DbObjectStore" {
        uniqueidentifier Id PK
        varbinary Content 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.DocumentChapterMetadata" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        uniqueidentifier DocumentChapterId FK
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.DocumentChapters" {
        uniqueidentifier Id PK
        bigint FileSize 
        nvarchar DocumentChapterCategory 
        nvarchar MD5Hash 
        nvarchar SHA1Hash 
        nvarchar InternalReference 
        nvarchar ChapterReference 
        uniqueidentifier DocumentId FK
        uniqueidentifier DocumentChapterTypeImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.DocumentExecutionHistories" {
        uniqueidentifier Id PK
        uniqueidentifier DocumentId FK
        uniqueidentifier DocumentChapterId 
        datetimeoffset DocumentStoreTriggerDateTime 
        datetimeoffset DocumentExecutionStartDateTime 
        datetimeoffset DocumentExecutionEndDateTime 
        nvarchar ErrorMessage 
        nvarchar ErrorStackTrace 
        nvarchar ErrorInnerExceptionTree 
        nvarchar ErrorBaseException 
        varbinary ErrorExceptionObject 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier DocumentActionImplementationId 
        uniqueidentifier DocumentChapterActionImplementationId 
        bit Concealed 
    }

    "Documents.DocumentExecutionProcessingLogs" {
        uniqueidentifier Id PK
        uniqueidentifier DocumentExecutionHistoryId FK
        uniqueidentifier CommandId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.DocumentGenerationItems" {
    }

    "Documents.DocumentGroups" {
        uniqueidentifier Id PK
        nvarchar ExternalReference 
        bit SuppressAutomaticProcessing 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int PriorityType 
    }

    "Documents.DocumentMetadata" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier DocumentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.Documents" {
        uniqueidentifier Id PK
        uniqueidentifier DocumentGroupId FK
        nvarchar FileName 
        datetimeoffset Created 
        nvarchar DocumentCategory 
        nvarchar DocumentSubCategory 
        nvarchar DocumentSubSubCategory 
        nvarchar DocumentTypeName 
        int DocumentDirectionType 
        int DocumentFormat 
        bigint FileSize 
        nvarchar MD5Hash 
        nvarchar SHA1Hash 
        nvarchar InternalReference 
        nvarchar MessageId 
        uniqueidentifier DocumentTypeImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ParentDocumentId FK
        nvarchar ExternalReference 
        nvarchar Sender 
        nvarchar Receiver 
        nvarchar CorrelationId 
        datetimeoffset PeriodStart 
        datetimeoffset PeriodEnd 
        bit Concealed 
        datetimeoffset MessageTimestamp 
    }

    "Documents.DocumentChapterMetadata" }o--|| "Documents.DocumentChapters" : "DocumentChapterId"
    "Documents.DocumentChapters" }o--|| "Documents.Documents" : "DocumentId"
    "Documents.DocumentExecutionHistories" }o--|| "Documents.Documents" : "DocumentId"
    "Documents.DocumentExecutionProcessingLogs" }o--|| "Documents.DocumentExecutionHistories" : "DocumentExecutionHistoryId"
    "Documents.Documents" }o--|| "Documents.DocumentGroups" : "DocumentGroupId"
    "Documents.DocumentMetadata" }o--|| "Documents.Documents" : "DocumentId"
    "Documents.Documents" }o--|| "Documents.Documents" : "ParentDocumentId"
erDiagram
    "Documents.DbObjectStore" {
        uniqueidentifier Id PK
        varbinary Content 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.DocumentChapterMetadata" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        uniqueidentifier DocumentChapterId FK
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.DocumentChapters" {
        uniqueidentifier Id PK
        bigint FileSize 
        nvarchar DocumentChapterCategory 
        nvarchar MD5Hash 
        nvarchar SHA1Hash 
        nvarchar InternalReference 
        nvarchar ChapterReference 
        uniqueidentifier DocumentId FK
        uniqueidentifier DocumentChapterTypeImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.DocumentExecutionHistories" {
        uniqueidentifier Id PK
        uniqueidentifier DocumentId FK
        uniqueidentifier DocumentChapterId 
        datetimeoffset DocumentStoreTriggerDateTime 
        datetimeoffset DocumentExecutionStartDateTime 
        datetimeoffset DocumentExecutionEndDateTime 
        nvarchar ErrorMessage 
        nvarchar ErrorStackTrace 
        nvarchar ErrorInnerExceptionTree 
        nvarchar ErrorBaseException 
        varbinary ErrorExceptionObject 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier DocumentActionImplementationId 
        uniqueidentifier DocumentChapterActionImplementationId 
        bit Concealed 
    }

    "Documents.DocumentExecutionProcessingLogs" {
        uniqueidentifier Id PK
        uniqueidentifier DocumentExecutionHistoryId FK
        uniqueidentifier CommandId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.DocumentGenerationItems" {
    }

    "Documents.DocumentGroups" {
        uniqueidentifier Id PK
        nvarchar ExternalReference 
        bit SuppressAutomaticProcessing 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        int PriorityType 
    }

    "Documents.DocumentMetadata" {
        uniqueidentifier Id PK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier DocumentId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Documents.Documents" {
        uniqueidentifier Id PK
        uniqueidentifier DocumentGroupId FK
        nvarchar FileName 
        datetimeoffset Created 
        nvarchar DocumentCategory 
        nvarchar DocumentSubCategory 
        nvarchar DocumentSubSubCategory 
        nvarchar DocumentTypeName 
        int DocumentDirectionType 
        int DocumentFormat 
        bigint FileSize 
        nvarchar MD5Hash 
        nvarchar SHA1Hash 
        nvarchar InternalReference 
        nvarchar MessageId 
        uniqueidentifier DocumentTypeImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ParentDocumentId FK
        nvarchar ExternalReference 
        nvarchar Sender 
        nvarchar Receiver 
        nvarchar CorrelationId 
        datetimeoffset PeriodStart 
        datetimeoffset PeriodEnd 
        bit Concealed 
        datetimeoffset MessageTimestamp 
    }

    "Documents.DocumentChapterMetadata" }o--|| "Documents.DocumentChapters" : "DocumentChapterId"
    "Documents.DocumentChapters" }o--|| "Documents.Documents" : "DocumentId"
    "Documents.DocumentExecutionHistories" }o--|| "Documents.Documents" : "DocumentId"
    "Documents.DocumentExecutionProcessingLogs" }o--|| "Documents.DocumentExecutionHistories" : "DocumentExecutionHistoryId"
    "Documents.Documents" }o--|| "Documents.DocumentGroups" : "DocumentGroupId"
    "Documents.DocumentMetadata" }o--|| "Documents.Documents" : "DocumentId"
    "Documents.Documents" }o--|| "Documents.Documents" : "ParentDocumentId"
{
    "definitions":  {
                        "Documents.DocumentGroups":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "ExternalReference":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "SuppressAutomaticProcessing":  {
                                                                                                                "type":  "boolean",
                                                                                                                "description":  "bit"
                                                                                                            },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "PriorityType":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "Documents.DbObjectStore":  {
                                                        "properties":  {
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "Content":  {
                                                                                           "type":  "string",
                                                                                           "description":  "varbinary"
                                                                                       },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      }
                                                                       },
                                                        "type":  "object"
                                                    },
                        "Documents.DocumentExecutionHistories":  {
                                                                     "properties":  {
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "DocumentStoreTriggerDateTime":  {
                                                                                                                             "format":  "date-time",
                                                                                                                             "description":  "datetimeoffset",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "ErrorStackTrace":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "nvarchar"
                                                                                                            },
                                                                                        "DocumentExecutionEndDateTime":  {
                                                                                                                             "format":  "date-time",
                                                                                                                             "description":  "datetimeoffset",
                                                                                                                             "type":  "string"
                                                                                                                         },
                                                                                        "DocumentExecutionStartDateTime":  {
                                                                                                                               "format":  "date-time",
                                                                                                                               "description":  "datetimeoffset",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                        "ErrorInnerExceptionTree":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "nvarchar"
                                                                                                                    },
                                                                                        "DocumentChapterActionImplementationId":  {
                                                                                                                                      "format":  "uuid",
                                                                                                                                      "description":  "uniqueidentifier",
                                                                                                                                      "type":  "string"
                                                                                                                                  },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "ErrorExceptionObject":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "varbinary"
                                                                                                                 },
                                                                                        "DocumentChapterId":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                        "DocumentId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to Documents.Documents"
                                                                                                       },
                                                                                        "ErrorMessage":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                                        "DocumentActionImplementationId":  {
                                                                                                                               "format":  "uuid",
                                                                                                                               "description":  "uniqueidentifier",
                                                                                                                               "type":  "string"
                                                                                                                           },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "ErrorBaseException":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "nvarchar"
                                                                                                               }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "Documents.DocumentChapters":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "DocumentChapterCategory":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "nvarchar"
                                                                                                          },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "DocumentChapterTypeImplementationId":  {
                                                                                                                          "format":  "uuid",
                                                                                                                          "description":  "uniqueidentifier",
                                                                                                                          "type":  "string"
                                                                                                                      },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "ChapterReference":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                              "FileSize":  {
                                                                                               "type":  "string",
                                                                                               "description":  "bigint"
                                                                                           },
                                                                              "SHA1Hash":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                              "InternalReference":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                              "DocumentId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to Documents.Documents"
                                                                                             },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "MD5Hash":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "Documents.DocumentChapterMetadata":  {
                                                                  "properties":  {
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "Key":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Value":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "DocumentChapterId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to Documents.DocumentChapters"
                                                                                                           },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Documents.Documents":  {
                                                    "properties":  {
                                                                       "FileName":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                       "Sender":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                       "MessageId":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                       "FileSize":  {
                                                                                        "type":  "string",
                                                                                        "description":  "bigint"
                                                                                    },
                                                                       "Created":  {
                                                                                       "format":  "date-time",
                                                                                       "description":  "datetimeoffset",
                                                                                       "type":  "string"
                                                                                   },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "InternalReference":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                       "Receiver":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                       "DocumentCategory":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                       "DocumentDirectionType":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 },
                                                                       "CorrelationId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                       "DocumentGroupId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to Documents.DocumentGroups"
                                                                                           },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "ParentDocumentId":  {
                                                                                                "type":  "string",
                                                                                                "description":  "FK to Documents.Documents"
                                                                                            },
                                                                       "DocumentSubCategory":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                       "PeriodStart":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                                       "DocumentSubSubCategory":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                       "DocumentTypeImplementationId":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                       "PeriodEnd":  {
                                                                                         "format":  "date-time",
                                                                                         "description":  "datetimeoffset",
                                                                                         "type":  "string"
                                                                                     },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "ExternalReference":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                       "DocumentFormat":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                       "DocumentTypeName":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                       "MessageTimestamp":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "SHA1Hash":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                       "MD5Hash":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   }
                                                                   },
                                                    "type":  "object"
                                                },
                        "Documents.DocumentExecutionProcessingLogs":  {
                                                                          "properties":  {
                                                                                             "Concealed":  {
                                                                                                               "type":  "boolean",
                                                                                                               "description":  "bit"
                                                                                                           },
                                                                                             "EntityUpdatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "Id":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                             "EntityCreatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "DocumentExecutionHistoryId":  {
                                                                                                                                "type":  "string",
                                                                                                                                "description":  "FK to Documents.DocumentExecutionHistories"
                                                                                                                            },
                                                                                             "EntityUpdatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "CommandId":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                             "EntityCreatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "Tenant":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        }
                                                                                         },
                                                                          "type":  "object"
                                                                      },
                        "Documents.DocumentGenerationItems":  {
                                                                  "properties":  {

                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Documents.DocumentMetadata":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "Key":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Value":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "DocumentId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to Documents.Documents"
                                                                                             },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       }
                    },
    "title":  "Documents.DocumentStoreComposer",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

8 - EnergyModel module

The EnergyModel module in Vertex

This is a description of the EnergyModel module

8.1 - Energy Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Calendar

Aggregate Root: Calendar

Represents calendars with their associated events for scheduling and time management.

erDiagram
    "Energy.CalendarEvents" {
        uniqueidentifier Id PK
        uniqueidentifier CalendarId FK
        nvarchar Description 
        datetime Date 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.Calendars" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.CalendarEvents" }o--|| "Energy.Calendars" : "CalendarId"
erDiagram
    "Energy.CalendarEvents" {
        uniqueidentifier Id PK
        uniqueidentifier CalendarId FK
        nvarchar Description 
        datetime Date 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.Calendars" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.CalendarEvents" }o--|| "Energy.Calendars" : "CalendarId"
{
    "definitions":  {
                        "Energy.CalendarEvents":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "CalendarId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to Energy.Calendars"
                                                                                        },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Date":  {
                                                                                      "type":  "string",
                                                                                      "description":  "datetime"
                                                                                  },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Description":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "Energy.Calendars":  {
                                                 "properties":  {
                                                                    "Concealed":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "EntityUpdatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Id":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                    "Description":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                    "EntityCreatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "Name":  {
                                                                                 "type":  "string",
                                                                                 "description":  "nvarchar"
                                                                             },
                                                                    "EntityUpdatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "EntityCreatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Tenant":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               }
                                                                },
                                                 "type":  "object"
                                             }
                    },
    "title":  "Energy.Calendar",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Market Party

Aggregate Root: MarketParty

Represents parties in the energy market with their roles and relationships.

erDiagram
    "Energy.MarketParties" {
        uniqueidentifier Id PK
        nvarchar EAN 
        bit IsOwnMarketParty 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar Name 
        bit Concealed 
    }

    "Energy.MarketPartyRoles" {
        uniqueidentifier Id PK
        uniqueidentifier MarketPartyId FK
        int MarketRole 
        nvarchar Comment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.MarketParty_TimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier MarketPartyId FK
        int TimeSeriesLinkType 
        nvarchar TSCode 
        nvarchar TSDataSlotReference 
        nvarchar TSRevision 
        uniqueidentifier TimeSeriesLinkGroupId 
        uniqueidentifier TimeSeriesLinkGroupTypeImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.MarketParty_TimeSeries" }o--|| "Energy.MarketParties" : "MarketPartyId"
    "Energy.MarketPartyRoles" }o--|| "Energy.MarketParties" : "MarketPartyId"
    "Energy.NetAreaGridOperatorPeriods" }o--|| "Energy.MarketPartyRoles" : "GridOperatorId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "BalanceResponsiblePartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "GridOperatorPartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "MeteringResponsiblePartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "SupplierId"
erDiagram
    "Energy.MarketParties" {
        uniqueidentifier Id PK
        nvarchar EAN 
        bit IsOwnMarketParty 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar Name 
        bit Concealed 
    }

    "Energy.MarketPartyRoles" {
        uniqueidentifier Id PK
        uniqueidentifier MarketPartyId FK
        int MarketRole 
        nvarchar Comment 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.MarketParty_TimeSeries" {
        uniqueidentifier Id PK
        uniqueidentifier MarketPartyId FK
        int TimeSeriesLinkType 
        nvarchar TSCode 
        nvarchar TSDataSlotReference 
        nvarchar TSRevision 
        uniqueidentifier TimeSeriesLinkGroupId 
        uniqueidentifier TimeSeriesLinkGroupTypeImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.MarketParty_TimeSeries" }o--|| "Energy.MarketParties" : "MarketPartyId"
    "Energy.MarketPartyRoles" }o--|| "Energy.MarketParties" : "MarketPartyId"
    "Energy.NetAreaGridOperatorPeriods" }o--|| "Energy.MarketPartyRoles" : "GridOperatorId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "BalanceResponsiblePartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "GridOperatorPartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "MeteringResponsiblePartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "SupplierId"
{
    "definitions":  {
                        "Energy.MarketParties":  {
                                                     "properties":  {
                                                                        "EAN":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "Name":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "IsOwnMarketParty":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   }
                                                                    },
                                                     "type":  "object"
                                                 },
                        "Energy.MarketPartyRoles":  {
                                                        "properties":  {
                                                                           "Comment":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "MarketPartyId":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "FK to Energy.MarketParties"
                                                                                             },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "MarketRole":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      }
                                                                       },
                                                        "type":  "object"
                                                    },
                        "Energy.MarketParty_TimeSeries":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "TSRevision":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "TimeSeriesLinkGroupTypeImplementationId":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                 "TSCode":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "MarketPartyId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to Energy.MarketParties"
                                                                                                   },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "TSDataSlotReference":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                 "TimeSeriesLinkGroupId":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "TimeSeriesLinkType":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        }
                                                                             },
                                                              "type":  "object"
                                                          }
                    },
    "title":  "Energy.MarketParty",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Holiday

Aggregate Root: Holiday

Represents holidays and special days for calendar and scheduling purposes.

erDiagram
    "Energy.Holidays" {
        uniqueidentifier Id PK
        datetime Date 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }
erDiagram
    "Energy.Holidays" {
        uniqueidentifier Id PK
        datetime Date 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }
{
    "definitions":  {
                        "Energy.Holidays":  {
                                                "properties":  {
                                                                   "Concealed":  {
                                                                                     "type":  "boolean",
                                                                                     "description":  "bit"
                                                                                 },
                                                                   "EntityUpdatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Id":  {
                                                                              "format":  "uuid",
                                                                              "description":  "uniqueidentifier",
                                                                              "type":  "string"
                                                                          },
                                                                   "Description":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                   "EntityCreatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "Date":  {
                                                                                "type":  "string",
                                                                                "description":  "datetime"
                                                                            },
                                                                   "EntityUpdatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "EntityCreatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Tenant":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              }
                                                               },
                                                "type":  "object"
                                            }
                    },
    "title":  "Energy.Holiday",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Metering Point

Aggregate Root: MeteringPoint

Represents metering points for energy measurement and monitoring.

erDiagram
    "Energy.MasterDataMeteringPointPeriods" {
        uniqueidentifier Id PK
        nvarchar ClientName 
        int MarketSegment 
        int EnergyFlowDirection 
        int MeteringMethod 
        int AllocationMethod 
        int PhysicalStatus 
        int EnergyDeliveryStatus 
        decimal ContractedCapacity 
        int AdministrativeStatusSmartMeter 
        nvarchar LocationDescription 
        nvarchar CapTarCode 
        nvarchar InvoiceMonth 
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        decimal MaxConsumption 
        int Subtype 
        int Switchability 
        nvarchar PrimaryAllocationPoint 
        nvarchar SecondaryAllocationPointsConcatenated 
        nvarchar PhysicalCapacity 
        bit Concealed 
    }

    "Energy.MeteringPointInformationPeriods" {
        uniqueidentifier Id PK
        nvarchar Appliance 
        int ArticleSub 
        int DisconnectionMethod 
        int SDERegulation 
        int SustainableEnergy 
        nvarchar BAGId 
        nvarchar BAGBuildingId 
        nvarchar TNTId 
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.MeteringPoints" {
        uniqueidentifier Id PK
        nvarchar EAN 
        nvarchar Comment 
        uniqueidentifier Tenant 
        int Switch 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier AddressId FK
        int ProductType 
        bit IsVirtual 
        bit IsManual 
        int CARStatusFlags 
        bit Concealed 
    }

    "Energy.PeriodicMeterReadings" {
        uniqueidentifier Id PK
        int ConsumptionPeakStart 
        int ConsumptionPeakEnd 
        int ConsumptionPeakTotal 
        int ConsumptionPeakMax 
        int ConsumptionPeakMin 
        int ConsumptionOffPeakStart 
        int ConsumptionOffPeakEnd 
        int ConsumptionOffPeakTotal 
        int ConsumptionOffPeakMax 
        int ConsumptionOffPeakMin 
        int ProductionPeakStart 
        int ProductionPeakEnd 
        int ProductionPeakTotal 
        int ProductionPeakMax 
        int ProductionPeakMin 
        int ProductionOffPeakStart 
        int ProductionOffPeakEnd 
        int ProductionOffPeakTotal 
        int ProductionOffPeakMax 
        int ProductionOffPeakMin 
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.ProfileEAVMeteringPointPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier ProfileId FK
        int EAEnergyConsumptionNettedPeak 
        int EAEnergyConsumptionNettedOffPeak 
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int EAEnergyProductionNettedPeak 
        int EAEnergyProductionNettedOffPeak 
        bit Concealed 
    }

    "Energy.ReconciliationMeteringPointPeriods" {
        uniqueidentifier Id PK
        datetime MeteringMonth 
        datetime APXMonth 
        uniqueidentifier PeriodicMeterReadingId FK
        uniqueidentifier MasterDataId FK
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.SupplyMeteringPointPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier SupplierId FK
        uniqueidentifier BalanceResponsiblePartyId FK
        uniqueidentifier MeteringResponsiblePartyId FK
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier GridOperatorPartyId FK
        bit Confirmed 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.MasterDataMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.ReconciliationMeteringPointPeriods" }o--|| "Energy.MasterDataMeteringPointPeriods" : "MasterDataId"
    "Energy.MeteringPointInformationPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.CustomMasterDataMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.CustomMeteringPointInformationPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.CustomProfileEAVMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.MeteringPoints" }o--|| "Energy.Addresses" : "AddressId"
    "Energy.NetAreaMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.PeriodicMeterReadings" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.ProfileEAVMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.ReconciliationMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.ReconciliationMeteringPointPeriods" }o--|| "Energy.PeriodicMeterReadings" : "PeriodicMeterReadingId"
    "Energy.ProfileEAVMeteringPointPeriods" }o--|| "Energy.Profiles" : "ProfileId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "BalanceResponsiblePartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "GridOperatorPartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "MeteringResponsiblePartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "SupplierId"
erDiagram
    "Energy.MasterDataMeteringPointPeriods" {
        uniqueidentifier Id PK
        nvarchar ClientName 
        int MarketSegment 
        int EnergyFlowDirection 
        int MeteringMethod 
        int AllocationMethod 
        int PhysicalStatus 
        int EnergyDeliveryStatus 
        decimal ContractedCapacity 
        int AdministrativeStatusSmartMeter 
        nvarchar LocationDescription 
        nvarchar CapTarCode 
        nvarchar InvoiceMonth 
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        decimal MaxConsumption 
        int Subtype 
        int Switchability 
        nvarchar PrimaryAllocationPoint 
        nvarchar SecondaryAllocationPointsConcatenated 
        nvarchar PhysicalCapacity 
        bit Concealed 
    }

    "Energy.MeteringPointInformationPeriods" {
        uniqueidentifier Id PK
        nvarchar Appliance 
        int ArticleSub 
        int DisconnectionMethod 
        int SDERegulation 
        int SustainableEnergy 
        nvarchar BAGId 
        nvarchar BAGBuildingId 
        nvarchar TNTId 
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.MeteringPoints" {
        uniqueidentifier Id PK
        nvarchar EAN 
        nvarchar Comment 
        uniqueidentifier Tenant 
        int Switch 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier AddressId FK
        int ProductType 
        bit IsVirtual 
        bit IsManual 
        int CARStatusFlags 
        bit Concealed 
    }

    "Energy.PeriodicMeterReadings" {
        uniqueidentifier Id PK
        int ConsumptionPeakStart 
        int ConsumptionPeakEnd 
        int ConsumptionPeakTotal 
        int ConsumptionPeakMax 
        int ConsumptionPeakMin 
        int ConsumptionOffPeakStart 
        int ConsumptionOffPeakEnd 
        int ConsumptionOffPeakTotal 
        int ConsumptionOffPeakMax 
        int ConsumptionOffPeakMin 
        int ProductionPeakStart 
        int ProductionPeakEnd 
        int ProductionPeakTotal 
        int ProductionPeakMax 
        int ProductionPeakMin 
        int ProductionOffPeakStart 
        int ProductionOffPeakEnd 
        int ProductionOffPeakTotal 
        int ProductionOffPeakMax 
        int ProductionOffPeakMin 
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.ProfileEAVMeteringPointPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier ProfileId FK
        int EAEnergyConsumptionNettedPeak 
        int EAEnergyConsumptionNettedOffPeak 
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int EAEnergyProductionNettedPeak 
        int EAEnergyProductionNettedOffPeak 
        bit Concealed 
    }

    "Energy.ReconciliationMeteringPointPeriods" {
        uniqueidentifier Id PK
        datetime MeteringMonth 
        datetime APXMonth 
        uniqueidentifier PeriodicMeterReadingId FK
        uniqueidentifier MasterDataId FK
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.SupplyMeteringPointPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier SupplierId FK
        uniqueidentifier BalanceResponsiblePartyId FK
        uniqueidentifier MeteringResponsiblePartyId FK
        uniqueidentifier MeteringPointId FK
        nvarchar Comment 
        datetime Start 
        datetime End 
        uniqueidentifier GridOperatorPartyId FK
        bit Confirmed 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.MasterDataMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.ReconciliationMeteringPointPeriods" }o--|| "Energy.MasterDataMeteringPointPeriods" : "MasterDataId"
    "Energy.MeteringPointInformationPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.CustomMasterDataMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.CustomMeteringPointInformationPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.CustomProfileEAVMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.MeteringPoints" }o--|| "Energy.Addresses" : "AddressId"
    "Energy.NetAreaMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.PeriodicMeterReadings" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.ProfileEAVMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.ReconciliationMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MeteringPoints" : "MeteringPointId"
    "Energy.ReconciliationMeteringPointPeriods" }o--|| "Energy.PeriodicMeterReadings" : "PeriodicMeterReadingId"
    "Energy.ProfileEAVMeteringPointPeriods" }o--|| "Energy.Profiles" : "ProfileId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "BalanceResponsiblePartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "GridOperatorPartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "MeteringResponsiblePartyId"
    "Energy.SupplyMeteringPointPeriods" }o--|| "Energy.MarketPartyRoles" : "SupplierId"
{
    "definitions":  {
                        "Energy.SupplyMeteringPointPeriods":  {
                                                                  "properties":  {
                                                                                     "End":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "datetime"
                                                                                             },
                                                                                     "Id":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Concealed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "Tenant":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                     "Start":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "datetime"
                                                                                               },
                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "Comment":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                     "MeteringResponsiblePartyId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to Energy.MarketPartyRoles"
                                                                                                                    },
                                                                                     "MeteringPointId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to Energy.MeteringPoints"
                                                                                                         },
                                                                                     "GridOperatorPartyId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Energy.MarketPartyRoles"
                                                                                                             },
                                                                                     "BalanceResponsiblePartyId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to Energy.MarketPartyRoles"
                                                                                                                   },
                                                                                     "EntityCreatedDateTime":  {
                                                                                                                   "format":  "date-time",
                                                                                                                   "description":  "datetimeoffset",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                     "Confirmed":  {
                                                                                                       "type":  "boolean",
                                                                                                       "description":  "bit"
                                                                                                   },
                                                                                     "SupplierId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to Energy.MarketPartyRoles"
                                                                                                    }
                                                                                 },
                                                                  "type":  "object"
                                                              },
                        "Energy.ReconciliationMeteringPointPeriods":  {
                                                                          "properties":  {
                                                                                             "End":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "datetime"
                                                                                                     },
                                                                                             "MeteringMonth":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "datetime"
                                                                                                               },
                                                                                             "APXMonth":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "datetime"
                                                                                                          },
                                                                                             "EntityUpdatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "Concealed":  {
                                                                                                               "type":  "boolean",
                                                                                                               "description":  "bit"
                                                                                                           },
                                                                                             "Tenant":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                                             "EntityCreatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "MasterDataId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to Energy.MasterDataMeteringPointPeriods"
                                                                                                              },
                                                                                             "Start":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "datetime"
                                                                                                       },
                                                                                             "EntityUpdatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "Comment":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                                             "MeteringPointId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to Energy.MeteringPoints"
                                                                                                                 },
                                                                                             "PeriodicMeterReadingId":  {
                                                                                                                            "type":  "string",
                                                                                                                            "description":  "FK to Energy.PeriodicMeterReadings"
                                                                                                                        },
                                                                                             "Id":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                             "EntityCreatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       }
                                                                                         },
                                                                          "type":  "object"
                                                                      },
                        "Energy.MeteringPointInformationPeriods":  {
                                                                       "properties":  {
                                                                                          "Comment":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "nvarchar"
                                                                                                      },
                                                                                          "DisconnectionMethod":  {
                                                                                                                      "type":  "integer",
                                                                                                                      "description":  "int"
                                                                                                                  },
                                                                                          "Id":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                          "EntityUpdatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "Concealed":  {
                                                                                                            "type":  "boolean",
                                                                                                            "description":  "bit"
                                                                                                        },
                                                                                          "EntityCreatedAuthToken":  {
                                                                                                                         "format":  "uuid",
                                                                                                                         "description":  "uniqueidentifier",
                                                                                                                         "type":  "string"
                                                                                                                     },
                                                                                          "Tenant":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                                          "Appliance":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                          "Start":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "datetime"
                                                                                                    },
                                                                                          "End":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "datetime"
                                                                                                  },
                                                                                          "EntityUpdatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "TNTId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                                          "BAGBuildingId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "nvarchar"
                                                                                                            },
                                                                                          "ArticleSub":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                          "MeteringPointId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to Energy.MeteringPoints"
                                                                                                              },
                                                                                          "SDERegulation":  {
                                                                                                                "type":  "integer",
                                                                                                                "description":  "int"
                                                                                                            },
                                                                                          "EntityCreatedDateTime":  {
                                                                                                                        "format":  "date-time",
                                                                                                                        "description":  "datetimeoffset",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                          "SustainableEnergy":  {
                                                                                                                    "type":  "integer",
                                                                                                                    "description":  "int"
                                                                                                                },
                                                                                          "BAGId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    }
                                                                                      },
                                                                       "type":  "object"
                                                                   },
                        "Energy.PeriodicMeterReadings":  {
                                                             "properties":  {
                                                                                "ProductionPeakTotal":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                                "ConsumptionPeakStart":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                "MeteringPointId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to Energy.MeteringPoints"
                                                                                                    },
                                                                                "EntityUpdatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "ConsumptionPeakEnd":  {
                                                                                                           "type":  "integer",
                                                                                                           "description":  "int"
                                                                                                       },
                                                                                "ConsumptionOffPeakStart":  {
                                                                                                                "type":  "integer",
                                                                                                                "description":  "int"
                                                                                                            },
                                                                                "Start":  {
                                                                                              "type":  "string",
                                                                                              "description":  "datetime"
                                                                                          },
                                                                                "ConsumptionPeakMax":  {
                                                                                                           "type":  "integer",
                                                                                                           "description":  "int"
                                                                                                       },
                                                                                "ConsumptionOffPeakEnd":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                                "ProductionOffPeakMax":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                "ConsumptionOffPeakMax":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                                "ProductionPeakMax":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                "ProductionOffPeakTotal":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                "Tenant":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "EntityUpdatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "EntityCreatedDateTime":  {
                                                                                                              "format":  "date-time",
                                                                                                              "description":  "datetimeoffset",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                                "Comment":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                "ConsumptionPeakMin":  {
                                                                                                           "type":  "integer",
                                                                                                           "description":  "int"
                                                                                                       },
                                                                                "ConsumptionPeakTotal":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                "ProductionPeakMin":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                "EntityCreatedAuthToken":  {
                                                                                                               "format":  "uuid",
                                                                                                               "description":  "uniqueidentifier",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                "Id":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                                "ProductionOffPeakEnd":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                "ProductionOffPeakMin":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                                "ProductionOffPeakStart":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                "ProductionPeakStart":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                                "ConsumptionOffPeakMin":  {
                                                                                                              "type":  "integer",
                                                                                                              "description":  "int"
                                                                                                          },
                                                                                "ProductionPeakEnd":  {
                                                                                                          "type":  "integer",
                                                                                                          "description":  "int"
                                                                                                      },
                                                                                "ConsumptionOffPeakTotal":  {
                                                                                                                "type":  "integer",
                                                                                                                "description":  "int"
                                                                                                            },
                                                                                "Concealed":  {
                                                                                                  "type":  "boolean",
                                                                                                  "description":  "bit"
                                                                                              },
                                                                                "End":  {
                                                                                            "type":  "string",
                                                                                            "description":  "datetime"
                                                                                        }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "Energy.MasterDataMeteringPointPeriods":  {
                                                                      "properties":  {
                                                                                         "LocationDescription":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "nvarchar"
                                                                                                                 },
                                                                                         "MeteringPointId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Energy.MeteringPoints"
                                                                                                             },
                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "AllocationMethod":  {
                                                                                                                  "type":  "integer",
                                                                                                                  "description":  "int"
                                                                                                              },
                                                                                         "Start":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "datetime"
                                                                                                   },
                                                                                         "PrimaryAllocationPoint":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "nvarchar"
                                                                                                                    },
                                                                                         "CapTarCode":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                         "EnergyFlowDirection":  {
                                                                                                                     "type":  "integer",
                                                                                                                     "description":  "int"
                                                                                                                 },
                                                                                         "EnergyDeliveryStatus":  {
                                                                                                                      "type":  "integer",
                                                                                                                      "description":  "int"
                                                                                                                  },
                                                                                         "InvoiceMonth":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "nvarchar"
                                                                                                          },
                                                                                         "Tenant":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                         "SecondaryAllocationPointsConcatenated":  {
                                                                                                                                       "type":  "string",
                                                                                                                                       "description":  "nvarchar"
                                                                                                                                   },
                                                                                         "ClientName":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "nvarchar"
                                                                                                        },
                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "EntityCreatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "Comment":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                         "MeteringMethod":  {
                                                                                                                "type":  "integer",
                                                                                                                "description":  "int"
                                                                                                            },
                                                                                         "End":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "datetime"
                                                                                                 },
                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Id":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                         "MaxConsumption":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "decimal"
                                                                                                            },
                                                                                         "MarketSegment":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                         "PhysicalStatus":  {
                                                                                                                "type":  "integer",
                                                                                                                "description":  "int"
                                                                                                            },
                                                                                         "Subtype":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                                         "PhysicalCapacity":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "nvarchar"
                                                                                                              },
                                                                                         "AdministrativeStatusSmartMeter":  {
                                                                                                                                "type":  "integer",
                                                                                                                                "description":  "int"
                                                                                                                            },
                                                                                         "ContractedCapacity":  {
                                                                                                                    "type":  "string",
                                                                                                                    "description":  "decimal"
                                                                                                                },
                                                                                         "Switchability":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                                         "Concealed":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       }
                                                                                     },
                                                                      "type":  "object"
                                                                  },
                        "Energy.MeteringPoints":  {
                                                      "properties":  {
                                                                         "ProductType":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EAN":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "IsVirtual":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "IsManual":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Comment":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                         "Switch":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                         "AddressId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to Energy.Addresses"
                                                                                       },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "CARStatusFlags":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "Energy.ProfileEAVMeteringPointPeriods":  {
                                                                      "properties":  {
                                                                                         "EAEnergyProductionNettedOffPeak":  {
                                                                                                                                 "type":  "integer",
                                                                                                                                 "description":  "int"
                                                                                                                             },
                                                                                         "End":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "datetime"
                                                                                                 },
                                                                                         "Id":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                         "EntityUpdatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Concealed":  {
                                                                                                           "type":  "boolean",
                                                                                                           "description":  "bit"
                                                                                                       },
                                                                                         "EAEnergyConsumptionNettedPeak":  {
                                                                                                                               "type":  "integer",
                                                                                                                               "description":  "int"
                                                                                                                           },
                                                                                         "Tenant":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                         "EntityCreatedAuthToken":  {
                                                                                                                        "format":  "uuid",
                                                                                                                        "description":  "uniqueidentifier",
                                                                                                                        "type":  "string"
                                                                                                                    },
                                                                                         "Start":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "datetime"
                                                                                                   },
                                                                                         "EntityUpdatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                         "Comment":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "nvarchar"
                                                                                                     },
                                                                                         "EAEnergyConsumptionNettedOffPeak":  {
                                                                                                                                  "type":  "integer",
                                                                                                                                  "description":  "int"
                                                                                                                              },
                                                                                         "MeteringPointId":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "FK to Energy.MeteringPoints"
                                                                                                             },
                                                                                         "EAEnergyProductionNettedPeak":  {
                                                                                                                              "type":  "integer",
                                                                                                                              "description":  "int"
                                                                                                                          },
                                                                                         "ProfileId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to Energy.Profiles"
                                                                                                       },
                                                                                         "EntityCreatedDateTime":  {
                                                                                                                       "format":  "date-time",
                                                                                                                       "description":  "datetimeoffset",
                                                                                                                       "type":  "string"
                                                                                                                   }
                                                                                     },
                                                                      "type":  "object"
                                                                  }
                    },
    "title":  "Energy.MeteringPoint",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Profile

Aggregate Root: Profile

Represents energy consumption and production profiles for analysis and planning.

erDiagram
    "Energy.Profiles" {
        uniqueidentifier Id PK
        nvarchar Code 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit IsElectricity 
        bit IsGas 
        bit Concealed 
    }

    "Energy.CustomProfileEAVMeteringPointPeriods" }o--|| "Energy.Profiles" : "ProfileId"
    "Energy.ProfileEAVMeteringPointPeriods" }o--|| "Energy.Profiles" : "ProfileId"
erDiagram
    "Energy.Profiles" {
        uniqueidentifier Id PK
        nvarchar Code 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit IsElectricity 
        bit IsGas 
        bit Concealed 
    }

    "Energy.CustomProfileEAVMeteringPointPeriods" }o--|| "Energy.Profiles" : "ProfileId"
    "Energy.ProfileEAVMeteringPointPeriods" }o--|| "Energy.Profiles" : "ProfileId"
{
    "definitions":  {
                        "Energy.Profiles":  {
                                                "properties":  {
                                                                   "Concealed":  {
                                                                                     "type":  "boolean",
                                                                                     "description":  "bit"
                                                                                 },
                                                                   "EntityUpdatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Id":  {
                                                                              "format":  "uuid",
                                                                              "description":  "uniqueidentifier",
                                                                              "type":  "string"
                                                                          },
                                                                   "IsGas":  {
                                                                                 "type":  "boolean",
                                                                                 "description":  "bit"
                                                                             },
                                                                   "Description":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                   "EntityCreatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "IsElectricity":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                   "EntityUpdatedDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                   "Code":  {
                                                                                "type":  "string",
                                                                                "description":  "nvarchar"
                                                                            },
                                                                   "EntityCreatedAuthToken":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                   "Tenant":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              }
                                                               },
                                                "type":  "object"
                                            }
                    },
    "title":  "Energy.Profile",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Reference Sequence Generator

Aggregate Root: ReferenceSequenceGenerator

Generates reference sequences for data organization and identification.

erDiagram
    "Energy.ReferenceSequenceEntries" {
        uniqueidentifier Id PK
        uniqueidentifier ReferenceSequenceGeneratorId FK
        uniqueidentifier InternalId 
        nvarchar InternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.ReferenceSequenceGenerators" {
        uniqueidentifier Id PK
        nvarchar SequenceDefinitionRule 
        uniqueidentifier Tenant 
        nvarchar SequenceName 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.ReferenceSequenceEntries" }o--|| "Energy.ReferenceSequenceGenerators" : "ReferenceSequenceGeneratorId"
erDiagram
    "Energy.ReferenceSequenceEntries" {
        uniqueidentifier Id PK
        uniqueidentifier ReferenceSequenceGeneratorId FK
        uniqueidentifier InternalId 
        nvarchar InternalReference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.ReferenceSequenceGenerators" {
        uniqueidentifier Id PK
        nvarchar SequenceDefinitionRule 
        uniqueidentifier Tenant 
        nvarchar SequenceName 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.ReferenceSequenceEntries" }o--|| "Energy.ReferenceSequenceGenerators" : "ReferenceSequenceGeneratorId"
{
    "definitions":  {
                        "Energy.ReferenceSequenceEntries":  {
                                                                "properties":  {
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "InternalId":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "InternalReference":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "nvarchar"
                                                                                                         },
                                                                                   "ReferenceSequenceGeneratorId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to Energy.ReferenceSequenceGenerators"
                                                                                                                    },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            },
                        "Energy.ReferenceSequenceGenerators":  {
                                                                   "properties":  {
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "SequenceName":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "nvarchar"
                                                                                                       },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "SequenceDefinitionRule":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "nvarchar"
                                                                                                                 },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                                  },
                                                                   "type":  "object"
                                                               }
                    },
    "title":  "Energy.ReferenceSequenceGenerator",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Gas Transfer Point

Aggregate Root: GasTransferPoint

Represents gas transfer points for gas trading and transportation.

erDiagram
    "Energy.GasTransferPoints" {
        uniqueidentifier Id PK
        nvarchar EAN 
        int Year 
        decimal ConnectionTariff 
        decimal ExitTariff 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        decimal PeakDeliveryG1A 
        decimal PeakDeliveryG2A 
        bit Concealed 
    }
erDiagram
    "Energy.GasTransferPoints" {
        uniqueidentifier Id PK
        nvarchar EAN 
        int Year 
        decimal ConnectionTariff 
        decimal ExitTariff 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        decimal PeakDeliveryG1A 
        decimal PeakDeliveryG2A 
        bit Concealed 
    }
{
    "definitions":  {
                        "Energy.GasTransferPoints":  {
                                                         "properties":  {
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "ConnectionTariff":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "decimal"
                                                                                                 },
                                                                            "EAN":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Year":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "PeakDeliveryG2A":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "decimal"
                                                                                                },
                                                                            "PeakDeliveryG1A":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "decimal"
                                                                                                },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                            "ExitTariff":  {
                                                                                               "type":  "string",
                                                                                               "description":  "decimal"
                                                                                           },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      }
                                                                        },
                                                         "type":  "object"
                                                     }
                    },
    "title":  "Energy.GasTransferPoint",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Decision Table

Aggregate Root: DecisionTable

Represents decision tables for business rule processing and decision making.

erDiagram
    "Energy.DecisionTableColumnLabels" {
        uniqueidentifier Id PK
        int Index 
        nvarchar Value 
        int DataType 
        uniqueidentifier EnumId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier DecisionTreeDataId FK
        int Type 
        bit Concealed 
    }

    "Energy.DecisionTableNodeOperands" {
        uniqueidentifier Id PK
        nvarchar Operand 
        uniqueidentifier DecisionTableNodeId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.DecisionTableNodes" {
        uniqueidentifier Id PK
        uniqueidentifier ParentNodeId FK
        uniqueidentifier ColumnLabelId FK
        int Index 
        int DataType 
        uniqueidentifier EnumId 
        int Operator 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier DecisionTreeDataId FK
        int Type 
        bit IsError 
        bit IsManual 
        bit Concealed 
    }

    "Energy.DecisionTables" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.DecisionTreeDatas" {
        uniqueidentifier Id PK
        datetimeoffset StartDateTime 
        uniqueidentifier DecisionTableId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Comment 
        nvarchar VersionString 
    }

    "Energy.DecisionTableColumnLabels" }o--|| "Energy.DecisionTreeDatas" : "DecisionTreeDataId"
    "Energy.DecisionTableNodes" }o--|| "Energy.DecisionTableColumnLabels" : "ColumnLabelId"
    "Energy.DecisionTableNodeOperands" }o--|| "Energy.DecisionTableNodes" : "DecisionTableNodeId"
    "Energy.DecisionTableNodes" }o--|| "Energy.DecisionTableNodes" : "ParentNodeId"
    "Energy.DecisionTableNodes" }o--|| "Energy.DecisionTreeDatas" : "DecisionTreeDataId"
    "Energy.DecisionTreeDatas" }o--|| "Energy.DecisionTables" : "DecisionTableId"
erDiagram
    "Energy.DecisionTableColumnLabels" {
        uniqueidentifier Id PK
        int Index 
        nvarchar Value 
        int DataType 
        uniqueidentifier EnumId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier DecisionTreeDataId FK
        int Type 
        bit Concealed 
    }

    "Energy.DecisionTableNodeOperands" {
        uniqueidentifier Id PK
        nvarchar Operand 
        uniqueidentifier DecisionTableNodeId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.DecisionTableNodes" {
        uniqueidentifier Id PK
        uniqueidentifier ParentNodeId FK
        uniqueidentifier ColumnLabelId FK
        int Index 
        int DataType 
        uniqueidentifier EnumId 
        int Operator 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier DecisionTreeDataId FK
        int Type 
        bit IsError 
        bit IsManual 
        bit Concealed 
    }

    "Energy.DecisionTables" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Energy.DecisionTreeDatas" {
        uniqueidentifier Id PK
        datetimeoffset StartDateTime 
        uniqueidentifier DecisionTableId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
        nvarchar Comment 
        nvarchar VersionString 
    }

    "Energy.DecisionTableColumnLabels" }o--|| "Energy.DecisionTreeDatas" : "DecisionTreeDataId"
    "Energy.DecisionTableNodes" }o--|| "Energy.DecisionTableColumnLabels" : "ColumnLabelId"
    "Energy.DecisionTableNodeOperands" }o--|| "Energy.DecisionTableNodes" : "DecisionTableNodeId"
    "Energy.DecisionTableNodes" }o--|| "Energy.DecisionTableNodes" : "ParentNodeId"
    "Energy.DecisionTableNodes" }o--|| "Energy.DecisionTreeDatas" : "DecisionTreeDataId"
    "Energy.DecisionTreeDatas" }o--|| "Energy.DecisionTables" : "DecisionTableId"
{
    "definitions":  {
                        "Energy.DecisionTableColumnLabels":  {
                                                                 "properties":  {
                                                                                    "EnumId":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "Type":  {
                                                                                                 "type":  "integer",
                                                                                                 "description":  "int"
                                                                                             },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "Value":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "Index":  {
                                                                                                  "type":  "integer",
                                                                                                  "description":  "int"
                                                                                              },
                                                                                    "DataType":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 },
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                    "DecisionTreeDataId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to Energy.DecisionTreeDatas"
                                                                                                           },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "Energy.DecisionTreeDatas":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "VersionString":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              },
                                                                            "Comment":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "DecisionTableId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to Energy.DecisionTables"
                                                                                                },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "StartDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "Energy.DecisionTables":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "Description":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Name":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "Energy.DecisionTableNodeOperands":  {
                                                                 "properties":  {
                                                                                    "Tenant":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                    "EntityUpdatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "Id":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                    "Concealed":  {
                                                                                                      "type":  "boolean",
                                                                                                      "description":  "bit"
                                                                                                  },
                                                                                    "EntityCreatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "EntityUpdatedDateTime":  {
                                                                                                                  "format":  "date-time",
                                                                                                                  "description":  "datetimeoffset",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                    "Operand":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                    "EntityCreatedAuthToken":  {
                                                                                                                   "format":  "uuid",
                                                                                                                   "description":  "uniqueidentifier",
                                                                                                                   "type":  "string"
                                                                                                               },
                                                                                    "DecisionTableNodeId":  {
                                                                                                                "type":  "string",
                                                                                                                "description":  "FK to Energy.DecisionTableNodes"
                                                                                                            }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "Energy.DecisionTableNodes":  {
                                                          "properties":  {
                                                                             "EnumId":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "Operator":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "IsManual":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                             "Index":  {
                                                                                           "type":  "integer",
                                                                                           "description":  "int"
                                                                                       },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "ParentNodeId":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "FK to Energy.DecisionTableNodes"
                                                                                              },
                                                                             "DataType":  {
                                                                                              "type":  "integer",
                                                                                              "description":  "int"
                                                                                          },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "Type":  {
                                                                                          "type":  "integer",
                                                                                          "description":  "int"
                                                                                      },
                                                                             "IsError":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                             "DecisionTreeDataId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to Energy.DecisionTreeDatas"
                                                                                                    },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "ColumnLabelId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to Energy.DecisionTableColumnLabels"
                                                                                               }
                                                                         },
                                                          "type":  "object"
                                                      }
                    },
    "title":  "Energy.DecisionTable",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Exit Capacity

Aggregate Root: ExitCapacity

Represents exit capacities for energy transportation and network management.

erDiagram
    "Energy.ExitCapacities" {
        uniqueidentifier Id PK
        datetime MonthYear 
        decimal HourlyFractionG1A 
        decimal HourlyFractionG2A 
        decimal HourlyFractionG2C 
        decimal TelemetryProfileFactor 
        decimal ProfileMonthlyFraction 
        decimal TelemetryMonthlyFraction 
        decimal ProfileFitFactor 
        decimal TelemetryFitFactor 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        decimal PeakDeliveryMonthlyFraction 
        bit Concealed 
    }
erDiagram
    "Energy.ExitCapacities" {
        uniqueidentifier Id PK
        datetime MonthYear 
        decimal HourlyFractionG1A 
        decimal HourlyFractionG2A 
        decimal HourlyFractionG2C 
        decimal TelemetryProfileFactor 
        decimal ProfileMonthlyFraction 
        decimal TelemetryMonthlyFraction 
        decimal ProfileFitFactor 
        decimal TelemetryFitFactor 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        decimal PeakDeliveryMonthlyFraction 
        bit Concealed 
    }
{
    "definitions":  {
                        "Energy.ExitCapacities":  {
                                                      "properties":  {
                                                                         "TelemetryMonthlyFraction":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "decimal"
                                                                                                      },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "HourlyFractionG2A":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "decimal"
                                                                                               },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "ProfileFitFactor":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "decimal"
                                                                                              },
                                                                         "TelemetryProfileFactor":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "decimal"
                                                                                                    },
                                                                         "MonthYear":  {
                                                                                           "type":  "string",
                                                                                           "description":  "datetime"
                                                                                       },
                                                                         "HourlyFractionG2C":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "decimal"
                                                                                               },
                                                                         "TelemetryFitFactor":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "decimal"
                                                                                                },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                         "HourlyFractionG1A":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "decimal"
                                                                                               },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "PeakDeliveryMonthlyFraction":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "decimal"
                                                                                                         },
                                                                         "ProfileMonthlyFraction":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "decimal"
                                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  }
                    },
    "title":  "Energy.ExitCapacity",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

9 - TimeSeries module

The TimeSeries module in Vertex

This is a description of the TimeSeries module

9.1 - TS Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Aggregate Root: TimeSeriesLinkGroup

Represents groups of linked time series with their associated details for data organization and management.

erDiagram
    "TS.TimeSeriesLinkGroupDetails" {
        uniqueidentifier Id PK
        uniqueidentifier TimeSeriesLinkGroupId FK
        nvarchar Key 
        nvarchar Value 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "TS.TimeSeriesLinkGroups" {
        uniqueidentifier Id PK
        nvarchar Reference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "TS.TimeSeriesLinkGroupDetails" }o--|| "TS.TimeSeriesLinkGroups" : "TimeSeriesLinkGroupId"
erDiagram
    "TS.TimeSeriesLinkGroupDetails" {
        uniqueidentifier Id PK
        uniqueidentifier TimeSeriesLinkGroupId FK
        nvarchar Key 
        nvarchar Value 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "TS.TimeSeriesLinkGroups" {
        uniqueidentifier Id PK
        nvarchar Reference 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "TS.TimeSeriesLinkGroupDetails" }o--|| "TS.TimeSeriesLinkGroups" : "TimeSeriesLinkGroupId"
{
    "definitions":  {
                        "TS.TimeSeriesLinkGroupDetails":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "TimeSeriesLinkGroupId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to TS.TimeSeriesLinkGroups"
                                                                                                           },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "Key":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Value":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                 "StartDate":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "TS.TimeSeriesLinkGroups":  {
                                                        "properties":  {
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "Reference":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      }
                                                                       },
                                                        "type":  "object"
                                                    }
                    },
    "title":  "TS.TimeSeriesLinkGroup",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Data Lookup Table

Aggregate Root: DataLookupTable

Represents lookup tables with their schemas, columns, and data for reference data management.

erDiagram
    "TS.DataLookupTableData" {
        uniqueidentifier Id PK
        uniqueidentifier DataLookupTableId 
        uniqueidentifier DataLookupTableSchemaId 
        datetimeoffset ReceivedDateTime 
        varbinary CompressedCsvData 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "TS.DataLookupTableSchemaColumns" {
    }

    "TS.DataLookupTableSchemas" {
    }

    "TS.DataLookupTables" {
    }
erDiagram
    "TS.DataLookupTableData" {
        uniqueidentifier Id PK
        uniqueidentifier DataLookupTableId 
        uniqueidentifier DataLookupTableSchemaId 
        datetimeoffset ReceivedDateTime 
        varbinary CompressedCsvData 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "TS.DataLookupTableSchemaColumns" {
    }

    "TS.DataLookupTableSchemas" {
    }

    "TS.DataLookupTables" {
    }
{
    "definitions":  {
                        "TS.DataLookupTableData":  {
                                                       "properties":  {
                                                                          "DataLookupTableSchemaId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "DataLookupTableId":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                          "ReceivedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "CompressedCsvData":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "varbinary"
                                                                                                },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "TS.DataLookupTableSchemas":  {
                                                          "properties":  {

                                                                         },
                                                          "type":  "object"
                                                      },
                        "TS.DataLookupTableSchemaColumns":  {
                                                                "properties":  {

                                                                               },
                                                                "type":  "object"
                                                            },
                        "TS.DataLookupTables":  {
                                                    "properties":  {

                                                                   },
                                                    "type":  "object"
                                                }
                    },
    "title":  "TS.DataLookupTable",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

10 - Model Executor module

The Model Executor module in Vertex

This is a description of the Model Executor module

10.1 - DPME Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Model Repository

Aggregate Root: ModelRepository

Represents repositories for models with their versions and associated metadata for model management.

erDiagram
    "DPME.ModelRepositories" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        nvarchar RepositoryHost 
        nvarchar RepositoryName 
        nvarchar RepositoryUsername 
        nvarchar RepositoryPasswordSecretName 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "DPME.ModelVersions" {
        uniqueidentifier Id PK
        uniqueidentifier ModelId FK
        nvarchar VersionName 
        nvarchar Description 
        datetimeoffset ActivationDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "DPME.Models" {
        uniqueidentifier Id PK
        uniqueidentifier ModelRepositoryId FK
        nvarchar Name 
        nvarchar Description 
        nvarchar ScriptPath 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "DPME.Models" }o--|| "DPME.ModelRepositories" : "ModelRepositoryId"
    "DPME.ModelVersions" }o--|| "DPME.Models" : "ModelId"
erDiagram
    "DPME.ModelRepositories" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        nvarchar RepositoryHost 
        nvarchar RepositoryName 
        nvarchar RepositoryUsername 
        nvarchar RepositoryPasswordSecretName 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "DPME.ModelVersions" {
        uniqueidentifier Id PK
        uniqueidentifier ModelId FK
        nvarchar VersionName 
        nvarchar Description 
        datetimeoffset ActivationDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "DPME.Models" {
        uniqueidentifier Id PK
        uniqueidentifier ModelRepositoryId FK
        nvarchar Name 
        nvarchar Description 
        nvarchar ScriptPath 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "DPME.Models" }o--|| "DPME.ModelRepositories" : "ModelRepositoryId"
    "DPME.ModelVersions" }o--|| "DPME.Models" : "ModelId"
{
    "definitions":  {
                        "DPME.ModelRepositories":  {
                                                       "properties":  {
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "Description":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Name":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                          "RepositoryHost":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "RepositoryPasswordSecretName":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "nvarchar"
                                                                                                           },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "RepositoryUsername":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "RepositoryName":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             }
                                                                      },
                                                       "type":  "object"
                                                   },
                        "DPME.ModelVersions":  {
                                                   "properties":  {
                                                                      "Concealed":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                                      "EntityUpdatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Id":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             },
                                                                      "ModelId":  {
                                                                                      "type":  "string",
                                                                                      "description":  "FK to DPME.Models"
                                                                                  },
                                                                      "ActivationDateTime":  {
                                                                                                 "format":  "date-time",
                                                                                                 "description":  "datetimeoffset",
                                                                                                 "type":  "string"
                                                                                             },
                                                                      "EntityCreatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "EntityUpdatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "Description":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                                      "VersionName":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                                      "EntityCreatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Tenant":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 }
                                                                  },
                                                   "type":  "object"
                                               },
                        "DPME.Models":  {
                                            "properties":  {
                                                               "Concealed":  {
                                                                                 "type":  "boolean",
                                                                                 "description":  "bit"
                                                                             },
                                                               "EntityUpdatedAuthToken":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                               "ModelRepositoryId":  {
                                                                                         "type":  "string",
                                                                                         "description":  "FK to DPME.ModelRepositories"
                                                                                     },
                                                               "ScriptPath":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                               "Id":  {
                                                                          "format":  "uuid",
                                                                          "description":  "uniqueidentifier",
                                                                          "type":  "string"
                                                                      },
                                                               "Description":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                               "EntityCreatedDateTime":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                               "Name":  {
                                                                            "type":  "string",
                                                                            "description":  "nvarchar"
                                                                        },
                                                               "EntityUpdatedDateTime":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                               "EntityCreatedAuthToken":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                               "Tenant":  {
                                                                              "format":  "uuid",
                                                                              "description":  "uniqueidentifier",
                                                                              "type":  "string"
                                                                          }
                                                           },
                                            "type":  "object"
                                        }
                    },
    "title":  "DPME.ModelRepository",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

11 - EDP notifications

The module that sends notifications to the EDP

This is a description of the EDP Notifications module

12 - Core module

The Core module in Vertex

This is a description of the Core module

12.1 - ApplicationCore Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Category

Aggregate Root: Category

Represents categories for organizing and classifying data and entities across the system.

erDiagram
    "ApplicationCore.Categories" {
        uniqueidentifier Id PK
        nvarchar Name 
        int DisplayOrderIndex 
        int CategoryType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int CategoryUsageFlags 
        bit Concealed 
        int AppliesTo 
    }

    "ApplicationCore.CategoryLabels" {
        uniqueidentifier Id PK
        uniqueidentifier CategoryId FK
        nvarchar Name 
        nvarchar ShortCode 
        nvarchar Color 
        int DisplayOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.CategoryLabels" }o--|| "ApplicationCore.Categories" : "CategoryId"
erDiagram
    "ApplicationCore.Categories" {
        uniqueidentifier Id PK
        nvarchar Name 
        int DisplayOrderIndex 
        int CategoryType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int CategoryUsageFlags 
        bit Concealed 
        int AppliesTo 
    }

    "ApplicationCore.CategoryLabels" {
        uniqueidentifier Id PK
        uniqueidentifier CategoryId FK
        nvarchar Name 
        nvarchar ShortCode 
        nvarchar Color 
        int DisplayOrderIndex 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.CategoryLabels" }o--|| "ApplicationCore.Categories" : "CategoryId"
{
    "definitions":  {
                        "ApplicationCore.Categories":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "Name":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "AppliesTo":  {
                                                                                                "type":  "integer",
                                                                                                "description":  "int"
                                                                                            },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "CategoryType":  {
                                                                                                   "type":  "integer",
                                                                                                   "description":  "int"
                                                                                               },
                                                                              "DisplayOrderIndex":  {
                                                                                                        "type":  "integer",
                                                                                                        "description":  "int"
                                                                                                    },
                                                                              "CategoryUsageFlags":  {
                                                                                                         "type":  "integer",
                                                                                                         "description":  "int"
                                                                                                     },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "ApplicationCore.CategoryLabels":  {
                                                               "properties":  {
                                                                                  "Concealed":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                                  "ShortCode":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "Name":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "DisplayOrderIndex":  {
                                                                                                            "type":  "integer",
                                                                                                            "description":  "int"
                                                                                                        },
                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "Color":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                  "Tenant":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                  "CategoryId":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "FK to ApplicationCore.Categories"
                                                                                                 },
                                                                                  "Id":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                                  "EntityCreatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            }
                                                                              },
                                                               "type":  "object"
                                                           }
                    },
    "title":  "ApplicationCore.Category",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Correspondence

Aggregate Root: Correspondence

Represents correspondence and communication records with associated conversations and messages.

erDiagram
    "ApplicationCore.Correspondences" {
        uniqueidentifier Id PK
        uniqueidentifier ChatId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.Conversations" }o--|| "ApplicationCore.Correspondences" : "CorrespondenceId"
    "ApplicationCore.Correspondences" }o--|| "ApplicationCore.Chats" : "ChatId"
erDiagram
    "ApplicationCore.Correspondences" {
        uniqueidentifier Id PK
        uniqueidentifier ChatId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.Conversations" }o--|| "ApplicationCore.Correspondences" : "CorrespondenceId"
    "ApplicationCore.Correspondences" }o--|| "ApplicationCore.Chats" : "ChatId"
{
    "definitions":  {
                        "ApplicationCore.Correspondences":  {
                                                                "properties":  {
                                                                                   "Tenant":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                                   "EntityUpdatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "Id":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                                                   "Concealed":  {
                                                                                                     "type":  "boolean",
                                                                                                     "description":  "bit"
                                                                                                 },
                                                                                   "EntityCreatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityUpdatedDateTime":  {
                                                                                                                 "format":  "date-time",
                                                                                                                 "description":  "datetimeoffset",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                   "EntityCreatedAuthToken":  {
                                                                                                                  "format":  "uuid",
                                                                                                                  "description":  "uniqueidentifier",
                                                                                                                  "type":  "string"
                                                                                                              },
                                                                                   "ChatId":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "FK to ApplicationCore.Chats"
                                                                                              }
                                                                               },
                                                                "type":  "object"
                                                            }
                    },
    "title":  "ApplicationCore.Correspondence",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Conversation

Aggregate Root: Conversation

Represents conversations between users with associated messages and participants.

erDiagram
    "ApplicationCore.ConversationContactDetails" {
        uniqueidentifier ConversationId PK
        uniqueidentifier ContactDetailsId PK
    }

    "ApplicationCore.ConversationMessageAttachments" {
        uniqueidentifier Id PK
        uniqueidentifier ConversationMessageId FK
        uniqueidentifier DocumentId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.ConversationMessages" {
        uniqueidentifier Id PK
        uniqueidentifier ConversationId FK
        uniqueidentifier SenderId FK
        nvarchar Subject 
        nvarchar Message 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.Conversations" {
        uniqueidentifier Id PK
        uniqueidentifier CorrespondenceId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.ConversationContactDetails" }o--|| "ApplicationCore.ContactDetails" : "ContactDetailsId"
    "ApplicationCore.ConversationContactDetails" }o--|| "ApplicationCore.Conversations" : "ConversationId"
    "ApplicationCore.ConversationMessageAttachments" }o--|| "ApplicationCore.ConversationMessages" : "ConversationMessageId"
    "ApplicationCore.ConversationMessages" }o--|| "ApplicationCore.ContactDetails" : "SenderId"
    "ApplicationCore.ConversationMessages" }o--|| "ApplicationCore.Conversations" : "ConversationId"
    "ApplicationCore.Conversations" }o--|| "ApplicationCore.Correspondences" : "CorrespondenceId"
erDiagram
    "ApplicationCore.ConversationContactDetails" {
        uniqueidentifier ConversationId PK
        uniqueidentifier ContactDetailsId PK
    }

    "ApplicationCore.ConversationMessageAttachments" {
        uniqueidentifier Id PK
        uniqueidentifier ConversationMessageId FK
        uniqueidentifier DocumentId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.ConversationMessages" {
        uniqueidentifier Id PK
        uniqueidentifier ConversationId FK
        uniqueidentifier SenderId FK
        nvarchar Subject 
        nvarchar Message 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.Conversations" {
        uniqueidentifier Id PK
        uniqueidentifier CorrespondenceId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.ConversationContactDetails" }o--|| "ApplicationCore.ContactDetails" : "ContactDetailsId"
    "ApplicationCore.ConversationContactDetails" }o--|| "ApplicationCore.Conversations" : "ConversationId"
    "ApplicationCore.ConversationMessageAttachments" }o--|| "ApplicationCore.ConversationMessages" : "ConversationMessageId"
    "ApplicationCore.ConversationMessages" }o--|| "ApplicationCore.ContactDetails" : "SenderId"
    "ApplicationCore.ConversationMessages" }o--|| "ApplicationCore.Conversations" : "ConversationId"
    "ApplicationCore.Conversations" }o--|| "ApplicationCore.Correspondences" : "CorrespondenceId"
{
    "definitions":  {
                        "ApplicationCore.ConversationMessageAttachments":  {
                                                                               "properties":  {
                                                                                                  "Concealed":  {
                                                                                                                    "type":  "boolean",
                                                                                                                    "description":  "bit"
                                                                                                                },
                                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                  "Id":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                                 "format":  "uuid",
                                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                                 "type":  "string"
                                                                                                                             },
                                                                                                  "EntityCreatedDateTime":  {
                                                                                                                                "format":  "date-time",
                                                                                                                                "description":  "datetimeoffset",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                                "format":  "date-time",
                                                                                                                                "description":  "datetimeoffset",
                                                                                                                                "type":  "string"
                                                                                                                            },
                                                                                                  "ConversationMessageId":  {
                                                                                                                                "type":  "string",
                                                                                                                                "description":  "FK to ApplicationCore.ConversationMessages"
                                                                                                                            },
                                                                                                  "DocumentId":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                                  "Tenant":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             }
                                                                                              },
                                                                               "type":  "object"
                                                                           },
                        "ApplicationCore.ConversationContactDetails":  {
                                                                           "properties":  {
                                                                                              "ConversationId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to ApplicationCore.Conversations"
                                                                                                                 },
                                                                                              "ContactDetailsId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to ApplicationCore.ContactDetails"
                                                                                                                   }
                                                                                          },
                                                                           "type":  "object"
                                                                       },
                        "ApplicationCore.Conversations":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "CorrespondenceId":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "FK to ApplicationCore.Correspondences"
                                                                                                      },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "ApplicationCore.ConversationMessages":  {
                                                                     "properties":  {
                                                                                        "Message":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "SenderId":  {
                                                                                                         "type":  "string",
                                                                                                         "description":  "FK to ApplicationCore.ContactDetails"
                                                                                                     },
                                                                                        "ConversationId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to ApplicationCore.Conversations"
                                                                                                           },
                                                                                        "Subject":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                                    },
                                                                     "type":  "object"
                                                                 }
                    },
    "title":  "ApplicationCore.Conversation",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Chat

Aggregate Root: Chat

Represents chat sessions with comments, mentions, and associated documents for real-time communication.

erDiagram
    "ApplicationCore.Chats" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.CommentDocuments" {
        uniqueidentifier CommentId PK
        uniqueidentifier DocumentId PK
    }

    "ApplicationCore.CommentMentionedUsers" {
        uniqueidentifier CommentId PK
        uniqueidentifier UserId PK
    }

    "ApplicationCore.Comments" {
        uniqueidentifier Id PK
        uniqueidentifier ChatId FK
        datetimeoffset CreatedDateTime 
        datetimeoffset EditedDateTime 
        uniqueidentifier CreatorUserId 
        nvarchar Content 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.ContactDetails" {
        uniqueidentifier Id PK
        uniqueidentifier UserId 
        nvarchar FirstName 
        nvarchar LastName 
        int GenderType 
        nvarchar Email 
        nvarchar PhoneNumber 
        nvarchar MobileNumber 
        nvarchar Fax 
        nvarchar Street 
        nvarchar HouseNumber 
        nvarchar Suffix 
        nvarchar City 
        nvarchar PostalCode 
        nvarchar CountryCode 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.Comments" }o--|| "ApplicationCore.Chats" : "ChatId"
    "ApplicationCore.Correspondences" }o--|| "ApplicationCore.Chats" : "ChatId"
    "ApplicationCore.CommentDocuments" }o--|| "ApplicationCore.Comments" : "CommentId"
    "ApplicationCore.CommentMentionedUsers" }o--|| "ApplicationCore.Comments" : "CommentId"
    "ApplicationCore.ConversationContactDetails" }o--|| "ApplicationCore.ContactDetails" : "ContactDetailsId"
    "ApplicationCore.ConversationMessages" }o--|| "ApplicationCore.ContactDetails" : "SenderId"
erDiagram
    "ApplicationCore.Chats" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.CommentDocuments" {
        uniqueidentifier CommentId PK
        uniqueidentifier DocumentId PK
    }

    "ApplicationCore.CommentMentionedUsers" {
        uniqueidentifier CommentId PK
        uniqueidentifier UserId PK
    }

    "ApplicationCore.Comments" {
        uniqueidentifier Id PK
        uniqueidentifier ChatId FK
        datetimeoffset CreatedDateTime 
        datetimeoffset EditedDateTime 
        uniqueidentifier CreatorUserId 
        nvarchar Content 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.ContactDetails" {
        uniqueidentifier Id PK
        uniqueidentifier UserId 
        nvarchar FirstName 
        nvarchar LastName 
        int GenderType 
        nvarchar Email 
        nvarchar PhoneNumber 
        nvarchar MobileNumber 
        nvarchar Fax 
        nvarchar Street 
        nvarchar HouseNumber 
        nvarchar Suffix 
        nvarchar City 
        nvarchar PostalCode 
        nvarchar CountryCode 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.Comments" }o--|| "ApplicationCore.Chats" : "ChatId"
    "ApplicationCore.Correspondences" }o--|| "ApplicationCore.Chats" : "ChatId"
    "ApplicationCore.CommentDocuments" }o--|| "ApplicationCore.Comments" : "CommentId"
    "ApplicationCore.CommentMentionedUsers" }o--|| "ApplicationCore.Comments" : "CommentId"
    "ApplicationCore.ConversationContactDetails" }o--|| "ApplicationCore.ContactDetails" : "ContactDetailsId"
    "ApplicationCore.ConversationMessages" }o--|| "ApplicationCore.ContactDetails" : "SenderId"
{
    "definitions":  {
                        "ApplicationCore.Comments":  {
                                                         "properties":  {
                                                                            "EditedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       },
                                                                            "CreatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                            "CreatorUserId":  {
                                                                                                  "format":  "uuid",
                                                                                                  "description":  "uniqueidentifier",
                                                                                                  "type":  "string"
                                                                                              },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "Content":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                            "ChatId":  {
                                                                                           "type":  "string",
                                                                                           "description":  "FK to ApplicationCore.Chats"
                                                                                       },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "ApplicationCore.ContactDetails":  {
                                                               "properties":  {
                                                                                  "Street":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                  "LastName":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                  "CountryCode":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                  "Concealed":  {
                                                                                                    "type":  "boolean",
                                                                                                    "description":  "bit"
                                                                                                },
                                                                                  "EntityCreatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             },
                                                                                  "MobileNumber":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "nvarchar"
                                                                                                   },
                                                                                  "Tenant":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                  "EntityCreatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "FirstName":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                  "HouseNumber":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                  "City":  {
                                                                                               "type":  "string",
                                                                                               "description":  "nvarchar"
                                                                                           },
                                                                                  "Suffix":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                                  "UserId":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                  "Fax":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                                  "GenderType":  {
                                                                                                     "type":  "integer",
                                                                                                     "description":  "int"
                                                                                                 },
                                                                                  "Id":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                                  "EntityUpdatedDateTime":  {
                                                                                                                "format":  "date-time",
                                                                                                                "description":  "datetimeoffset",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                  "PhoneNumber":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "nvarchar"
                                                                                                  },
                                                                                  "PostalCode":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                  "Email":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            },
                                                                                  "EntityUpdatedAuthToken":  {
                                                                                                                 "format":  "uuid",
                                                                                                                 "description":  "uniqueidentifier",
                                                                                                                 "type":  "string"
                                                                                                             }
                                                                              },
                                                               "type":  "object"
                                                           },
                        "ApplicationCore.Chats":  {
                                                      "properties":  {
                                                                         "Concealed":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       },
                                                                         "EntityUpdatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Id":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                         "EntityCreatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "EntityUpdatedDateTime":  {
                                                                                                       "format":  "date-time",
                                                                                                       "description":  "datetimeoffset",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                         "EntityCreatedAuthToken":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                         "Tenant":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    }
                                                                     },
                                                      "type":  "object"
                                                  },
                        "ApplicationCore.CommentDocuments":  {
                                                                 "properties":  {
                                                                                    "CommentId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to ApplicationCore.Comments"
                                                                                                  },
                                                                                    "DocumentId":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   }
                                                                                },
                                                                 "type":  "object"
                                                             },
                        "ApplicationCore.CommentMentionedUsers":  {
                                                                      "properties":  {
                                                                                         "UserId":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                         "CommentId":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "FK to ApplicationCore.Comments"
                                                                                                       }
                                                                                     },
                                                                      "type":  "object"
                                                                  }
                    },
    "title":  "ApplicationCore.Chat",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Custom Enum

Aggregate Root: CustomEnum

Represents custom enumerations with components, values, and key values for flexible data classification.

erDiagram
    "ApplicationCore.CustomEnumComponentValueKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentValueId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.CustomEnumComponentValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentId FK
        nvarchar Value 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ScriptValue 
        bit Concealed 
    }

    "ApplicationCore.CustomEnumComponents" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumId FK
        nvarchar Name 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ExternalReference 
        bit Concealed 
    }

    "ApplicationCore.CustomEnums" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar Description 
        bit Concealed 
    }

    "PM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
erDiagram
    "ApplicationCore.CustomEnumComponentValueKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentValueId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "ApplicationCore.CustomEnumComponentValues" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumComponentId FK
        nvarchar Value 
        datetimeoffset StartDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ScriptValue 
        bit Concealed 
    }

    "ApplicationCore.CustomEnumComponents" {
        uniqueidentifier Id PK
        uniqueidentifier CustomEnumId FK
        nvarchar Name 
        datetimeoffset StartDate 
        datetimeoffset EndDate 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ExternalReference 
        bit Concealed 
    }

    "ApplicationCore.CustomEnums" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar Description 
        bit Concealed 
    }

    "PM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "ApplicationCore.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "Pricing.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "CRM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "Pricing.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "ApplicationCore.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "CRM.CustomEnumComponentValueKeyValues" }o--|| "PM.CustomEnumComponentValues" : "CustomEnumComponentValueId"
    "PM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "ApplicationCore.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "Pricing.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "CRM.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "Pricing.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "ApplicationCore.CustomEnumComponents" : "CustomEnumComponentId"
    "CRM.CustomEnumComponentValues" }o--|| "PM.CustomEnumComponents" : "CustomEnumComponentId"
    "PM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "PM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "ApplicationCore.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "Pricing.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "CRM.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "Pricing.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "ApplicationCore.CustomEnums" : "CustomEnumId"
    "CRM.CustomEnumComponents" }o--|| "PM.CustomEnums" : "CustomEnumId"
{
    "definitions":  {
                        "ApplicationCore.CustomEnumComponentValueKeyValues":  {
                                                                                  "properties":  {
                                                                                                     "Concealed":  {
                                                                                                                       "type":  "boolean",
                                                                                                                       "description":  "bit"
                                                                                                                   },
                                                                                                     "EntityUpdatedAuthToken":  {
                                                                                                                                    "format":  "uuid",
                                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                                    "type":  "string"
                                                                                                                                },
                                                                                                     "Id":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                                     "Key":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "nvarchar"
                                                                                                             },
                                                                                                     "CustomEnumComponentValueId":  {
                                                                                                                                        "type":  "string",
                                                                                                                                        "description":  "FK to PM.CustomEnumComponentValues"
                                                                                                                                    },
                                                                                                     "EntityCreatedAuthToken":  {
                                                                                                                                    "format":  "uuid",
                                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                                    "type":  "string"
                                                                                                                                },
                                                                                                     "Value":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "nvarchar"
                                                                                                               },
                                                                                                     "EntityUpdatedDateTime":  {
                                                                                                                                   "format":  "date-time",
                                                                                                                                   "description":  "datetimeoffset",
                                                                                                                                   "type":  "string"
                                                                                                                               },
                                                                                                     "EntityCreatedDateTime":  {
                                                                                                                                   "format":  "date-time",
                                                                                                                                   "description":  "datetimeoffset",
                                                                                                                                   "type":  "string"
                                                                                                                               },
                                                                                                     "Tenant":  {
                                                                                                                    "format":  "uuid",
                                                                                                                    "description":  "uniqueidentifier",
                                                                                                                    "type":  "string"
                                                                                                                }
                                                                                                 },
                                                                                  "type":  "object"
                                                                              },
                        "ApplicationCore.CustomEnumComponents":  {
                                                                     "properties":  {
                                                                                        "Concealed":  {
                                                                                                          "type":  "boolean",
                                                                                                          "description":  "bit"
                                                                                                      },
                                                                                        "Id":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                                        "EntityUpdatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "Name":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "nvarchar"
                                                                                                 },
                                                                                        "EntityCreatedAuthToken":  {
                                                                                                                       "format":  "uuid",
                                                                                                                       "description":  "uniqueidentifier",
                                                                                                                       "type":  "string"
                                                                                                                   },
                                                                                        "EndDate":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                        "EntityUpdatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "Tenant":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                                        "ExternalReference":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "nvarchar"
                                                                                                              },
                                                                                        "EntityCreatedDateTime":  {
                                                                                                                      "format":  "date-time",
                                                                                                                      "description":  "datetimeoffset",
                                                                                                                      "type":  "string"
                                                                                                                  },
                                                                                        "StartDate":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                                        "CustomEnumId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to PM.CustomEnums"
                                                                                                         }
                                                                                    },
                                                                     "type":  "object"
                                                                 },
                        "ApplicationCore.CustomEnums":  {
                                                            "properties":  {
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "Description":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "Name":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "ApplicationCore.CustomEnumComponentValues":  {
                                                                          "properties":  {
                                                                                             "Concealed":  {
                                                                                                               "type":  "boolean",
                                                                                                               "description":  "bit"
                                                                                                           },
                                                                                             "EntityUpdatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "Id":  {
                                                                                                        "format":  "uuid",
                                                                                                        "description":  "uniqueidentifier",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                                             "CustomEnumComponentId":  {
                                                                                                                           "type":  "string",
                                                                                                                           "description":  "FK to PM.CustomEnumComponents"
                                                                                                                       },
                                                                                             "EntityCreatedAuthToken":  {
                                                                                                                            "format":  "uuid",
                                                                                                                            "description":  "uniqueidentifier",
                                                                                                                            "type":  "string"
                                                                                                                        },
                                                                                             "ScriptValue":  {
                                                                                                                 "type":  "string",
                                                                                                                 "description":  "nvarchar"
                                                                                                             },
                                                                                             "Value":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "nvarchar"
                                                                                                       },
                                                                                             "StartDate":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                             "EntityUpdatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "EntityCreatedDateTime":  {
                                                                                                                           "format":  "date-time",
                                                                                                                           "description":  "datetimeoffset",
                                                                                                                           "type":  "string"
                                                                                                                       },
                                                                                             "Tenant":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        }
                                                                                         },
                                                                          "type":  "object"
                                                                      }
                    },
    "title":  "ApplicationCore.CustomEnum",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

13 - CQRS Coordinator module

The CQRS Coordinator module in Vertex

This is a description of the CQRS Coordinator module

14 - CBP Messagebox module

The CBP Messagebox module in Vertex

This is a description of the CBP Messagebox module

15 - Gateway module

The Gateway module in Vertex

The gateway is the entry point for all external REST requests to Vertex.

Request tracing and caller attribution

Trace context

Send a W3C traceparent header to link the handling of a request in Vertex to a trace in your own tooling. B3 and Jaeger trace headers are also accepted; when several are present, traceparent takes precedence. A missing or malformed trace header never causes a request to be rejected; Vertex then starts a new trace for that request.

Caller headers

Identify your application and job with the following optional headers. They allow traffic and issues to be traced back to a specific caller and run, without requiring any tracing tooling on your side.

Header Purpose Example
X-EE-Application Name of the calling application PyVertexImporter
X-EE-Job Short logical name of the job or script daily-import
X-EE-Run-Id Identifier shared by all calls made in one run 8f14e45f-ceea-467f-a8f5-3c3b6c0e5a01
  • Use stable application and job names, and generate a new run identifier for every execution.
  • These headers are diagnostic labels only: they do not authenticate the caller, grant permissions, or change rate limits.
  • Never put credentials, tokens, personal data, or request content in these headers.

Header value rules

  • Allowed characters are ASCII letters, digits, spaces, ., _, and -; other characters are removed.
  • Values are trimmed and truncated to 128 characters.
  • Empty values, repeated headers, comma-separated lists, and values longer than 1,024 characters are ignored.
  • An invalid caller header never causes the request itself to be rejected.

16 - Identity Access Management module

The Identity Access Management module in Vertex

This is a description of the Identity Access Management module

16.1 - IAM Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

User

Aggregate Root: User

Represents users in the system with their authentication and authorization information.

erDiagram
    "IAM.OpenIdProviderUserSessions" {
        bigint TokenRegisteredTimestamp PK
        nvarchar JwtId PK
        uniqueidentifier UserId 
        nvarchar Username 
        uniqueidentifier AuthToken 
        nvarchar InitialIpAddress 
        varbinary RolesHash 
        varbinary PermissionsHash 
    }

    "IAM.UserSessionKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier UserSessionId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "IAM.UserSessionRoles" {
        uniqueidentifier Id PK
        uniqueidentifier UserSessionId FK
        nvarchar RoleName 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "IAM.UserSessions" {
        uniqueidentifier Id PK
        uniqueidentifier UserId FK
        uniqueidentifier AuthToken 
        nvarchar IPaddress 
        datetimeoffset SessionCreatedDateTime 
        datetimeoffset SessionEndDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar DeviceDescription 
        bit Concealed 
        nvarchar SessionIdentifier 
        nvarchar IdentityProviderDescription 
        varbinary PermissionsHash 
        varbinary RolesHash 
        nvarchar UserIdentifier 
        nvarchar Username 
    }

    "IAM.Users" {
        uniqueidentifier Id PK
        nvarchar FirstName 
        nvarchar LastName 
        nvarchar Username 
        nvarchar Email 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ShortName 
        nvarchar ColorCode 
        bit HasAvatar 
        bit Concealed 
        nvarchar UserIdentifier 
        nvarchar DisplayName 
    }

    "IAM.UsersInUserGroup" {
        uniqueidentifier UserGroupId PK
        uniqueidentifier UserId PK
    }

    "IAM.UserSessionKeyValues" }o--|| "IAM.UserSessions" : "UserSessionId"
    "IAM.UserSessionRoles" }o--|| "IAM.UserSessions" : "UserSessionId"
    "IAM.UserSessions" }o--|| "IAM.Users" : "UserId"
    "IAM.TeamMemberSet" }o--|| "IAM.Users" : "UserId"
    "IAM.UsersInUserGroup" }o--|| "IAM.Users" : "UserId"
    "IAM.UsersInUserGroup" }o--|| "IAM.UserGroups" : "UserGroupId"
erDiagram
    "IAM.OpenIdProviderUserSessions" {
        bigint TokenRegisteredTimestamp PK
        nvarchar JwtId PK
        uniqueidentifier UserId 
        nvarchar Username 
        uniqueidentifier AuthToken 
        nvarchar InitialIpAddress 
        varbinary RolesHash 
        varbinary PermissionsHash 
    }

    "IAM.UserSessionKeyValues" {
        uniqueidentifier Id PK
        uniqueidentifier UserSessionId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "IAM.UserSessionRoles" {
        uniqueidentifier Id PK
        uniqueidentifier UserSessionId FK
        nvarchar RoleName 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "IAM.UserSessions" {
        uniqueidentifier Id PK
        uniqueidentifier UserId FK
        uniqueidentifier AuthToken 
        nvarchar IPaddress 
        datetimeoffset SessionCreatedDateTime 
        datetimeoffset SessionEndDateTime 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar DeviceDescription 
        bit Concealed 
        nvarchar SessionIdentifier 
        nvarchar IdentityProviderDescription 
        varbinary PermissionsHash 
        varbinary RolesHash 
        nvarchar UserIdentifier 
        nvarchar Username 
    }

    "IAM.Users" {
        uniqueidentifier Id PK
        nvarchar FirstName 
        nvarchar LastName 
        nvarchar Username 
        nvarchar Email 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ShortName 
        nvarchar ColorCode 
        bit HasAvatar 
        bit Concealed 
        nvarchar UserIdentifier 
        nvarchar DisplayName 
    }

    "IAM.UsersInUserGroup" {
        uniqueidentifier UserGroupId PK
        uniqueidentifier UserId PK
    }

    "IAM.UserSessionKeyValues" }o--|| "IAM.UserSessions" : "UserSessionId"
    "IAM.UserSessionRoles" }o--|| "IAM.UserSessions" : "UserSessionId"
    "IAM.UserSessions" }o--|| "IAM.Users" : "UserId"
    "IAM.TeamMemberSet" }o--|| "IAM.Users" : "UserId"
    "IAM.UsersInUserGroup" }o--|| "IAM.Users" : "UserId"
    "IAM.UsersInUserGroup" }o--|| "IAM.UserGroups" : "UserGroupId"
{
    "definitions":  {
                        "IAM.UserSessionRoles":  {
                                                     "properties":  {
                                                                        "Concealed":  {
                                                                                          "type":  "boolean",
                                                                                          "description":  "bit"
                                                                                      },
                                                                        "RoleName":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                        "Id":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                        "UserSessionId":  {
                                                                                              "type":  "string",
                                                                                              "description":  "FK to IAM.UserSessions"
                                                                                          },
                                                                        "EntityUpdatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "EntityCreatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "EntityUpdatedDateTime":  {
                                                                                                      "format":  "date-time",
                                                                                                      "description":  "datetimeoffset",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                        "EntityCreatedAuthToken":  {
                                                                                                       "format":  "uuid",
                                                                                                       "description":  "uniqueidentifier",
                                                                                                       "type":  "string"
                                                                                                   },
                                                                        "Tenant":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   }
                                                                    },
                                                     "type":  "object"
                                                 },
                        "IAM.Users":  {
                                          "properties":  {
                                                             "LastName":  {
                                                                              "type":  "string",
                                                                              "description":  "nvarchar"
                                                                          },
                                                             "EntityUpdatedAuthToken":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                             "Concealed":  {
                                                                               "type":  "boolean",
                                                                               "description":  "bit"
                                                                           },
                                                             "Username":  {
                                                                              "type":  "string",
                                                                              "description":  "nvarchar"
                                                                          },
                                                             "EntityCreatedAuthToken":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                             "FirstName":  {
                                                                               "type":  "string",
                                                                               "description":  "nvarchar"
                                                                           },
                                                             "DisplayName":  {
                                                                                 "type":  "string",
                                                                                 "description":  "nvarchar"
                                                                             },
                                                             "ColorCode":  {
                                                                               "type":  "string",
                                                                               "description":  "nvarchar"
                                                                           },
                                                             "EntityUpdatedDateTime":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                             "UserIdentifier":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                             "Tenant":  {
                                                                            "format":  "uuid",
                                                                            "description":  "uniqueidentifier",
                                                                            "type":  "string"
                                                                        },
                                                             "Id":  {
                                                                        "format":  "uuid",
                                                                        "description":  "uniqueidentifier",
                                                                        "type":  "string"
                                                                    },
                                                             "HasAvatar":  {
                                                                               "type":  "boolean",
                                                                               "description":  "bit"
                                                                           },
                                                             "EntityCreatedDateTime":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                             "ShortName":  {
                                                                               "type":  "string",
                                                                               "description":  "nvarchar"
                                                                           },
                                                             "Email":  {
                                                                           "type":  "string",
                                                                           "description":  "nvarchar"
                                                                       }
                                                         },
                                          "type":  "object"
                                      },
                        "IAM.UsersInUserGroup":  {
                                                     "properties":  {
                                                                        "UserId":  {
                                                                                       "type":  "string",
                                                                                       "description":  "FK to IAM.Users"
                                                                                   },
                                                                        "UserGroupId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to IAM.UserGroups"
                                                                                        }
                                                                    },
                                                     "type":  "object"
                                                 },
                        "IAM.OpenIdProviderUserSessions":  {
                                                               "properties":  {
                                                                                  "AuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                                  "Username":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                                  "TokenRegisteredTimestamp":  {
                                                                                                                   "type":  "string",
                                                                                                                   "description":  "bigint"
                                                                                                               },
                                                                                  "RolesHash":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "varbinary"
                                                                                                },
                                                                                  "PermissionsHash":  {
                                                                                                          "type":  "string",
                                                                                                          "description":  "varbinary"
                                                                                                      },
                                                                                  "UserId":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                  "InitialIpAddress":  {
                                                                                                           "type":  "string",
                                                                                                           "description":  "nvarchar"
                                                                                                       },
                                                                                  "JwtId":  {
                                                                                                "type":  "string",
                                                                                                "description":  "nvarchar"
                                                                                            }
                                                                              },
                                                               "type":  "object"
                                                           },
                        "IAM.UserSessionKeyValues":  {
                                                         "properties":  {
                                                                            "Concealed":  {
                                                                                              "type":  "boolean",
                                                                                              "description":  "bit"
                                                                                          },
                                                                            "EntityUpdatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Id":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                            "EntityCreatedAuthToken":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                            "Key":  {
                                                                                        "type":  "string",
                                                                                        "description":  "nvarchar"
                                                                                    },
                                                                            "UserSessionId":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "FK to IAM.UserSessions"
                                                                                              },
                                                                            "Value":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                                            "EntityUpdatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "EntityCreatedDateTime":  {
                                                                                                          "format":  "date-time",
                                                                                                          "description":  "datetimeoffset",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                            "Tenant":  {
                                                                                           "format":  "uuid",
                                                                                           "description":  "uniqueidentifier",
                                                                                           "type":  "string"
                                                                                       }
                                                                        },
                                                         "type":  "object"
                                                     },
                        "IAM.UserSessions":  {
                                                 "properties":  {
                                                                    "Id":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                    "SessionEndDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                    "IPaddress":  {
                                                                                      "type":  "string",
                                                                                      "description":  "nvarchar"
                                                                                  },
                                                                    "Concealed":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "IdentityProviderDescription":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "nvarchar"
                                                                                                    },
                                                                    "Username":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                    "SessionIdentifier":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                    "EntityCreatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "AuthToken":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                    "SessionCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "EntityUpdatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "RolesHash":  {
                                                                                      "type":  "string",
                                                                                      "description":  "varbinary"
                                                                                  },
                                                                    "UserId":  {
                                                                                   "type":  "string",
                                                                                   "description":  "FK to IAM.Users"
                                                                               },
                                                                    "DeviceDescription":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                    "Tenant":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               },
                                                                    "EntityCreatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "UserIdentifier":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                    "PermissionsHash":  {
                                                                                            "type":  "string",
                                                                                            "description":  "varbinary"
                                                                                        },
                                                                    "EntityUpdatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               }
                                                                },
                                                 "type":  "object"
                                             }
                    },
    "title":  "IAM.User",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Team

Aggregate Root: Team

Represents teams of users for organizational and collaborative purposes.

erDiagram
    "IAM.TeamMemberSet" {
        uniqueidentifier Id PK
        uniqueidentifier TeamId FK
        uniqueidentifier UserId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "IAM.Teams" {
        uniqueidentifier Id PK
        nvarchar TeamName 
        nvarchar TeamDescription 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "IAM.TeamMemberSet" }o--|| "IAM.Teams" : "TeamId"
    "IAM.TeamMemberSet" }o--|| "IAM.Users" : "UserId"
erDiagram
    "IAM.TeamMemberSet" {
        uniqueidentifier Id PK
        uniqueidentifier TeamId FK
        uniqueidentifier UserId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "IAM.Teams" {
        uniqueidentifier Id PK
        nvarchar TeamName 
        nvarchar TeamDescription 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "IAM.TeamMemberSet" }o--|| "IAM.Teams" : "TeamId"
    "IAM.TeamMemberSet" }o--|| "IAM.Users" : "UserId"
{
    "definitions":  {
                        "IAM.TeamMemberSet":  {
                                                  "properties":  {
                                                                     "Concealed":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "bit"
                                                                                   },
                                                                     "EntityUpdatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Id":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                     "TeamId":  {
                                                                                    "type":  "string",
                                                                                    "description":  "FK to IAM.Teams"
                                                                                },
                                                                     "EntityCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "EntityUpdatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "UserId":  {
                                                                                    "type":  "string",
                                                                                    "description":  "FK to IAM.Users"
                                                                                },
                                                                     "EntityCreatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Tenant":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                }
                                                                 },
                                                  "type":  "object"
                                              },
                        "IAM.Teams":  {
                                          "properties":  {
                                                             "Tenant":  {
                                                                            "format":  "uuid",
                                                                            "description":  "uniqueidentifier",
                                                                            "type":  "string"
                                                                        },
                                                             "EntityUpdatedAuthToken":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                             "Id":  {
                                                                        "format":  "uuid",
                                                                        "description":  "uniqueidentifier",
                                                                        "type":  "string"
                                                                    },
                                                             "TeamDescription":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                             "Concealed":  {
                                                                               "type":  "boolean",
                                                                               "description":  "bit"
                                                                           },
                                                             "EntityCreatedDateTime":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                             "EntityUpdatedDateTime":  {
                                                                                           "format":  "date-time",
                                                                                           "description":  "datetimeoffset",
                                                                                           "type":  "string"
                                                                                       },
                                                             "EntityCreatedAuthToken":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                             "TeamName":  {
                                                                              "type":  "string",
                                                                              "description":  "nvarchar"
                                                                          }
                                                         },
                                          "type":  "object"
                                      }
                    },
    "title":  "IAM.Team",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

User Group

Aggregate Root: UserGroup

Represents groups of users for access control and permission management.

erDiagram
    "IAM.UserGroups" {
        uniqueidentifier Id PK
        nvarchar GroupName 
        nvarchar GroupDescription 
        nvarchar Email 
        bit IsTaskGroup 
        bit IsActive 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ShortName 
        nvarchar ColorCode 
        bit HasAvatar 
        uniqueidentifier DirectoryGuid 
        bit Concealed 
    }

    "IAM.UsersInUserGroup" }o--|| "IAM.UserGroups" : "UserGroupId"
erDiagram
    "IAM.UserGroups" {
        uniqueidentifier Id PK
        nvarchar GroupName 
        nvarchar GroupDescription 
        nvarchar Email 
        bit IsTaskGroup 
        bit IsActive 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar ShortName 
        nvarchar ColorCode 
        bit HasAvatar 
        uniqueidentifier DirectoryGuid 
        bit Concealed 
    }

    "IAM.UsersInUserGroup" }o--|| "IAM.UserGroups" : "UserGroupId"
{
    "definitions":  {
                        "IAM.UserGroups":  {
                                               "properties":  {
                                                                  "Id":  {
                                                                             "format":  "uuid",
                                                                             "description":  "uniqueidentifier",
                                                                             "type":  "string"
                                                                         },
                                                                  "HasAvatar":  {
                                                                                    "type":  "boolean",
                                                                                    "description":  "bit"
                                                                                },
                                                                  "EntityUpdatedAuthToken":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                  "Concealed":  {
                                                                                    "type":  "boolean",
                                                                                    "description":  "bit"
                                                                                },
                                                                  "IsActive":  {
                                                                                   "type":  "boolean",
                                                                                   "description":  "bit"
                                                                               },
                                                                  "Tenant":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             },
                                                                  "EntityCreatedAuthToken":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                  "DirectoryGuid":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                  "ColorCode":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                  "EntityUpdatedDateTime":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                  "EntityCreatedDateTime":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                  "GroupDescription":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                  "GroupName":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                  "IsTaskGroup":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                  "ShortName":  {
                                                                                    "type":  "string",
                                                                                    "description":  "nvarchar"
                                                                                },
                                                                  "Email":  {
                                                                                "type":  "string",
                                                                                "description":  "nvarchar"
                                                                            }
                                                              },
                                               "type":  "object"
                                           }
                    },
    "title":  "IAM.UserGroup",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Application Tenant

Aggregate Root: ApplicationTenant

Represents tenants in the multi-tenant application architecture for data isolation and management.

erDiagram
    "IAM.ApplicationTenants" {
        uniqueidentifier Id PK
        uniqueidentifier ParentApplicationTenantId FK
        nvarchar Name 
        nvarchar Description 
        int MarketRole 
        uniqueidentifier Tenant 
        nvarchar _ean 
        int LevelType 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit HasAvatar 
        bit Concealed 
    }

    "IAM.ApplicationTenants" }o--|| "IAM.ApplicationTenants" : "ParentApplicationTenantId"
erDiagram
    "IAM.ApplicationTenants" {
        uniqueidentifier Id PK
        uniqueidentifier ParentApplicationTenantId FK
        nvarchar Name 
        nvarchar Description 
        int MarketRole 
        uniqueidentifier Tenant 
        nvarchar _ean 
        int LevelType 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit HasAvatar 
        bit Concealed 
    }

    "IAM.ApplicationTenants" }o--|| "IAM.ApplicationTenants" : "ParentApplicationTenantId"
{
    "definitions":  {
                        "IAM.ApplicationTenants":  {
                                                       "properties":  {
                                                                          "Concealed":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "_ean":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                          "EntityUpdatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "Name":  {
                                                                                       "type":  "string",
                                                                                       "description":  "nvarchar"
                                                                                   },
                                                                          "EntityCreatedAuthToken":  {
                                                                                                         "format":  "uuid",
                                                                                                         "description":  "uniqueidentifier",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                          "EntityUpdatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "MarketRole":  {
                                                                                             "type":  "integer",
                                                                                             "description":  "int"
                                                                                         },
                                                                          "LevelType":  {
                                                                                            "type":  "integer",
                                                                                            "description":  "int"
                                                                                        },
                                                                          "Tenant":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                          "Description":  {
                                                                                              "type":  "string",
                                                                                              "description":  "nvarchar"
                                                                                          },
                                                                          "Id":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                          "HasAvatar":  {
                                                                                            "type":  "boolean",
                                                                                            "description":  "bit"
                                                                                        },
                                                                          "EntityCreatedDateTime":  {
                                                                                                        "format":  "date-time",
                                                                                                        "description":  "datetimeoffset",
                                                                                                        "type":  "string"
                                                                                                    },
                                                                          "ParentApplicationTenantId":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "FK to IAM.ApplicationTenants"
                                                                                                        }
                                                                      },
                                                       "type":  "object"
                                                   }
                    },
    "title":  "IAM.ApplicationTenant",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

17 - Jobs module

The Jobs module in Vertex

This is a description of the Jobs module

18 - JsonBroker module

The JsonBroker module in Vertex

Document uploads

/api/document/new accepts resumable tus uploads from callers with document-create permission. Creating, inspecting, resuming, deleting, and concatenating an upload require the same authenticated user and selected tenant; the upload URL alone does not grant access. Completed uploads are stored as temporary documents for that tenant.

Uploads created before this ownership isolation cannot be resumed and must be restarted. Incomplete uploads expire after one day of inactivity.

19 - Dexter module

The documentation of the Vertex Dexter module

20 - Document Generation module

The documentation of the Vertex Document Generation module

21 - eBase interfacing module

The documentation of the Vertex eBase interfacing module

22 - MessageBox EDSN ARG module

The documentation of the Vertex MessageBox EDSN ARG module

23 - MessageBox Tennet module

The documentation of the Vertex MessageBox Tennet module

24 - National Transport Costs Calculation module

The documentation of the Vertex National Transport Costs Calculation module

25 - Pricing Data Brokers module

The documentation of the Vertex Pricing Data Brokers module

25.1 - PDB Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Market

Aggregate Root: Market

Represents markets for pricing data with their associated products and brokers.

erDiagram
    "PDB.MarketMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier MarketId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PricingDataBrokerId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.MarketProductDeliveries" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier MarketProductId FK
        datetimeoffset StartDateTimeOffset 
        uniqueidentifier DeliverySettlementPeriodId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.MarketProductDeliveryMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier MarketProductDeliveryId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PriceSourceId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.MarketProductDeliveryPriceSource" {
        uniqueidentifier MarketProductDeliveryId PK
        uniqueidentifier PriceSourceId PK
    }

    "PDB.MarketProductDeliverySettlementPeriod" {
        uniqueidentifier MarketProductId PK
        uniqueidentifier DeliverySettlementPeriodId PK
    }

    "PDB.MarketProductMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier MarketProductId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PricingDataBrokerId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.MarketProducts" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Code 
        uniqueidentifier MarketId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int MarketProductConfigurationType 
        bit Concealed 
    }

    "PDB.Markets" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar Code 
        bit Concealed 
    }

    "PDB.PriceSources" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier PricingBrokerId FK
        uniqueidentifier PricingDataBrokerId 
        bit Concealed 
    }

    "PDB.MarketMetadatas" }o--|| "PDB.Markets" : "MarketId"
    "PDB.MarketProductDeliveries" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.MarketProductDeliveries" }o--|| "PDB.MarketProducts" : "MarketProductId"
    "PDB.MarketProductDeliveryMetadatas" }o--|| "PDB.MarketProductDeliveries" : "MarketProductDeliveryId"
    "PDB.MarketProductDeliveryPriceSource" }o--|| "PDB.MarketProductDeliveries" : "MarketProductDeliveryId"
    "PDB.MarketProductDeliveryMetadatas" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.MarketProductDeliveryPriceSource" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.MarketProductDeliverySettlementPeriod" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.MarketProductDeliverySettlementPeriod" }o--|| "PDB.MarketProducts" : "MarketProductId"
    "PDB.MarketProductMetadatas" }o--|| "PDB.MarketProducts" : "MarketProductId"
    "PDB.FetchPrograms" }o--|| "PDB.MarketProducts" : "MarketProductId"
    "PDB.MarketProducts" }o--|| "PDB.Markets" : "MarketId"
    "PDB.FetchProgramMetadatas" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.FetchProgramPriceSource" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.PriceSources" }o--|| "PDB.PricingBrokers" : "PricingBrokerId"
erDiagram
    "PDB.MarketMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier MarketId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PricingDataBrokerId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.MarketProductDeliveries" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier MarketProductId FK
        datetimeoffset StartDateTimeOffset 
        uniqueidentifier DeliverySettlementPeriodId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.MarketProductDeliveryMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier MarketProductDeliveryId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PriceSourceId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.MarketProductDeliveryPriceSource" {
        uniqueidentifier MarketProductDeliveryId PK
        uniqueidentifier PriceSourceId PK
    }

    "PDB.MarketProductDeliverySettlementPeriod" {
        uniqueidentifier MarketProductId PK
        uniqueidentifier DeliverySettlementPeriodId PK
    }

    "PDB.MarketProductMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier MarketProductId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PricingDataBrokerId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.MarketProducts" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Code 
        uniqueidentifier MarketId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int MarketProductConfigurationType 
        bit Concealed 
    }

    "PDB.Markets" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        nvarchar Code 
        bit Concealed 
    }

    "PDB.PriceSources" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier PricingBrokerId FK
        uniqueidentifier PricingDataBrokerId 
        bit Concealed 
    }

    "PDB.MarketMetadatas" }o--|| "PDB.Markets" : "MarketId"
    "PDB.MarketProductDeliveries" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.MarketProductDeliveries" }o--|| "PDB.MarketProducts" : "MarketProductId"
    "PDB.MarketProductDeliveryMetadatas" }o--|| "PDB.MarketProductDeliveries" : "MarketProductDeliveryId"
    "PDB.MarketProductDeliveryPriceSource" }o--|| "PDB.MarketProductDeliveries" : "MarketProductDeliveryId"
    "PDB.MarketProductDeliveryMetadatas" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.MarketProductDeliveryPriceSource" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.MarketProductDeliverySettlementPeriod" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.MarketProductDeliverySettlementPeriod" }o--|| "PDB.MarketProducts" : "MarketProductId"
    "PDB.MarketProductMetadatas" }o--|| "PDB.MarketProducts" : "MarketProductId"
    "PDB.FetchPrograms" }o--|| "PDB.MarketProducts" : "MarketProductId"
    "PDB.MarketProducts" }o--|| "PDB.Markets" : "MarketId"
    "PDB.FetchProgramMetadatas" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.FetchProgramPriceSource" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.PriceSources" }o--|| "PDB.PricingBrokers" : "PricingBrokerId"
{
    "definitions":  {
                        "PDB.MarketProducts":  {
                                                   "properties":  {
                                                                      "Concealed":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                                      "EntityUpdatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Id":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             },
                                                                      "MarketProductConfigurationType":  {
                                                                                                             "type":  "integer",
                                                                                                             "description":  "int"
                                                                                                         },
                                                                      "MarketId":  {
                                                                                       "type":  "string",
                                                                                       "description":  "FK to PDB.Markets"
                                                                                   },
                                                                      "EntityCreatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "Name":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                                      "EntityUpdatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "Code":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                                      "EntityCreatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Tenant":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 }
                                                                  },
                                                   "type":  "object"
                                               },
                        "PDB.MarketProductDeliverySettlementPeriod":  {
                                                                          "properties":  {
                                                                                             "MarketProductId":  {
                                                                                                                     "type":  "string",
                                                                                                                     "description":  "FK to PDB.MarketProducts"
                                                                                                                 },
                                                                                             "DeliverySettlementPeriodId":  {
                                                                                                                                "type":  "string",
                                                                                                                                "description":  "FK to PDB.DeliverySettlementPeriods"
                                                                                                                            }
                                                                                         },
                                                                          "type":  "object"
                                                                      },
                        "PDB.MarketProductDeliveries":  {
                                                            "properties":  {
                                                                               "Concealed":  {
                                                                                                 "type":  "boolean",
                                                                                                 "description":  "bit"
                                                                                             },
                                                                               "MarketProductId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to PDB.MarketProducts"
                                                                                                   },
                                                                               "Id":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                               "StartDateTimeOffset":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                               "EntityUpdatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "EntityCreatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "Name":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                               "EntityUpdatedDateTime":  {
                                                                                                             "format":  "date-time",
                                                                                                             "description":  "datetimeoffset",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                               "DeliverySettlementPeriodId":  {
                                                                                                                  "type":  "string",
                                                                                                                  "description":  "FK to PDB.DeliverySettlementPeriods"
                                                                                                              },
                                                                               "EntityCreatedAuthToken":  {
                                                                                                              "format":  "uuid",
                                                                                                              "description":  "uniqueidentifier",
                                                                                                              "type":  "string"
                                                                                                          },
                                                                               "Tenant":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "PDB.MarketProductDeliveryMetadatas":  {
                                                                   "properties":  {
                                                                                      "Tenant":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                                      "EntityUpdatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Id":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                                      "MarketProductDeliveryId":  {
                                                                                                                      "type":  "string",
                                                                                                                      "description":  "FK to PDB.MarketProductDeliveries"
                                                                                                                  },
                                                                                      "PriceSourceId":  {
                                                                                                            "type":  "string",
                                                                                                            "description":  "FK to PDB.PriceSources"
                                                                                                        },
                                                                                      "EntityCreatedAuthToken":  {
                                                                                                                     "format":  "uuid",
                                                                                                                     "description":  "uniqueidentifier",
                                                                                                                     "type":  "string"
                                                                                                                 },
                                                                                      "Concealed":  {
                                                                                                        "type":  "boolean",
                                                                                                        "description":  "bit"
                                                                                                    },
                                                                                      "Value":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "nvarchar"
                                                                                                },
                                                                                      "EntityUpdatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "EntityCreatedDateTime":  {
                                                                                                                    "format":  "date-time",
                                                                                                                    "description":  "datetimeoffset",
                                                                                                                    "type":  "string"
                                                                                                                },
                                                                                      "Key":  {
                                                                                                  "type":  "string",
                                                                                                  "description":  "nvarchar"
                                                                                              }
                                                                                  },
                                                                   "type":  "object"
                                                               },
                        "PDB.PriceSources":  {
                                                 "properties":  {
                                                                    "Concealed":  {
                                                                                      "type":  "boolean",
                                                                                      "description":  "bit"
                                                                                  },
                                                                    "EntityUpdatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Id":  {
                                                                               "format":  "uuid",
                                                                               "description":  "uniqueidentifier",
                                                                               "type":  "string"
                                                                           },
                                                                    "PricingBrokerId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to PDB.PricingBrokers"
                                                                                        },
                                                                    "EntityCreatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "EntityUpdatedDateTime":  {
                                                                                                  "format":  "date-time",
                                                                                                  "description":  "datetimeoffset",
                                                                                                  "type":  "string"
                                                                                              },
                                                                    "PricingDataBrokerId":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                    "EntityCreatedAuthToken":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                    "Tenant":  {
                                                                                   "format":  "uuid",
                                                                                   "description":  "uniqueidentifier",
                                                                                   "type":  "string"
                                                                               }
                                                                },
                                                 "type":  "object"
                                             },
                        "PDB.MarketMetadatas":  {
                                                    "properties":  {
                                                                       "Tenant":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                       "EntityUpdatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "PricingDataBrokerId":  {
                                                                                                   "format":  "uuid",
                                                                                                   "description":  "uniqueidentifier",
                                                                                                   "type":  "string"
                                                                                               },
                                                                       "EntityCreatedAuthToken":  {
                                                                                                      "format":  "uuid",
                                                                                                      "description":  "uniqueidentifier",
                                                                                                      "type":  "string"
                                                                                                  },
                                                                       "Id":  {
                                                                                  "format":  "uuid",
                                                                                  "description":  "uniqueidentifier",
                                                                                  "type":  "string"
                                                                              },
                                                                       "MarketId":  {
                                                                                        "type":  "string",
                                                                                        "description":  "FK to PDB.Markets"
                                                                                    },
                                                                       "Concealed":  {
                                                                                         "type":  "boolean",
                                                                                         "description":  "bit"
                                                                                     },
                                                                       "Value":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                       "EntityUpdatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "EntityCreatedDateTime":  {
                                                                                                     "format":  "date-time",
                                                                                                     "description":  "datetimeoffset",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                       "Key":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               }
                                                                   },
                                                    "type":  "object"
                                                },
                        "PDB.MarketProductMetadatas":  {
                                                           "properties":  {
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "MarketProductId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to PDB.MarketProducts"
                                                                                                  },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "Key":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "Value":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "PricingDataBrokerId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       },
                        "PDB.Markets":  {
                                            "properties":  {
                                                               "Concealed":  {
                                                                                 "type":  "boolean",
                                                                                 "description":  "bit"
                                                                             },
                                                               "EntityUpdatedAuthToken":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                               "Id":  {
                                                                          "format":  "uuid",
                                                                          "description":  "uniqueidentifier",
                                                                          "type":  "string"
                                                                      },
                                                               "Description":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                               "EntityCreatedDateTime":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                               "Name":  {
                                                                            "type":  "string",
                                                                            "description":  "nvarchar"
                                                                        },
                                                               "EntityUpdatedDateTime":  {
                                                                                             "format":  "date-time",
                                                                                             "description":  "datetimeoffset",
                                                                                             "type":  "string"
                                                                                         },
                                                               "Code":  {
                                                                            "type":  "string",
                                                                            "description":  "nvarchar"
                                                                        },
                                                               "EntityCreatedAuthToken":  {
                                                                                              "format":  "uuid",
                                                                                              "description":  "uniqueidentifier",
                                                                                              "type":  "string"
                                                                                          },
                                                               "Tenant":  {
                                                                              "format":  "uuid",
                                                                              "description":  "uniqueidentifier",
                                                                              "type":  "string"
                                                                          }
                                                           },
                                            "type":  "object"
                                        },
                        "PDB.MarketProductDeliveryPriceSource":  {
                                                                     "properties":  {
                                                                                        "MarketProductDeliveryId":  {
                                                                                                                        "type":  "string",
                                                                                                                        "description":  "FK to PDB.MarketProductDeliveries"
                                                                                                                    },
                                                                                        "PriceSourceId":  {
                                                                                                              "type":  "string",
                                                                                                              "description":  "FK to PDB.PriceSources"
                                                                                                          }
                                                                                    },
                                                                     "type":  "object"
                                                                 }
                    },
    "title":  "PDB.Market",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Pricing Broker

Aggregate Root: PricingBroker

Represents brokers that provide pricing data and services for market products.

erDiagram
    "PDB.PricingBrokerMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier PricingBrokerId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PricingDataBrokerId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.PricingBrokers" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Code 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.PricingBrokerMetadatas" }o--|| "PDB.PricingBrokers" : "PricingBrokerId"
    "PDB.PriceSources" }o--|| "PDB.PricingBrokers" : "PricingBrokerId"
erDiagram
    "PDB.PricingBrokerMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier PricingBrokerId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PricingDataBrokerId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.PricingBrokers" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Code 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.PricingBrokerMetadatas" }o--|| "PDB.PricingBrokers" : "PricingBrokerId"
    "PDB.PriceSources" }o--|| "PDB.PricingBrokers" : "PricingBrokerId"
{
    "definitions":  {
                        "PDB.PricingBrokers":  {
                                                   "properties":  {
                                                                      "Concealed":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                                      "EntityUpdatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Id":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             },
                                                                      "EntityCreatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "Name":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                                      "EntityUpdatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "Code":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                                      "EntityCreatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Tenant":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 }
                                                                  },
                                                   "type":  "object"
                                               },
                        "PDB.PricingBrokerMetadatas":  {
                                                           "properties":  {
                                                                              "Tenant":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                              "EntityUpdatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "PricingDataBrokerId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                              "Id":  {
                                                                                         "format":  "uuid",
                                                                                         "description":  "uniqueidentifier",
                                                                                         "type":  "string"
                                                                                     },
                                                                              "Concealed":  {
                                                                                                "type":  "boolean",
                                                                                                "description":  "bit"
                                                                                            },
                                                                              "EntityCreatedAuthToken":  {
                                                                                                             "format":  "uuid",
                                                                                                             "description":  "uniqueidentifier",
                                                                                                             "type":  "string"
                                                                                                         },
                                                                              "PricingBrokerId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to PDB.PricingBrokers"
                                                                                                  },
                                                                              "Value":  {
                                                                                            "type":  "string",
                                                                                            "description":  "nvarchar"
                                                                                        },
                                                                              "EntityUpdatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "EntityCreatedDateTime":  {
                                                                                                            "format":  "date-time",
                                                                                                            "description":  "datetimeoffset",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                              "Key":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      }
                                                                          },
                                                           "type":  "object"
                                                       }
                    },
    "title":  "PDB.PricingBroker",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

Fetch Program

Aggregate Root: FetchProgram

Represents programs for fetching pricing data from external sources and brokers.

erDiagram
    "PDB.DeliverySettlementPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier SettlementTimeFrameId FK
        uniqueidentifier DeliveryTimeFrameId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.FetchProgramMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier FetchProgramId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PriceSourceId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.FetchProgramPriceSource" {
        uniqueidentifier FetchProgramId PK
        uniqueidentifier PriceSourceId PK
    }

    "PDB.FetchPrograms" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier MarketProductId FK
        int NumberOfDeliverySettlementPeriods 
        uniqueidentifier DeliverySettlementPeriodId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int FetcherFlags 
        bit Concealed 
    }

    "PDB.TimeFrames" {
        uniqueidentifier Id PK
        int Value 
        int TimeFrameType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.DeliverySettlementPeriods" }o--|| "PDB.TimeFrames" : "DeliveryTimeFrameId"
    "PDB.DeliverySettlementPeriods" }o--|| "PDB.TimeFrames" : "SettlementTimeFrameId"
    "PDB.FetchPrograms" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.MarketProductDeliveries" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.MarketProductDeliverySettlementPeriod" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.FetchProgramMetadatas" }o--|| "PDB.FetchPrograms" : "FetchProgramId"
    "PDB.FetchProgramMetadatas" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.FetchProgramPriceSource" }o--|| "PDB.FetchPrograms" : "FetchProgramId"
    "PDB.FetchProgramPriceSource" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.FetchPrograms" }o--|| "PDB.MarketProducts" : "MarketProductId"
erDiagram
    "PDB.DeliverySettlementPeriods" {
        uniqueidentifier Id PK
        uniqueidentifier SettlementTimeFrameId FK
        uniqueidentifier DeliveryTimeFrameId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.FetchProgramMetadatas" {
        uniqueidentifier Id PK
        uniqueidentifier FetchProgramId FK
        nvarchar Key 
        nvarchar Value 
        uniqueidentifier PriceSourceId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.FetchProgramPriceSource" {
        uniqueidentifier FetchProgramId PK
        uniqueidentifier PriceSourceId PK
    }

    "PDB.FetchPrograms" {
        uniqueidentifier Id PK
        nvarchar Name 
        uniqueidentifier MarketProductId FK
        int NumberOfDeliverySettlementPeriods 
        uniqueidentifier DeliverySettlementPeriodId FK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int FetcherFlags 
        bit Concealed 
    }

    "PDB.TimeFrames" {
        uniqueidentifier Id PK
        int Value 
        int TimeFrameType 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "PDB.DeliverySettlementPeriods" }o--|| "PDB.TimeFrames" : "DeliveryTimeFrameId"
    "PDB.DeliverySettlementPeriods" }o--|| "PDB.TimeFrames" : "SettlementTimeFrameId"
    "PDB.FetchPrograms" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.MarketProductDeliveries" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.MarketProductDeliverySettlementPeriod" }o--|| "PDB.DeliverySettlementPeriods" : "DeliverySettlementPeriodId"
    "PDB.FetchProgramMetadatas" }o--|| "PDB.FetchPrograms" : "FetchProgramId"
    "PDB.FetchProgramMetadatas" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.FetchProgramPriceSource" }o--|| "PDB.FetchPrograms" : "FetchProgramId"
    "PDB.FetchProgramPriceSource" }o--|| "PDB.PriceSources" : "PriceSourceId"
    "PDB.FetchPrograms" }o--|| "PDB.MarketProducts" : "MarketProductId"
{
    "definitions":  {
                        "PDB.DeliverySettlementPeriods":  {
                                                              "properties":  {
                                                                                 "Concealed":  {
                                                                                                   "type":  "boolean",
                                                                                                   "description":  "bit"
                                                                                               },
                                                                                 "SettlementTimeFrameId":  {
                                                                                                               "type":  "string",
                                                                                                               "description":  "FK to PDB.TimeFrames"
                                                                                                           },
                                                                                 "Id":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                                 "EntityUpdatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "DeliveryTimeFrameId":  {
                                                                                                             "type":  "string",
                                                                                                             "description":  "FK to PDB.TimeFrames"
                                                                                                         },
                                                                                 "EntityCreatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityUpdatedDateTime":  {
                                                                                                               "format":  "date-time",
                                                                                                               "description":  "datetimeoffset",
                                                                                                               "type":  "string"
                                                                                                           },
                                                                                 "EntityCreatedAuthToken":  {
                                                                                                                "format":  "uuid",
                                                                                                                "description":  "uniqueidentifier",
                                                                                                                "type":  "string"
                                                                                                            },
                                                                                 "Tenant":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                                             },
                                                              "type":  "object"
                                                          },
                        "PDB.FetchProgramPriceSource":  {
                                                            "properties":  {
                                                                               "FetchProgramId":  {
                                                                                                      "type":  "string",
                                                                                                      "description":  "FK to PDB.FetchPrograms"
                                                                                                  },
                                                                               "PriceSourceId":  {
                                                                                                     "type":  "string",
                                                                                                     "description":  "FK to PDB.PriceSources"
                                                                                                 }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "PDB.FetchPrograms":  {
                                                  "properties":  {
                                                                     "Concealed":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "bit"
                                                                                   },
                                                                     "Id":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                     "FetcherFlags":  {
                                                                                          "type":  "integer",
                                                                                          "description":  "int"
                                                                                      },
                                                                     "EntityUpdatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "Name":  {
                                                                                  "type":  "string",
                                                                                  "description":  "nvarchar"
                                                                              },
                                                                     "EntityCreatedAuthToken":  {
                                                                                                    "format":  "uuid",
                                                                                                    "description":  "uniqueidentifier",
                                                                                                    "type":  "string"
                                                                                                },
                                                                     "NumberOfDeliverySettlementPeriods":  {
                                                                                                               "type":  "integer",
                                                                                                               "description":  "int"
                                                                                                           },
                                                                     "EntityUpdatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               },
                                                                     "MarketProductId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to PDB.MarketProducts"
                                                                                         },
                                                                     "DeliverySettlementPeriodId":  {
                                                                                                        "type":  "string",
                                                                                                        "description":  "FK to PDB.DeliverySettlementPeriods"
                                                                                                    },
                                                                     "Tenant":  {
                                                                                    "format":  "uuid",
                                                                                    "description":  "uniqueidentifier",
                                                                                    "type":  "string"
                                                                                },
                                                                     "EntityCreatedDateTime":  {
                                                                                                   "format":  "date-time",
                                                                                                   "description":  "datetimeoffset",
                                                                                                   "type":  "string"
                                                                                               }
                                                                 },
                                                  "type":  "object"
                                              },
                        "PDB.TimeFrames":  {
                                               "properties":  {
                                                                  "Concealed":  {
                                                                                    "type":  "boolean",
                                                                                    "description":  "bit"
                                                                                },
                                                                  "EntityUpdatedAuthToken":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                  "Id":  {
                                                                             "format":  "uuid",
                                                                             "description":  "uniqueidentifier",
                                                                             "type":  "string"
                                                                         },
                                                                  "TimeFrameType":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "int"
                                                                                    },
                                                                  "EntityCreatedAuthToken":  {
                                                                                                 "format":  "uuid",
                                                                                                 "description":  "uniqueidentifier",
                                                                                                 "type":  "string"
                                                                                             },
                                                                  "Value":  {
                                                                                "type":  "integer",
                                                                                "description":  "int"
                                                                            },
                                                                  "EntityUpdatedDateTime":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                  "EntityCreatedDateTime":  {
                                                                                                "format":  "date-time",
                                                                                                "description":  "datetimeoffset",
                                                                                                "type":  "string"
                                                                                            },
                                                                  "Tenant":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             }
                                                              },
                                               "type":  "object"
                                           },
                        "PDB.FetchProgramMetadatas":  {
                                                          "properties":  {
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "Key":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                             "PriceSourceId":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "FK to PDB.PriceSources"
                                                                                               },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "FetchProgramId":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "FK to PDB.FetchPrograms"
                                                                                                },
                                                                             "Value":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        }
                                                                         },
                                                          "type":  "object"
                                                      }
                    },
    "title":  "PDB.FetchProgram",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

26 - Process module

The documentation of the Vertex Process module

26.1 - Process Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Process Execution

Aggregate Root: ProcessExecution

Represents the execution of business processes with associated tasks and user tracking.

erDiagram
    "Process.ProcessExecutions" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Process.ProcessExecutionsFollowedByUsers" {
        uniqueidentifier UserId PK
        uniqueidentifier ProcessExecutionId PK
    }

    "Process.RelatedEntities" {
        uniqueidentifier Id PK
        nvarchar Label 
        uniqueidentifier EntityId 
        uniqueidentifier EntityImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Process.TaskRelatedEntities" {
        uniqueidentifier RelatedEntityId PK
        uniqueidentifier TaskId PK
    }

    "Process.TaskStatus" {
        uniqueidentifier Id PK
        int StatusType 
        nvarchar Reason 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier TaskId FK
        datetimeoffset Since 
        int StatusReasonType 
        bit Concealed 
    }

    "Process.Tasks" {
        uniqueidentifier Id PK
        uniqueidentifier ProcessExecutionId FK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier CreatorUserId 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        datetimeoffset ValidFrom 
        datetimeoffset ValidUntil 
        datetimeoffset DueDate 
        int Priority 
        nvarchar Context 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ChatId 
        uniqueidentifier AssignedUserId 
        uniqueidentifier AssignedByUserId 
        nvarchar InheritanceType 
        uniqueidentifier TaskGroupId 
        bit Concealed 
    }

    "Process.TasksFollowedByUsers" {
        uniqueidentifier TaskId PK
        uniqueidentifier UserId PK
    }

    "Process.TasksPinnedByUsers" {
        uniqueidentifier TaskId PK
        uniqueidentifier UserId PK
    }

    "Process.ProcessExecutionsFollowedByUsers" }o--|| "Process.ProcessExecutions" : "ProcessExecutionId"
    "Process.Tasks" }o--|| "Process.ProcessExecutions" : "ProcessExecutionId"
    "Process.TaskRelatedEntities" }o--|| "Process.RelatedEntities" : "RelatedEntityId"
    "Process.TaskRelatedEntities" }o--|| "Process.Tasks" : "TaskId"
    "Process.TaskStatus" }o--|| "Process.Tasks" : "TaskId"
    "Process.TasksFollowedByUsers" }o--|| "Process.Tasks" : "TaskId"
    "Process.TasksPinnedByUsers" }o--|| "Process.Tasks" : "TaskId"
erDiagram
    "Process.ProcessExecutions" {
        uniqueidentifier Id PK
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Process.ProcessExecutionsFollowedByUsers" {
        uniqueidentifier UserId PK
        uniqueidentifier ProcessExecutionId PK
    }

    "Process.RelatedEntities" {
        uniqueidentifier Id PK
        nvarchar Label 
        uniqueidentifier EntityId 
        uniqueidentifier EntityImplementationId 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "Process.TaskRelatedEntities" {
        uniqueidentifier RelatedEntityId PK
        uniqueidentifier TaskId PK
    }

    "Process.TaskStatus" {
        uniqueidentifier Id PK
        int StatusType 
        nvarchar Reason 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier TaskId FK
        datetimeoffset Since 
        int StatusReasonType 
        bit Concealed 
    }

    "Process.Tasks" {
        uniqueidentifier Id PK
        uniqueidentifier ProcessExecutionId FK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier CreatorUserId 
        nvarchar InternalReference 
        nvarchar ExternalReference 
        datetimeoffset ValidFrom 
        datetimeoffset ValidUntil 
        datetimeoffset DueDate 
        int Priority 
        nvarchar Context 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        uniqueidentifier ChatId 
        uniqueidentifier AssignedUserId 
        uniqueidentifier AssignedByUserId 
        nvarchar InheritanceType 
        uniqueidentifier TaskGroupId 
        bit Concealed 
    }

    "Process.TasksFollowedByUsers" {
        uniqueidentifier TaskId PK
        uniqueidentifier UserId PK
    }

    "Process.TasksPinnedByUsers" {
        uniqueidentifier TaskId PK
        uniqueidentifier UserId PK
    }

    "Process.ProcessExecutionsFollowedByUsers" }o--|| "Process.ProcessExecutions" : "ProcessExecutionId"
    "Process.Tasks" }o--|| "Process.ProcessExecutions" : "ProcessExecutionId"
    "Process.TaskRelatedEntities" }o--|| "Process.RelatedEntities" : "RelatedEntityId"
    "Process.TaskRelatedEntities" }o--|| "Process.Tasks" : "TaskId"
    "Process.TaskStatus" }o--|| "Process.Tasks" : "TaskId"
    "Process.TasksFollowedByUsers" }o--|| "Process.Tasks" : "TaskId"
    "Process.TasksPinnedByUsers" }o--|| "Process.Tasks" : "TaskId"
{
    "definitions":  {
                        "Process.ProcessExecutionsFollowedByUsers":  {
                                                                         "properties":  {
                                                                                            "UserId":  {
                                                                                                           "format":  "uuid",
                                                                                                           "description":  "uniqueidentifier",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                                            "ProcessExecutionId":  {
                                                                                                                       "type":  "string",
                                                                                                                       "description":  "FK to Process.ProcessExecutions"
                                                                                                                   }
                                                                                        },
                                                                         "type":  "object"
                                                                     },
                        "Process.TaskRelatedEntities":  {
                                                            "properties":  {
                                                                               "RelatedEntityId":  {
                                                                                                       "type":  "string",
                                                                                                       "description":  "FK to Process.RelatedEntities"
                                                                                                   },
                                                                               "TaskId":  {
                                                                                              "type":  "string",
                                                                                              "description":  "FK to Process.Tasks"
                                                                                          }
                                                                           },
                                                            "type":  "object"
                                                        },
                        "Process.RelatedEntities":  {
                                                        "properties":  {
                                                                           "Concealed":  {
                                                                                             "type":  "boolean",
                                                                                             "description":  "bit"
                                                                                         },
                                                                           "EntityUpdatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Id":  {
                                                                                      "format":  "uuid",
                                                                                      "description":  "uniqueidentifier",
                                                                                      "type":  "string"
                                                                                  },
                                                                           "Label":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                           "EntityCreatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EntityImplementationId":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "EntityUpdatedDateTime":  {
                                                                                                         "format":  "date-time",
                                                                                                         "description":  "datetimeoffset",
                                                                                                         "type":  "string"
                                                                                                     },
                                                                           "EntityId":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                           "EntityCreatedAuthToken":  {
                                                                                                          "format":  "uuid",
                                                                                                          "description":  "uniqueidentifier",
                                                                                                          "type":  "string"
                                                                                                      },
                                                                           "Tenant":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      }
                                                                       },
                                                        "type":  "object"
                                                    },
                        "Process.TaskStatus":  {
                                                   "properties":  {
                                                                      "Id":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             },
                                                                      "StatusReasonType":  {
                                                                                               "type":  "integer",
                                                                                               "description":  "int"
                                                                                           },
                                                                      "Concealed":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                                      "EntityCreatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "EntityUpdatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "Reason":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                      "StatusType":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                      "Since":  {
                                                                                    "format":  "date-time",
                                                                                    "description":  "datetimeoffset",
                                                                                    "type":  "string"
                                                                                },
                                                                      "Tenant":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                      "TaskId":  {
                                                                                     "type":  "string",
                                                                                     "description":  "FK to Process.Tasks"
                                                                                 },
                                                                      "EntityCreatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "EntityUpdatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 }
                                                                  },
                                                   "type":  "object"
                                               },
                        "Process.Tasks":  {
                                              "properties":  {
                                                                 "Concealed":  {
                                                                                   "type":  "boolean",
                                                                                   "description":  "bit"
                                                                               },
                                                                 "TaskGroupId":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 },
                                                                 "Description":  {
                                                                                     "type":  "string",
                                                                                     "description":  "nvarchar"
                                                                                 },
                                                                 "Priority":  {
                                                                                  "type":  "integer",
                                                                                  "description":  "int"
                                                                              },
                                                                 "Name":  {
                                                                              "type":  "string",
                                                                              "description":  "nvarchar"
                                                                          },
                                                                 "ChatId":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                 "AssignedUserId":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                 "ValidUntil":  {
                                                                                    "format":  "date-time",
                                                                                    "description":  "datetimeoffset",
                                                                                    "type":  "string"
                                                                                },
                                                                 "EntityCreatedAuthToken":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            },
                                                                 "DueDate":  {
                                                                                 "format":  "date-time",
                                                                                 "description":  "datetimeoffset",
                                                                                 "type":  "string"
                                                                             },
                                                                 "CreatorUserId":  {
                                                                                       "format":  "uuid",
                                                                                       "description":  "uniqueidentifier",
                                                                                       "type":  "string"
                                                                                   },
                                                                 "Context":  {
                                                                                 "type":  "string",
                                                                                 "description":  "nvarchar"
                                                                             },
                                                                 "EntityUpdatedDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                 "ProcessExecutionId":  {
                                                                                            "type":  "string",
                                                                                            "description":  "FK to Process.ProcessExecutions"
                                                                                        },
                                                                 "ValidFrom":  {
                                                                                   "format":  "date-time",
                                                                                   "description":  "datetimeoffset",
                                                                                   "type":  "string"
                                                                               },
                                                                 "Tenant":  {
                                                                                "format":  "uuid",
                                                                                "description":  "uniqueidentifier",
                                                                                "type":  "string"
                                                                            },
                                                                 "InternalReference":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                 "ExternalReference":  {
                                                                                           "type":  "string",
                                                                                           "description":  "nvarchar"
                                                                                       },
                                                                 "AssignedByUserId":  {
                                                                                          "format":  "uuid",
                                                                                          "description":  "uniqueidentifier",
                                                                                          "type":  "string"
                                                                                      },
                                                                 "Id":  {
                                                                            "format":  "uuid",
                                                                            "description":  "uniqueidentifier",
                                                                            "type":  "string"
                                                                        },
                                                                 "InheritanceType":  {
                                                                                         "type":  "string",
                                                                                         "description":  "nvarchar"
                                                                                     },
                                                                 "EntityCreatedDateTime":  {
                                                                                               "format":  "date-time",
                                                                                               "description":  "datetimeoffset",
                                                                                               "type":  "string"
                                                                                           },
                                                                 "EntityUpdatedAuthToken":  {
                                                                                                "format":  "uuid",
                                                                                                "description":  "uniqueidentifier",
                                                                                                "type":  "string"
                                                                                            }
                                                             },
                                              "type":  "object"
                                          },
                        "Process.ProcessExecutions":  {
                                                          "properties":  {
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        }
                                                                         },
                                                          "type":  "object"
                                                      },
                        "Process.TasksFollowedByUsers":  {
                                                             "properties":  {
                                                                                "UserId":  {
                                                                                               "format":  "uuid",
                                                                                               "description":  "uniqueidentifier",
                                                                                               "type":  "string"
                                                                                           },
                                                                                "TaskId":  {
                                                                                               "type":  "string",
                                                                                               "description":  "FK to Process.Tasks"
                                                                                           }
                                                                            },
                                                             "type":  "object"
                                                         },
                        "Process.TasksPinnedByUsers":  {
                                                           "properties":  {
                                                                              "UserId":  {
                                                                                             "format":  "uuid",
                                                                                             "description":  "uniqueidentifier",
                                                                                             "type":  "string"
                                                                                         },
                                                                              "TaskId":  {
                                                                                             "type":  "string",
                                                                                             "description":  "FK to Process.Tasks"
                                                                                         }
                                                                          },
                                                           "type":  "object"
                                                       }
                    },
    "title":  "Process.ProcessExecution",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

27 - Rule engine module

The documentation of the Vertex Rule Engine module

The Vertex Rule Engine is used to run the specific BRE script language. The hosted rule engine has a set of plugins that are provided by other modules that enables calling methods that leverage specific features of those modules to extend the BRE script language with the modules that are deployed on an environment.

27.1 - Screens

Overview of screens for the Rule Editor module

27.1.1 - Rule Editor

The rule editor screen is used to develop and test BRE script

The rule editor is an editor that is embedded into the web application of Vertex. The editor can be used to create and debug scripts. There is an interactive debugger availible straight from the webpage, that can be used to step through the details of the script, showing the local variables on every step to see if they contain the values that the user is expecting from them.

Rule editor with annotations

  1. Provides a fast run option, this will run the script to completion and will not return any intermediate results. This is the fastest option if you want to see the result of the script.
  2. This will run the script in the front-end but it will provide intermediate updates. This means the row that is currently running will be highlighted as the script is running and the different channels of the rules context (see 11, 12, 13, 14) will be updated.
  3. This wil halt the script at every new line that the script is executing. This gives the user the opportunity to inspect the different channels of the rules context before advancing to the next script row.
  4. This will halt the script at every new operation that the script is executing. This means that it will halt multiple times a row and will show an intermediate result after every small operation that has been executed in the script run. This is very slow debugging but can be helpful to debug strange behaviour that happens on a single line of script.
  5. This will open a small popup as an input helper to select the custom enum and its value to be used in the script. Because the custom enum is tricky to write by hand, because the script expect the id of the custom enum and the id of the custom enum component, it is less error prone to use the input helper.
  6. Can be used to import a script, that is generated by the system for specific use cases (like a pricing calculation) into the editor.
  7. Can be used to import a specific context into the input channel (see 12) to get a context of a specific entity into the rules context of the editor.
  8. This will clear all channels of the rules context in the editor and will start with a new fresh and empty rules context
  9. This is the actual scripting area where scripts can be written
  10. After the user stops writing the system will validate the script and verify if the syntaxt of the script is correct. If the syntax is correct is will be a green check. If the syntax is wrong it will show a syntax error: Rule editor with syntax error
  11. Output channel: the output channel is split into 2 sections:
  • Explicit output section (marked with 15): all values assigned with the ‘<-’ operator will be found in the explicit output of the rules context.
  • Implicit output section (marked with 16): the result of the final line of script will be returned as the implicit output of the script. This can be usefull in places where a small rule is sufficient to write a small piece of logic, for example inputPricing.totalValue < 100000 as a small rule to determine if a pricing can activate automatically or needs a human validation before the pricing can be activated
  1. Input channel: the input channel will show all inputs that have been loaded by the import context button (marked by 7).
  2. Local channel: the local channel shows all variables that have been assigned using the ‘=’ operator
  3. Sideload channel: all provided sideload variables are shown in the sideload part of the rules context

27.2 - Scripting language

Scripting language of the BRE

Scripting language reference

This page is the language reference for the BRE (business rule engine) scripting language used throughout the Vertex platform. It covers the statement model, the data types, the operators and the control flow constructs, with worked examples for the pitfalls new rule authors run into. Every code example on this page is executable as written and is pinned by a docs_* script case in EE.Library.UnitTests\Rules\ScriptCases, so the documented behavior is the tested behavior.

Working in the script editor

  • On the Vertex home page press the button “script library” to access all the scripts that have currently been made.
  • Then press the button “new script” to create a new script.
  • Select a name and potentially also a description for your script and press on “create and add properties”. A text editor will open where you can edit your script.

A context can be entered into the script by pressing the “import context” button on the top right of the script text editor. This context provides variables that can be accessed from within the script. All the available variables for a certain context can be viewed by importing that context and opening the “input” tab under the text editor. Pressing the green “run” button runs the script and fills the output tab underneath the editor.

Statements

A script is a sequence of statements. Each statement is an expression; an assignment is an expression too. When the script finishes, the value of the last evaluated statement is the result of the script (next to whatever was explicitly assigned to the output, see Variables and assignment).

parameterName1 = 1
parameterName1 + 1

Result: 2. The first line stores a value under the name parameterName1, the second line reads it back and produces the script result.

Statement separators: newline or ;;

Statements are separated by a line break, by the ;; separator, or a mix of both. These two scripts are identical:

price = 10
quantity = 4
price * quantity
price = 10;; quantity = 4;; price * quantity

Result of both: 40. Use ;; when statements must share a line, for example inside a single-line block. A single ; does NOT separate statements - it separates arguments and elements, which is the next topic.

One character apart: ; vs ;; vs : vs ,

Four separators look alike but mean very different things. Getting these wrong is the most common beginner mistake in this language.

Separator Meaning
; Separates method arguments, collection elements and object properties: pow(10; 2), c[1; 2], {A: 1; B: 2}
;; Separates statements on one line: a = 1;; b = 2
: Separates an object property key from its value: {Price: 10}
, A decimal separator inside a number - NEVER an argument separator

The comma deserves special attention. 1,5 is one single number token, so a call like this does not do what it appears to do:

round(1,5)

This is a call to round with ONE argument, not two. The engine reads 1,5 as a single number: in a rule context whose input culture uses the comma as decimal separator that number is 1.5 (so this parses as round(1.5)), and in a point-decimal culture such as en-US the comma is a thousands separator and the number is 15. Either way round then fails at run time, because it requires two arguments (the value and the number of decimals). Arguments are always separated with ;:

round(1.5; 0)

Result: 2.

Both decimal separators are accepted

The grammar accepts both . and , inside a number literal. Which one denotes the decimal fraction is decided by the input culture of the rules context the script runs in: 1.5 is one and a half under en-US but fifteen under nl-NL (where . groups thousands), and vice versa for 1,5. Write number literals with the decimal separator of the context your script runs in, and keep the previous section in mind: a comma never separates arguments.

Data types

Numbers

All numeric values share one number type. Standard arithmetic works as expected, including scientific notation and repeated signs:

0.5+0.5
((1+1)+1)
--1
1e10
10/2
10^2

The lines evaluate to 1, 3, 1, 10000000000, 5 and 100 (the last line is the script result). ^ is the power operator and --1 resolves to 1 because the two unary minus signs cancel out.

Booleans

TRUE and FALSE (in any casing, see Case-insensitivity) form the boolean type. Booleans are typically produced by the relational operators:

1 > 0
10 <= 10
2 != 2

The lines evaluate to true, true and false. Booleans combine with the logical operators:

NOT true
true AND false
true OR false

The lines evaluate to false, false and true. Boolean literals are case-insensitive:

(true == TRUE) AND (False == FALSE)

Result: TRUE.

null

null represents the absence of a value and is case-insensitive as well:

IsNull(null) AND IsNull(NULL) AND IsNull(NuLl)

Result: TRUE. Use IsNull to test for it; numeric() without arguments produces a null number:

IsNull(numeric())
IsNull(36)

The lines evaluate to true and false.

Strings

A string literal is text between single or double quotes:

"This is a string"

To put a quote of the surrounding style inside the literal, escape it with a forward slash: /' produces ' and /" produces ":

single = 'It/'s quoted'
double = "Say /"hi/""
single + ' - ' + double

Result: It's quoted - Say "hi". Strings are concatenated with +. Note that the escape character is the forward slash /, not the backslash used in many other languages.

Date and time

A datetime value represents a specific date and time. Construct one with the DateTime method from a string in dd-MM-yyyy, dd/MM/yyyy or ISO yyyy-MM-ddTHH:mm:ss format:

DateTime('01-01-2017')
DateTime('2009-06-15T13:45:30')

The first line is midnight on 1 January 2017, the second is 15 June 2009 at 13:45:30. How a datetime is displayed depends on the output culture of the rules context.

Collections

A collection is an ordered list of values, written as c[ … ] with ; between the elements. Elements can have mixed types and can be collections themselves:

c[true;false;3;c[1;2];"hi"]

The IN and NOTIN operators test membership:

true IN c[false;true;false;true;1;2;3;'1';'hi1';'hi2']
true NOTIN c[false;true;false;true;1;2;3;'1';'hi1';'hi2']

The lines evaluate to true and false. Elements are retrieved by zero-based index with elementat:

elementat(c[10;100;1000;10000;100000];0)

Result: 10.

Objects

An object stores key-value pairs. An object literal is written between braces, with : between key and value and ; between the properties:

ThisIsAnObject = {FirstKey: c[3;true;"Hi"]}

Properties are read with the dot notation, see Property access:

order = {Price: 10; Quantity: 2}
order.Price * order.Quantity

Result: 20. An empty object is created with object(), and properties can be added or replaced through the dynamic accessor .[key], which also works with computed keys:

ThisIsAnObject = object()
ThisIsAnObject.["FirstKey"] = c[3;true;"Hi"]
ThisIsAnObject.["FirstKey"]

Result: c[3; TRUE; 'Hi'].

Custom enums

A custom enum value identifies one entry of a tenant-defined enumeration. Enum values usually arrive through the input context or decision tables; the CustomEnum(enumComponentId; valueComponentId) method constructs one explicitly from the component ids. Two enum values are equal when they refer to the same enumeration entry:

status = CustomEnum('07A3EA2F-E080-4D7C-8CDD-1150702D407F'; '8CDD4A12-2A38-4F99-A004-8BBCA8FCE65F')
status == CustomEnum('07A3EA2F-E080-4D7C-8CDD-1150702D407F'; '8CDD4A12-2A38-4F99-A004-8BBCA8FCE65F')

Result: TRUE.

Variables and assignment

The language has two assignment operators, and the difference matters:

  • = assigns to a LOCAL variable. Locals only exist while the script runs and are discarded afterwards.
  • <- assigns to the OUTPUT of the script. Everything assigned with <- is returned to the caller of the script.
parameterName1 = 1
parameterName1 + 1

Result: 2, and the output channel stays empty because parameterName1 was only a local.

outputVariable <- 3
outputVariable - 2

Result: 1, and the script output additionally contains outputVariable with value 3. Output variables can be read back in the script just like locals. Variables that come from the imported context (the input) can be read but never assigned.

Variable names consist of letters, digits and underscores, and are case-insensitive: myValue and MYVALUE are the same variable.

Operators

Category Operators
Arithmetic + - * / ^ (power), unicode alternatives × · for * and ÷ for /
Comparison == != > >= < <= (=> and =< are accepted alternative spellings of >= and <=)
Logical AND or &&, OR or `
Membership IN, NOTIN
Assignment = (local), <- (output)

Multiplication and division bind stronger than addition and subtraction, and ^ binds stronger still; use parentheses whenever the intent is not obvious at a glance. Note that a single = between two values is an assignment, never a comparison - equality is always ==.

Property access

Values with named members (objects, context inputs) are accessed with a dot:

inputPricing.totalValue < 100000

The dot and the member name must be written together: a.b is member access, but a . b is a syntax error because a free-standing . is read as a decimal separator.

When the key is not a valid name or is computed at run time, use the dynamic accessor .[expression]:

ThisIsAnObject = object()
ThisIsAnObject.["FirstKey"] = c[3;true;"Hi"]
ThisIsAnObject.["FirstKey"]

The dynamic accessor is also the only member form that can be assigned to.

Lambda arguments

Several collection methods take a small inline function - a lambda - as an argument. A lambda is written as variable $ expression: the variable is bound to each element in turn and the expression is evaluated for it.

any(c['hi';'hello';'dag';'test';'nn']; x $ x == 'test')
any(c['hi';'hello';'dag';'test';'nn']; x $ x != 'test')

Both lines evaluate to true (any asks whether at least one element matches).

all(c['hi';'hello';'dag';'test';'nn']; x $ IsString(x))
all(c['hi';'hello';'dag';'test';'nn']; x $ x == 'thisisnotonthelist')

The lines evaluate to true and false (all asks whether every element matches). Other lambda-taking methods such as select and groupby follow the same x $ expression shape.

Comments

Two comment forms exist, and both are completely invisible to the engine:

  • // comments out the rest of the line.
  • /* … */ comments out everything in between, may span multiple lines, and may even sit in the middle of an expression.
// the base price
price = 10 // a trailing comment
total = /* tax */ price + 5
/* block comments
   can span lines */
total

Result: 15. Comment markers inside a string literal keep their literal meaning: 'http://example.com' is just a string. A /* must always be closed with */, otherwise the script has a syntax error.

Control flow

IF / ELSEIF / ELSE

The conditional is an expression: IF condition THEN result ELSEIF condition THEN result ELSE result. It produces the value of the chosen branch:

(IF 16 > 2*4 THEN 'HALLO' ELSE 'DOEG')

Result: 'HALLO'.

(IF 1==2 THEN 10 ELSEIF 200!=200 THEN 100 ELSEIF 30+5>30 THEN 1000 ELSE 10000)

Result: 1000. Conditions are checked top to bottom and the first true branch wins.

The braceless IF pitfall

IF has no braces and no end marker. A branch is a full statement list, so an unparenthesized IF absorbs the FOLLOWING statement lines into its branch. This script looks like it always assigns 'after the if':

IF 1 > 2 THEN
    x = 'from the branch'
x = 'after the if'
x

It does not. Both assignment lines belong to the THEN branch, the condition is false, so neither runs and the script fails with Could not find 'x' in the context. The indentation suggests a structure the language does not have.

The fix: wrap the conditional in parentheses. The closing ) unambiguously ends the IF, and everything after it is ordinary top-level script again:

y = (IF 1 > 2 THEN 'branch' ELSE 'fallback')
x = 'after the if'
y + ' ' + x

Result: 'fallback after the if'. Rule of thumb: when any statement follows an IF on later lines, parenthesize the IF.

WHILE

WHILE(condition) { body } evaluates the condition BEFORE every iteration and runs the body while it is true. The value of the loop is the value the body produced in its last iteration:

a <- 0
while(a < 5)
{
    a <- a + 1
}

Result: 5.

To protect against endless loops the engine stops a WHILE after 10000 iterations by default and raises the error Maximum number of iterations ('10000') reached. A loop that legitimately needs a different bound passes it as the second argument, separated - as always - with ;:

i = 0
while(i < 3; 10)
{
    i = i + 1
}
i

Result: 3 (the loop ran three times, well within its explicit bound of ten). The bound argument raises or lowers only the safety limit; it never changes how often the condition is checked.

FOREACH

FOREACH(variable IN collection) { body } runs the body once for every element, with the element bound to the variable:

number = 0
foreach(x in c[1;2;3]){
number = x + number
}
number

Result: 6.

SEQUENCE

SEQUENCE { statements } groups a statement list into one expression whose value is the last statement’s value. Use it where a single expression is expected but several steps are needed:

sequence {
    subtotal = 40
    subtotal * 1.21
}

Result: 48.40. Note that the { must be on the same line as the sequence keyword; a line break between them is a syntax error (unlike WHILE and FOREACH, which do allow the brace on the next line).

Case-insensitivity

The language is case-insensitive across the board:

  • Keywords: if/IF, then/THEN, while/WHILE, foreach/FOREACH, sequence/SEQUENCE, and/AND, or/OR, xor/XOR, not/NOT, in/IN, notin/NOTIN - any casing works.
  • The literals TRUE, FALSE and null.
  • Method names.
  • Variable names.
(if TRUE then 'yes' else 'no') == (IF true THEN 'yes' ELSE 'no')

Result: TRUE.

ROUND(2.5; 0) == round(2.5; 0)

Result: TRUE. Pick one casing convention and stick to it for readability - the engine does not care, but your colleagues do.

Built-in methods

The sections below show commonly used built-in methods per data type with examples. Methods are called as name(argument; argument; ...) and their names are case-insensitive.

Number methods

SyntaxExplanationScriptOutput
Log(N)Returns the logarithm base 10 of the number N
log(10)
2.30258509299405
exp(N)Returns the number N to the power of e - Euler's constant
exp(1 / 365)
1.00274348250654
sqrt(N)Returns the square root of the specified number N
sqrt(2^10)
32
pow(N1;N2)Returns N1 to the power of N2
pow(10;2)
100
mod(N1;N2)Returns N1 modN2, i.e. the remainder of N1/N2
mod(3;3)
0
remainder(N1;N2)Returns N1 modN2, i.e. the remainder of N1/N2
remainder(5;3)
2

Boolean methods

SyntaxExplanationScriptOutput
ToBoolean(N)Returns true when N is larger than 0 and false when N is 0 or smaller.
ToBoolean(1)
true
IsNull(A)Returns true if A is of type null
IsNull(numeric())
IsNull(36)
true
false

Collection methods

SyntaxExplanationExample ScriptExample Output
sum(C)Sums all the elements in the collection
sum(c[1;2;3;4;5])
15
max(C)Returns the maximum element in the collection
max(c[1;2;3;4;5])
5
min(C)Returns the minimal element in the collection
min(c[1;2;3;4;5])
1
count(C)Counts the number of elements in the collection
count(c[1;2;3;4;5])
5
avg(C)Calculates the average of all the elements in the collection
avg(c[1;2;3;4;5])
3
average(C)Calculates the average of all the elements in the collection
average(c[1;2;3;4;5])
3
wavg(C1;C2)Outputs the average of C1 where the elements are weighted by C2
wavg(c[10;25;15;40;10];c[10;100;1000;10000;100000])
14176
elementat(C; N)Outputs the element at index N in collection C
elementat(c[10;100;1000;10000;100000];0)
10
take(C; N)Returns the first N elements of the collection C into a new collection
take(c['hi';'hello';'dag';'test';'nn']; 2)
c['hi';'hello']
skip(C; N)Returns a collection of the elements of C after the Nth index
skip(c['hi';'hello';'dag';'test';'nn']; 3)
c['test';'nn']
additem(C; A)Returns a collection which is the original collection C appended by the new element A to its end
additem(c['hi';'hello';'dag';'test';'nn']; 3)
c['hi';'hello';'dag';'test';'nn'; 3]
any(C; x $ A(x))x Loops over all elements in C, returns true if any of the variables satisfy the condition A, which includes x
any(c['hi';'hello';'dag';'test';'nn']; x $ x == 'test')
any(c['hi';'hello';'dag';'test';'nn']; x $ x != 'test')
true
true
all(C; x $ A(x))x loops over all elements in C, returns true if all elements of C satisfy the condition A, which includes x
all(c['hi';'hello';'dag';'test';'nn']; x $ IsString(x))
all(c['hi';'hello';'dag';'test';'nn']; x $ x == 'thisisnotonthelist')
true
false

Datetime methods

SyntaxExplanationExample ScriptExample Output
DateTime(S)

Generates a datetime object. The specific date and time are specified by the string S. S can have multiple formats:

  • dd-MM-yyyy
  • dd/MM/yyyy
  • yyyy-MM-ddTHH:mm:ss
DateTime('01-01-2017')
DateTime('2009-06-15T13:45:30')
01-01-2017 00:00:00
15-06-2009 13:45:30

Time series methods

The BRE can be used for the retrieval and manipulation of time series from Vertex.

SyntaxExplanationExample ScriptExample Output
tsselector(A; B; C; D; E)

Selector which refers to a specific time series in Vertex by its time series code (A), data slot reference (B), revision (C), ..., ... . Note that the last three arguments are optional.

tsselector('ME20191101009'; 'SalesPortfolio_ME20191101009:P_PFC_VOL_ZERO')

getts(A; B; C)
getts()

Other methods

SyntaxExplanationExample ScriptExample Output
format(A; B)Formats input A as specified by the string B. Note that for some cases, the formatting is also influenced by the context, such as a geolocation.
Format(DateTime('02/01/2015');'dd-MM-yyyy')



02-01-2015

exists(A)Returns true if A is some object that has been defined within the code or has been predefined as a context or global variable or object.
exists(ThisVariableWasNotDefined)
exists(0)
exists(null)
false
true
true

27.3 - Technical details

Technical details of the BRE engine and scripting language

TODO:

  • Cursor
  • Reference date time

The business rule engine (BRE) is a component that brings decision making to the user while still having most of the process orchestrated by Vertex.

Technical details

There are a few technical details that can help in understanding how the BRE works:

Data context members (DSC)

The Rule Context can house many different kind of Data Context Members (DCM). These DCMs contain a type for strongly typed values, the value itself and a reference to how the value was created using a DataSourceDescription (DSD). The types of data context members supported are:

  • BooleanDataContextMember
  • CollectionDataContextMember
  • ConsequenceDataContextMember
  • CursorDataContextMember
  • CustomEnumDataContextMember
  • DateTimeDataContextMember
  • ErrorDataContextMember
  • NumericDataContextMember
  • ManualDataContextMember
  • ObjectDataContextMember
  • StringDataContextMember
  • VoidDataContextMember
  • PeriodDataContextMember
  • TimeSeriesSelectorDataContextMember
  • TimeSeriesVectorDataContextMember

Data Source Description (DSD)

The data source description are used to track where a result is created from. If a result is provided by a input context that value will have a trace back to the entity that contains that value. If the value was read from a decision table the data source description will have a reference to the decision table version id. And if the value was created by calculating multiple values together it will be marked as a calculated value and the inputs of that calculation will be added as parents to that new DSD of type calculated. This way we can trace the origin of any value back to its source.

Lexer, Parser and finally an operation tree

The BRE scripting language is created as a grammar that processed into a operation tree. This operation tree is a stateless set of operations that can mutate the state of an Rules Context provided to the operation tree. Because the tree is stateless it is possible to keep the entire operation tree in memory and use it do high performance calculations on the operation tree without the need to interpret the BRE scripts again.

Operations breakdown

  1. Operation that creates a constant ouput of the decimal ‘23’
  2. Operation that creates a constant output of the decimal ‘2’
  3. A native operand to divide the output of operation 1. by the ouput of operation 2.
  4. Operation that creates a constant output of the decimal ‘2’
  5. A call to the method operation for the method ‘Round’, with as first parameter the output of operation 3. and as second parameter the output of operation 4.
  6. A native operand that assigns the operation after the ‘=’ sign to the locals dictionary of the Rules Context locals, with the ‘sumVariable’ string as the key and the output of operation 5. as the value

The operations are stateless and they will either provide a intermediate result that is consumed as input for other operations or they can interact with the Rules Context to alter the state of one or more of the channels.

Operation round-trip fidelity rule

An operation tree can be rendered back to a script (Operation.ToString with FormattingTypes.Script, exposed as RulesEvaluator.ReformatScript). This round-trip MUST preserve the meaning of the script exactly:

  • The regenerated script must parse cleanly and evaluate to the same result as the original.
  • Every construct, argument and operator must survive the round-trip. A dropped argument (for example a WHILE iteration bound) is a defect, not a formatting difference.
  • Only whitespace and redundant parentheses may differ between the original and the regenerated script.
  • Comments are lexer trivia and are not part of the operation tree, so the operation round-trip does not carry them. Any user-facing feature that regenerates a script a user wrote must therefore work from the token stream (which contains the comments) instead of the operation tree.

The rule is enforced per script case in EE.Library.UnitTests\Rules\ScriptCases: every case records what the round-trip currently produces, the regenerated form must stay parseable, and for cases with a recorded result the regenerated form must evaluate to that same result. Known violations are tracked as an explicit, shrinking list next to those tests and are defects to fix, not accepted behavior.

Rules Context

The Rules Context will act as the state store for a specific run of the BRE. The Operations Tree that performs the calculation is stateless itself, all it does is change the state of the Rules Context object. The object is devided into 5 channels, each channel consists of a dictionary that can be interacted with the help of the operations.

The local channel

This channel is used for intermediate results that help with scripting over multiple lines. With a simple assign in script parameterName1 = 1 the decimal data context member with a value of ‘1’ can be entered into the local channel under the key ‘parameterName1’. When the script later want to use the ‘parameterName1’ variable it can simple do so by referencing its variable name. parameterName1 + 1 will retrieve the value of ‘parameterName1’ from the local channel and make the value availble to the addition operand so it can add 1 to the stored value. The data that is stored in the locals is only relevant during the run of the BRE script and will not be communicated to the caller of the script, its data will be deleted after the Rules Context is no longer needed.

The output channel

The output channel is comparable to the local channel, except that this channel is used as the explicit output of the script and returned to the caller that started the BRE calculation. To assign data to the output channel the <- assign command is used instead of the = that we use for the locals. This means that outputVariable <- 3 will assign the decimal data context member to the output channel under the provided ‘outputVariable’ name. This means that the output of the script will also contain the ‘outputVariable’, with its value 3. Values of the output channel can also be used in script to read back from the output channel, so we can do outputVariable - 2 to calculate a value of 1.

The input channel

The intput channel is provided at the beginning of the script and is provided as a initial value inside de Rules Context. These values can be read from, but they cannot be altered as there is no way to write into the input channel. The input in the input channel is normally provided by the caller of the BRE script run and is tuned to the context in which the BRE script is running. Examples of a input context could be a Pricing Request, a Pricing, a deal or an order.

The sideload channel

The sideload channel is a special channel that can override specific assignments to the output channel. The values that are availible in the sideload channel will replace the output of a output assign value to the value of provided by the sideload channel at the moment it is assigning it to the output channel. This is used to feed manually provided values back into the script and to alter intermediate variable as well. This means that is we prepare the sideload channel with a value of ’thisValueMightBeOverwritten’ with a value of 5, the followin script thisValueMightBeOverwritten <- 3 will be intercepted by the sideload channel. This means that the result stored in the output channel will be the sideloaded value of 5, and this also means that if we use the ’thisValueMightBeOverwritten’ in a later part of the script it will also be returned as a 5. Ultimately rendering the following script thisValueMightBeOverwritten + 1 to return 6, instead of the 4 that we would have expected would there be no sideload value for ’thisValueMightBeOverwritten’.

The back channel

This channel is used by methods to exchange metadata with each other. Rather then having the user do all the heaving lifting by having to add a lot of metadata to the outputs the back channel can be used to add implicit metadata from one method to the other. The back channel is divided in a number of sections. The currently active section can be changed by calling a ‘ChangeSection’ operation, but this method is normally not called by a user in a normal script. This operation is injected by the system when we create a large operation tree from a mix of scripts and system configuration. By changing selections in our generated code we can easily provide metadata to that section. This makes it easy to collect data like decision tables that are used and the current pricing product element that is being calcualated. This enables us to have all the delecate moving pieces out of sight of the user and have the user just focus on the business decisions that need to be implemented. Besides the flow of metadata the back channel also enables the logging method that can collect all logs without the user having to explicitly collect the logs for the BRE run.

Diagnostics tips

There are a few tips that can help when debugging a script issue:

  • Use the script provider for decision trees to view the generated script to resolve a decision table
  • Use the ToOperationTree method to get a annotated string that shows the operations that are defined by a single linke of script provided to the method

Method Provider plugins

TODO

27.4 -

27.5 - RuleEngine Domain

This page presents the ERD for each AggregateRoot, grouping related entities into domain boundaries. Each AggregateRoot enforces business rules, processes commands synchronously, and defines consistency borders within a single transactional scope. An indicative json schema is created to how the export of a aggregate root will approximitly look like

Script

Aggregate Root: Script

Represents business rule scripts with their versions for automated decision making and processing.

erDiagram
    "RuleEngine.ScriptVersions" {
        uniqueidentifier Id PK
        uniqueidentifier ScriptId FK
        bit Draft 
        nvarchar VersionString 
        nvarchar Comment 
        nvarchar ScriptValue 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "RuleEngine.Scripts" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int ScriptType 
        bit Concealed 
    }

    "RuleEngine.ScriptVersions" }o--|| "RuleEngine.Scripts" : "ScriptId"
erDiagram
    "RuleEngine.ScriptVersions" {
        uniqueidentifier Id PK
        uniqueidentifier ScriptId FK
        bit Draft 
        nvarchar VersionString 
        nvarchar Comment 
        nvarchar ScriptValue 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        bit Concealed 
    }

    "RuleEngine.Scripts" {
        uniqueidentifier Id PK
        nvarchar Name 
        nvarchar Description 
        uniqueidentifier Tenant 
        datetimeoffset EntityCreatedDateTime 
        datetimeoffset EntityUpdatedDateTime 
        uniqueidentifier EntityCreatedAuthToken 
        uniqueidentifier EntityUpdatedAuthToken 
        int ScriptType 
        bit Concealed 
    }

    "RuleEngine.ScriptVersions" }o--|| "RuleEngine.Scripts" : "ScriptId"
{
    "definitions":  {
                        "RuleEngine.Scripts":  {
                                                   "properties":  {
                                                                      "Concealed":  {
                                                                                        "type":  "boolean",
                                                                                        "description":  "bit"
                                                                                    },
                                                                      "EntityUpdatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Id":  {
                                                                                 "format":  "uuid",
                                                                                 "description":  "uniqueidentifier",
                                                                                 "type":  "string"
                                                                             },
                                                                      "ScriptType":  {
                                                                                         "type":  "integer",
                                                                                         "description":  "int"
                                                                                     },
                                                                      "Description":  {
                                                                                          "type":  "string",
                                                                                          "description":  "nvarchar"
                                                                                      },
                                                                      "EntityCreatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "Name":  {
                                                                                   "type":  "string",
                                                                                   "description":  "nvarchar"
                                                                               },
                                                                      "EntityUpdatedDateTime":  {
                                                                                                    "format":  "date-time",
                                                                                                    "description":  "datetimeoffset",
                                                                                                    "type":  "string"
                                                                                                },
                                                                      "EntityCreatedAuthToken":  {
                                                                                                     "format":  "uuid",
                                                                                                     "description":  "uniqueidentifier",
                                                                                                     "type":  "string"
                                                                                                 },
                                                                      "Tenant":  {
                                                                                     "format":  "uuid",
                                                                                     "description":  "uniqueidentifier",
                                                                                     "type":  "string"
                                                                                 }
                                                                  },
                                                   "type":  "object"
                                               },
                        "RuleEngine.ScriptVersions":  {
                                                          "properties":  {
                                                                             "ScriptId":  {
                                                                                              "type":  "string",
                                                                                              "description":  "FK to RuleEngine.Scripts"
                                                                                          },
                                                                             "VersionString":  {
                                                                                                   "type":  "string",
                                                                                                   "description":  "nvarchar"
                                                                                               },
                                                                             "EntityUpdatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "Concealed":  {
                                                                                               "type":  "boolean",
                                                                                               "description":  "bit"
                                                                                           },
                                                                             "EntityCreatedAuthToken":  {
                                                                                                            "format":  "uuid",
                                                                                                            "description":  "uniqueidentifier",
                                                                                                            "type":  "string"
                                                                                                        },
                                                                             "EntityUpdatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "ScriptValue":  {
                                                                                                 "type":  "string",
                                                                                                 "description":  "nvarchar"
                                                                                             },
                                                                             "Comment":  {
                                                                                             "type":  "string",
                                                                                             "description":  "nvarchar"
                                                                                         },
                                                                             "Tenant":  {
                                                                                            "format":  "uuid",
                                                                                            "description":  "uniqueidentifier",
                                                                                            "type":  "string"
                                                                                        },
                                                                             "Id":  {
                                                                                        "format":  "uuid",
                                                                                        "description":  "uniqueidentifier",
                                                                                        "type":  "string"
                                                                                    },
                                                                             "EntityCreatedDateTime":  {
                                                                                                           "format":  "date-time",
                                                                                                           "description":  "datetimeoffset",
                                                                                                           "type":  "string"
                                                                                                       },
                                                                             "Draft":  {
                                                                                           "type":  "boolean",
                                                                                           "description":  "bit"
                                                                                       }
                                                                         },
                                                          "type":  "object"
                                                      }
                    },
    "title":  "RuleEngine.Script",
    "$comment":  "Generated from Mermaid ERD with property-level descriptions",
    "$schema":  "http://json-schema.org/draft-07/schema#",
    "type":  "object"
}

28 - Spectral module

The documentation of the Vertex Spectral module

29 - Tennet interface module

The documentation of the Vertex Tennet interface module

30 - TRMTracker interface module

The documentation of the Vertex TRMTracker interface module

31 - Workflow engine module

The documentation of the Workflow Engine module

The Vertex Workflow Engine is used to handle temporal workflows.

32 - Migration Controller module

Event store V1 to V2 migration in Vertex

The Migration Controller runs event store V1 to V2 migration through distributed background workers. It provides operations to start migration, retry faulty aggregates, and inspect migration status.

Migration requires both SystemTextJsonSerializerEnabled and WriteToEventStoreV2Enabled to be enabled. The controller rejects a new migration request while another migration run holds the migration lock.

The runtime project is EE.Modules.Infrastructure.MigrationController. Its deployment and documentation component name is vertex-infra-migrationcontroller.