eike-welk / clair

Collect prices on E-Commerce sites, and display them in graphical form.
GNU General Public License v3.0
0 stars 0 forks source link

Enums: store in JSON and database, implement matching Descriptor. #51

Open eike-welk opened 7 years ago

eike-welk commented 7 years ago

Problem

There are currently several collections of magic strings, that are used like Enums.

For example listing.type, listing.state, listing.site, listing.condition, also listing.curreny can be seen as an enum.

Arbitrary values can be put into their fields, use of enums would catch errors and API-changes.

Therefore

Use real enums instead of these magic strings.