docs: general fixes and improvements (#7918)

* docs improvements and changes

* updated module definition

* modules + dml changes

* fix build

* fix vale error

* fix lint errors

* fixes to stripe docs

* fix condition

* fix condition

* fix module defintion

* fix checkout

* disable UI action

* change oas preview action

* flatten provider module options

* fix lint errors

* add module link docs

* pr comments fixes

* fix vale error

* change node engine version

* links -> linkable

* add note about database name

* small fixes

* link fixes

* fix response code in api reference

* added migrations step
This commit is contained in:
Shahed Nasser
2024-07-04 17:26:03 +03:00
committed by GitHub
parent 32982e708a
commit 964927b597
149 changed files with 1676 additions and 3008 deletions
@@ -4,11 +4,11 @@ export const metadata = {
# {metadata.title}
In this chapter, youll learn how to configure data model properties, such as setting their default value.
In this chapter, youll learn how to configure data model properties.
## Propertys Default Value
Use the `default` method of the `model` utility to specify the default value of a property.
Use the `default` method on a property's definition to specify the default value of a property.
For example:
@@ -62,7 +62,7 @@ export default MyCustom
## Unique Property
The `unique` method indicates that a propertys value must be unique in the database.
The `unique` method indicates that a propertys value must be unique in the database through a unique index.
For example:
@@ -8,7 +8,7 @@ In this chapter, youll learn how to define indices on a data model.
## Define Index on Property
Define an index on a property using the `model` utility's `index` method.
Use the `index` method on a property's definition to define an index.
For example:
@@ -38,12 +38,12 @@ In this example, you define an index on the `name` property.
## Define Index on Data Model
A data model has an `indexes` method that defines indices on the data model.
A data model has an `indexes` method that defines indices on its properties.
The index can be on multiple columns (composite index). For example:
export const dataModelIndexHighlights = [
["7", "indexes", "Define indices on the data model."],
["7", "indexes", "Define indices on the data model's properties."],
["9", "on", "Specify the properties to define the index on."]
]
@@ -0,0 +1,13 @@
export const metadata = {
title: `${pageNumber} Data Models`,
}
# {metadata.title}
In the next chapters, you'll learn more about creating data models, including property types, relationships, and more.
<Note type="soon" title="Important">
Data models are in active development and may change.
</Note>
@@ -25,8 +25,6 @@ const MyCustom = model.define("my_custom", {
export default MyCustom
```
By default, this property is considered to be the data models primary key.
---
## text
@@ -180,7 +178,7 @@ export default MyCustom
## array
The `array` method defines an array or strings property.
The `array` method defines an array of strings property.
For example:
@@ -6,6 +6,12 @@ export const metadata = {
In this chapter, youll learn how to define relationships between data models in your module.
<Note type="soon" title="Important">
Data model relationships are in active development and may change.
</Note>
## What is a Relationship Property?
A relationship property is defined using relation methods, such as `hasOne` or `belongsTo`. It represents a relationship between two data models in a module.
@@ -16,7 +16,7 @@ When the `q` filter is passed, the query is applied on searchable properties in
## Define a Searchable Property
The `searchable` method of the `model` utility indicates that a `text` property is searchable.
Use the `searchable` method on a `text` property to indicate that it's searchable.
For example: