Skill-Match / skill-match-api

An API to feed JSON data of Parks and Recreation data in the Las Vegas area.
https://skill-match.herokuapp.com/api/matches
0 stars 0 forks source link

Match Booleans #2

Open jeffnb opened 8 years ago

jeffnb commented 8 years ago

The match model has 5 boolean fields on it. This is generally a red flag. Why are there so many booleans instead of using a choice field with values like: Open, Completed, Confirmed etc. A flow like that is more widely accepted since you can add more steps into the flow without adding an entirely new field to the table.

peteralfredoflynn commented 8 years ago

I thought this looked bad especially when I was thinking about adding another boolean, ha. Flow of choices sounds good, although it will tie up the front end at first. I'll wait for the right moment. I can do something like match_status = OPEN --> JOINED --> CONFIRMED --> COMPLETED. Then I can add one boolean for is_successful.

Question: What is the best way to differentiate a regular Match from a Challenge match. They aren't that different which is why I was using is_challenge as a Boolean.