Hello! Make arm the Manager of the cleaning Department. Decided to choose the Yii 2 framework. That would be clear overall about what is at stake here is the schema of the database
and the view of the main window with the explanation
The problem is that - When you reserve (settlement) customer to specify the room set the start date of the reservation and check out.
From the starting date (for example 02.03.2015) to the date of departure (for example 20.03.2015), the room should be clean on the day of arrival, departure and 1 time in 7 days jobs Clinton day (for example Tuesday of each week).
In addition to all the regular cleaning I did not know how best to implement a regular cleaning.
So far I have 3 options:
1) you need to do some extra table with entries for each booking of the room;
2) you can also in the model to do the calculations for each actual booking, but this is the worst option because it is not flexible.
3) Do the same calculations on the client side JS.
What if the client will change their "cleaning day" from Tuesday to Wednesday.
Perhaps in Yii2 there are some tools that will simplify my task, such as working with Redis, etc.!
Tell Junior's how to do it! Thank you!