Restaurant sql reserveringen met: Base schedule availibility and exceptions
Het restaurant kan dus (op basis van wat hier boven staat) een wekelijks schema invullen dat automatisch dient als format voor alle volgende weken. Het restaurant kan ook uitzonderingen instellen voor bepaalde dagen (b.v. op feestdagen. Deze zijn dan dus niet beschikbaar indien ze op de dagen vallen die zij wel beschikbaar hebben gesteld in de basis.
Hieronder staat wat ik nodig heb:(staat in het engels ivm tijdsgebrek kan ik het niet vertalen)
Im working on a project where users can place reservations with restaurants, but only on the dates that the restaurant allows. The restaurant can also set how many seats are available at a certain time.
So a restaurant can supply a schedule which is formatted weekly but also can supply exceptions (like holidays).
What I need is a complete representation of the available ranges and seats for a given time frame.
So for example a restaurant has a week schedule that says that every weekday they have 10 seats available, but also has a couple reservations I need the output like this so I can generate a calendar where the user can see the availability of the restaurant.
+---------------------+---------------------+-----------+
| start | end | available |
+---------------------+---------------------+-----------+
| 2013-02-14 08:00:00 | 2013-02-14 17:00:00 | 10 |
| 2013-02-15 08:00:00 | 2013-02-15 12:00:00 | 8 | <= 2 reservations
| 2013-02-15 12:00:00 | 2013-02-16 15:00:00 | 4 | <= 6 reservations
| 2013-02-15 15:00:00 | 2013-02-16 15:00:00 | 7 | etc...
| 2013-02-16 15:00:00 | 2013-02-16 17:00:00 | 4 |
| 2013-02-17 08:00:00 | 2013-02-17 17:00:00 | 10 |
| 2013-02-18 12:00:00 | 2013-02-18 18:00:00 | 10 |
+---------------------+---------------------+-----------+
reservation lasts only an hour but i need a complete representaion of the available ranges and how many seats there are a available. so lets say that a restaurant has a maximum of 10 seats available on weekdays between 08:00 and 17:00, if there is a reservation on 12:00 till 13:00 for 2 people, the output has to be 08:00 - 12:00 with 10 available seats, 12:00 - 13:00 with 8 available seats, 13:00 - 17:00 with 10 available seats,
Advies, hulp etc laat me aub asap weten. Je kan me direct bereiken op 020-717 32 14
Er zijn nog geen reacties op dit bericht.