Changes between Initial Version and Version 1 of UseCase007


Ignore:
Timestamp:
05/12/26 22:25:02 (2 weeks ago)
Author:
232012
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase007

    v1 v1  
     1= UseCase007 - Add Product to Order
     2
     3**Initiating actors:**
     4
     5* Logged-In Consumer
     6
     7* Logged-In Admin
     8
     9{{{#!div style="text-align: justify; width: 100%;"
     10The goal of this use case is to allow an authenticated user to select a specific product and add it to an active order. This process captures the current price and quantity of the item, ensuring that the product is reserved for the transaction before the final purchase is completed.
     11}}}
     12
     13== Scenario
     14
     15{{{#!div style="text-align: justify; width: 100%;"
     16
     171. User selects a specific {{{Product}}} and chooses the option to add it to {{{Order}}}.
     18
     192. System checks the current {{{stock}}} level of the product in the {{{Product}}} table to ensure availability.
     20
     213. System retrieves the current {{{price}}} of the product to establish the {{{price_at_purchase}}} for the transaction.
     22
     234. System creates or identifies an active {{{Order}}} record associated with the consumer’s {{{user_id}}}.
     24
     255. System creates a new entry in the {{{OrderItem}}} table, linking the {{{product_id}}} to the {{{order_id}}}.
     26
     276. System records the specific {{{quantity}}} requested by the {{{User}}} and saves the {{{price_at_purchase}}} to the {{{OrderItem}}} record.
     28
     297. System updates the user's view to reflect that the item has been added to their {{{Order}}} total.
     30}}}