docs: revise admin customization pages (#10466)
* docs: revise admin customization pages * fix prerequisites link * apply lint
This commit is contained in:
@@ -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",
|
||||
}),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user