vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
Other
5.8k stars 1.03k forks source link

Add Custom Fields to Multiple Entities #3044

Closed seanbailis closed 11 hours ago

seanbailis commented 2 months ago

Is your feature request related to a problem? Please describe. Unable to directly track incoming / ordered stock directly on a stock level. Unable to store some specific details we want to track on other entities.

Describe the solution you'd like Please allow for custom fields on the following entities: • Payment • Refund • Session • ShippingLine • StockLevel • StockMovement

Describe alternatives you've considered Making a custom entities - not ideal.

Additional context Currently unavailable, console output: "Could not find embedded CustomFields property on entity 'StockLevel'". Same with the other entities.

mschipperheyn commented 1 month ago

We would like to see CustomFields on the HistoryEntry entity. While it already allows you to add a JSON data structure, we wanted to use this entity for a Note/TODO like approach. It would nicely integrate with the CustomerHistory or OrderHistory. For such a scenario, you want to do queries that filter by customFields such as done, which makes much more sense at a column level then having to go into JSONs.