From d73591aafd6ec6889c24e73b6c8b6581151ec157 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Thu, 11 Sep 2025 13:31:03 +0300 Subject: [PATCH] docs: fix relations missing from data model reference diagrams (#13474) --- www/apps/resources/references/modules/cart_models/page.mdx | 1 + .../resources/references/modules/fulfillment_models/page.mdx | 4 +++- .../src/mermaid-diagram-dml-generator.ts | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/www/apps/resources/references/modules/cart_models/page.mdx b/www/apps/resources/references/modules/cart_models/page.mdx index 3656d3d400..64dc21f233 100644 --- a/www/apps/resources/references/modules/cart_models/page.mdx +++ b/www/apps/resources/references/modules/cart_models/page.mdx @@ -13,6 +13,7 @@ This documentation provides a reference to the data models in the Cart Module ```mermaid erDiagram + Cart ||--|| Address : shipping_address Cart ||--|| LineItem : items Cart ||--|| CreditLine : credit_lines Cart ||--|| ShippingMethod : shipping_methods diff --git a/www/apps/resources/references/modules/fulfillment_models/page.mdx b/www/apps/resources/references/modules/fulfillment_models/page.mdx index a819571415..2109e006cf 100644 --- a/www/apps/resources/references/modules/fulfillment_models/page.mdx +++ b/www/apps/resources/references/modules/fulfillment_models/page.mdx @@ -15,12 +15,14 @@ This documentation provides a reference to the data models in the Fulfillment Mo erDiagram Fulfillment ||--|| FulfillmentItem : items Fulfillment ||--|| FulfillmentLabel : labels + Fulfillment ||--|| FulfillmentProvider : provider + Fulfillment ||--|| FulfillmentAddress : delivery_address FulfillmentSet ||--|| ServiceZone : service_zones ServiceZone ||--|| GeoZone : geo_zones ServiceZone ||--|| ShippingOption : shipping_options + ShippingOption ||--|| ShippingOptionType : type ShippingOption ||--|| ShippingOptionRule : rules ShippingOption ||--|| Fulfillment : fulfillments - ShippingOptionType ||--|| ShippingOption : shipping_option ShippingProfile ||--|| ShippingOption : shipping_options ``` diff --git a/www/utils/packages/typedoc-plugin-custom/src/mermaid-diagram-dml-generator.ts b/www/utils/packages/typedoc-plugin-custom/src/mermaid-diagram-dml-generator.ts index 6e706bbfdf..f00fc63bf8 100644 --- a/www/utils/packages/typedoc-plugin-custom/src/mermaid-diagram-dml-generator.ts +++ b/www/utils/packages/typedoc-plugin-custom/src/mermaid-diagram-dml-generator.ts @@ -200,6 +200,7 @@ export class MermaidDiagramDMLGenerator { getMermaidRelation(relation: string): MermaidRelationType | undefined { switch (relation) { case "HasOne": + case "HasOneWithForeignKey": return "one-to-one" case "HasMany": return "one-to-many"