Changes between Version 1 and Version 2 of ImportatntUseCase003


Ignore:
Timestamp:
02/10/25 11:55:59 (12 days ago)
Author:
221128
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImportatntUseCase003

    v1 v2  
    44=== Steps in the Scenario ===
    55**__1. Employee opens tab.__**
    6 
     6{{{
    77SELECT p.name, p.price, oi.quantity
    88FROM order_items oi
    99JOIN products p ON p.id = oi.product_id
    10 WHERE oi.order_id = 1;
     10WHERE oi.order_id = 1
     11}}}
    1112
    1213**__2. Employee adds order items.__**
    13 
     14{{{
    1415INSERT INTO order_items(id, order_id, product_id, is_processed, quantity)
    1516VALUES (7,1,1,false,1);
    1617INSERT INTO order_items(id ,order_id, product_id, is_processed, quantity)
    1718VALUES (8,1,2,false,1);
    18 
     19}}}
    1920**__3. Employee marks order items as processed.__**
    20 
     21{{{
    2122UPDATE order_items SET is_processed=true WHERE id=7;
    2223UPDATE order_items SET is_processed=true WHERE id=8;
    23 
     24}}}
    2425**__4. Employee closes tab.__**
    2526
    2627**__5. System prints bil.__**
    27 
    28 UPDATE orders SET status='CONFIRMED' WHERE id=1;
     28{{{
     29UPDATE orders SET status='CONFIRMED' WHERE id=1
     30}}}
    2931
    3032**__6. Employee finalizes payment.__**
    31 
     33{{{
    3234INSERT INTO payments(id, order_id, amount, payment_type, tip_amount)
    3335SELECT 3,1, SUM(oi.price), ‘cash’, 0 FROM order_items oi WHERE oi.order_id = 1
     36}}}