- The backend for the HO_CHILL_TRIP project
- Communicate with front-end through database
- Responsible to generate the plan
- to get all of the attraction and store it to the list
- to get all of the plan and create the Plan.Plan class
- classify the plan, like the below:
- the plan need to gen and no must-go place
- the plan need to gen and exist must-go list
- the plan need to re-gen
- gen the route but it all depends, like the below:
- to handle case 3.1:
- find how many travel day of the plan
- gen the route depend on the day is first day or not (for different initial).
- recommend attraction by rating and distance
- if the time after 1830, the the generator will be ended and go back hotel
- to handle case 3.2:
- find how many travel day of the plan
- gen the route depend on the day is first day or not (for different initial).
- recommend attraction by rating and distance
- if there are no attraction in must-go list, then use the case 4.1 to handle rest
- if the time after 1830, the the generator will be ended and go back hotel
- to handle case 3.3:
- store all the attraction first
- find how many travel day of the plan
- gen the route depend on the day is first day or not (for different initial).
- recommend attraction by rating and distance
- if the recommended attraction is exist in the original attraction list, find the other attraction.
- if the time after 1830, the the generator will be ended and go back hotel
- to handle case 3.1:
synchronize with the database every 5 sec
- 1. don't insert hotel with placeOrder: 1
- 2. fix place duplicate (remember set bigger radius)
- 3. generate plan (nothing)
- 4. generate plan (re-gen)
- 5. generate plan (must-go place(s) included)
- 6. add driving route
- 7. update existing attraction
- 1. use auto increment in attraction table
- 2. other冇咁重要嘅 backend, like send email/ delete useless things
- 3. duration of hotel should be 0