Changes between Initial Version and Version 1 of ImportatntUseCase006


Ignore:
Timestamp:
02/10/25 11:45:50 (13 days ago)
Author:
226030
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImportatntUseCase006

    v1 v1  
     1== Customer makes reservation ==
     2=== Актери ===
     3* Customer
     4=== Scenario steps ===
     51. Customer logs in.
     62. Customer enters reservation details: date and time, number of people and stay length.
     73. If an available table is found, proceed with reservation.
     84. Applications shows reservation details to the customer.
     9=== SQL Queries ===
     10
     11{{{
     12SELECT u.email, u.password FROM users u WHERE u.email = ?; -- and password application check
     13}}}
     14{{{
     15SELECT table_number
     16FROM tables
     17WHERE seat_capacity >= chosen_capacity
     18AND table_number NOT IN (
     19    SELECT table_number
     20    FROM frontstaff_managed_reservations
     21    WHERE reservation_id IN (
     22        SELECT id FROM reservations
     23        WHERE datetime BETWEEN entered_date_time AND entered_date_time+entered_stay
     24    )
     25);                   
     26}}}
     27{{{
     28INSERT INTO reservations (stay_length, datetime, creation_timestamp, number_of_people, user_id)
     29VALUES (2, '2025-02-10 19:00:00', NOW(), 4, 5);
     30}}}
     31{{{
     32SELECT r.id, r.datetime, r.number_of_people, t.table_number, u.email
     33FROM reservations r
     34JOIN frontstaff_managed_reservations rmf ON r.id = rmf.reservation_id
     35JOIN tables t ON rmf.table_number = t.table_number
     36JOIN users u ON r.user_id = u.id
     37WHERE r.id = 10;
     38}}}