docs: revise admin customization pages (#10466)

* docs: revise admin customization pages

* fix prerequisites link

* apply lint
This commit is contained in:
Shahed Nasser
2024-12-06 16:34:02 +02:00
committed by GitHub
parent 0a077d48e1
commit 21b0e0c26b
9 changed files with 549 additions and 175 deletions
@@ -29,12 +29,12 @@ export const checks1Highlights = [
```ts highlights={checks1Highlights}
import { model } from "@medusajs/framework/utils"
const CustomProduct = model.define('custom_product', {
const CustomProduct = model.define("custom_product", {
// ...
price: model.bigNumber(),
})
.checks([
(columns) => `${columns.price} >= 0`
(columns) => `${columns.price} >= 0`,
])
```
@@ -53,15 +53,15 @@ export const checks2Highlights = [
```ts highlights={checks2Highlights}
import { model } from "@medusajs/framework/utils"
const CustomProduct = model.define('custom_product', {
const CustomProduct = model.define("custom_product", {
// ...
price: model.bigNumber(),
})
.checks([
{
name: 'custom_product_price_check',
expression: (columns) => `${columns.price} >= 0`
}
name: "custom_product_price_check",
expression: (columns) => `${columns.price} >= 0`,
},
])
```
@@ -152,7 +152,7 @@ const Order = model.define("order", {
mappedBy: "orders",
pivotTable: "order_product",
joinColumn: "order_id",
inverseJoinColumn: "product_id"
inverseJoinColumn: "product_id",
}),
})