add two functions:
1. add a variable is_favorite to restore favorite or not.
2. make the favorite was a checkbox