tanlaan / thrifty-shopper

Self hosted groceries price tracker
0 stars 0 forks source link

Simplify Product Model #2

Closed tanlaan closed 2 years ago

tanlaan commented 2 years ago

OBJECTIVE

Remove Cruft

There is plenty of duplication within the product model. Instead of separate locations for the weight and volume, just make it magnitude. Same with units, we can combine them into one unit. We don't need alias, Name and Description do the job well enough. Category should be a many to one, you should be able to have multiple categories for a particular product.

e.g. Diet Coca Cola is both a 'Beverage' as well as 'Diet' or 'No Sugar'. This could get unwieldy so it must be done with care.

Accept Other Types

Currently by count/each doesn't fit into the product data model. But by separating into magnitude and unit you could store "3 count" easily.

Tasks

tanlaan commented 2 years ago

Fixed in this commit