docs: improve links to other modules docs (#11868)

This commit is contained in:
Shahed Nasser
2025-03-17 12:17:39 +02:00
committed by GitHub
parent cae47d9e49
commit 857a26ff17
17 changed files with 11484 additions and 10346 deletions
@@ -1,4 +1,4 @@
import { CodeTabs, CodeTab } from "docs-ui"
import { CodeTabs, CodeTab, Table } from "docs-ui"
export const metadata = {
title: `Links between Currency Module and Other Modules`,
@@ -18,15 +18,47 @@ Read-only links are used to query data across modules, but the relations aren't
</Note>
- [`Currency` data model of Store Module \<\> `Currency` data model of Currency Module](#store-module). (Read-only).
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>
First Data Model
</Table.HeaderCell>
<Table.HeaderCell>
Second Data Model
</Table.HeaderCell>
<Table.HeaderCell>
Type
</Table.HeaderCell>
<Table.HeaderCell>
Description
</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>
[Store](/references/store/models/Store) in [Store Module](../../store/page.mdx)
</Table.Cell>
<Table.Cell>
[Currency](/references/currency/models/Currency)
</Table.Cell>
<Table.Cell>
Read-only
</Table.Cell>
<Table.Cell>
[Learn more](#store-module)
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
---
## Store Module
The Store Module has a `Currency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol.
Instead, Medusa defines a read-only link between the Currency Module's `Currency` data model and the [Store Module](../../store/page.mdx)'s `Currency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the `Currency` data model in the Store Module.
Instead, Medusa defines a read-only link between the [Store Module](../../store/page.mdx)'s `Currency` data model and the Currency Module's `Currency` data model. Because the link is read-only from the `Store`'s side, you can only retrieve the details of a store's supported currencies, and not the other way around.
### Retrieve with Query