I have Shop entity
I need 7 checkboxes to set working days for this shop on frontend
I’m looking for best solution to store values in db.
The easiest method is to keep 7 boolean fields like “monday?” “tuesday?” … in db
Can you help me? thanks
PS: it should be searchable (ex. i want all shops working today)
Rails 3, Postgresql 8.4
How are you going to use this data? If you need to find by working day(s) of week then do boolean columns as you say. If you don’t, store as a string representation such as ‘tttttff’ (open monday to friday).