There are a few options in the webpage layout
- Latest news
- Recommend news
- Followed news
- History news
- Most Viewed news
The user can select the order of the layout e.g. they can order the most viewed news to the top of the order.
So I am considering how to store the choice in table that can be convenient for development.
The number of choices are fixed, only these 5 choices The user will frequently update the order
I was thinking of:
create a user_choice
table
user_id
latest (nullable , integer)
recommend (nullable , integer)
follow (nullable , integer)
history (nullable , integer)
most_view (nullable , integer)
so , when ever a user register create a record in the table, and whenever update change the row, this approach seems feasible but as well not straight forward to re-order the layout in program
So, are there any better structure ideas?
Thanks for helping