Procházet zdrojové kódy

docs(core): Add notes about custom fields on custom entities (#3516)

Daniel Biegler před 8 měsíci
rodič
revize
e71b0c2a1e

+ 4 - 0
docs/docs/guides/developer-guide/custom-fields/index.md

@@ -17,6 +17,10 @@ Some use-cases for custom fields include:
 * Storing an external identifier (e.g. from a payment provider) on the `Customer` entity.
 * Adding a longitude and latitude to the `StockLocation` for use in selecting the closest location to a customer.
 
+:::note
+Custom fields are not solely restricted to Vendure's native entities though, it's also possible to add support for custom fields to your own custom entities. See: [Supporting custom fields](/guides/developer-guide/database-entity/#supporting-custom-fields) 
+:::
+
 ## Defining custom fields
 
 Custom fields are specified in the VendureConfig:

+ 4 - 0
docs/docs/guides/developer-guide/plugins/index.mdx

@@ -308,6 +308,10 @@ We can then import this types file in our plugin's main file:
 import './types';
 ```
 
+:::note
+Custom fields are not solely restricted to Vendure's native entities though, it's also possible to add support for custom fields to your own custom entities. This way other plugins would be able to extend our example `WishlistItem`. See: [Supporting custom fields](/guides/developer-guide/database-entity/#supporting-custom-fields) 
+:::
+
 ### Step 4: Create a service
 
 A "service" is a class which houses the bulk of the business logic of any plugin. A plugin can define multiple services if needed, but each service should be responsible for a single unit of functionality, such as dealing with a particular entity, or performing a particular task.