LinguistAI / user

1 stars 0 forks source link

feat(LINGUIST-348): Basic store functions implemented #50

Closed KardelenCeren closed 5 months ago

KardelenCeren commented 5 months ago

This PR implements basic store functionality, such as adding new items, "purchasing" them, and consuming them. The logic for each item's functionality is outside the scope of LINGUIST-348.

New store items' fields can be defined in the StoreConsts and manually added to the StoreLoader for the app to load the items on boot.

If an existing store item's fields are changed (provided the type name is not changed, as it is a unique field) then the store item is updated. This way, we can enable/disable an existing item by changing the related constant in StoreConsts. I thought about creating an endpoint for this, but since we do not have an admin user class, any logged-in user would have been able to enable an item.