docs: added dividers + see also section (#2899)
This commit is contained in:
@@ -69,6 +69,8 @@ Be careful with your file names as it can cause unclear errors in Typeorm. Make
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Access a Custom Entity
|
||||
|
||||
:::note
|
||||
@@ -125,8 +127,10 @@ To delete soft-deletable entities that extend the `SoftDeletableEntity` class, y
|
||||
await postRepository.softDelete(post.id);
|
||||
```
|
||||
|
||||
## What’s Next
|
||||
---
|
||||
|
||||
- Check out Medusa's entities in the [Entities' reference](../../../references/entities/classes/Address.md).
|
||||
- Learn about [migrations](../migrations/overview.md).
|
||||
- Learn more about [Services](../services/create-service.md) and how to use them.
|
||||
## See Also
|
||||
|
||||
- [Entities' reference](../../../references/entities/classes/Address.md)
|
||||
- [Migrations Overview](../migrations/overview.md)
|
||||
- [Create a Services](../services/create-service.md)
|
||||
|
||||
@@ -10,13 +10,17 @@ Aside from Medusa’s core entities, you can also create your own entities to us
|
||||
|
||||
Entities are TypeScript files and they are based on [Typeorm’s Entities](https://typeorm.io/entities) and use Typeorm decorators.
|
||||
|
||||
---
|
||||
|
||||
## Base Entities
|
||||
|
||||
All entities must extend either the `BaseEntity` or `SoftDeletableEntity` classes. The `BaseEntity` class holds common columns including the `id`, `created_at`, and `updated_at` columns.
|
||||
|
||||
The `SoftDeletableEntity` class extends the `BaseEntity` class and adds another column `deleted_at`. If an entity can be soft deleted, meaning that a row in it can appear to the user as deleted but still be available in the database, it should extend `SoftDeletableEntity`.
|
||||
|
||||
## What's Next
|
||||
---
|
||||
|
||||
- Learn [how to create an entity](./index.md).
|
||||
- Check out Medusa's entities in the [Entities' reference](../../../references/entities/classes/Address.md).
|
||||
## See Also
|
||||
|
||||
- [Create an entity](./index.md)
|
||||
- [Entities' reference](../../../references/entities/classes/Address.md)
|
||||
Reference in New Issue
Block a user