Changes between Initial Version and Version 1 of UseCase04


Ignore:
Timestamp:
01/24/26 12:47:32 (2 weeks ago)
Author:
231035
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase04

    v1 v1  
     1= UseCase04 - Saves a Listing
     2** Initiating actor: Client **
     3== Description
     4A client browses listings and can save a listing into their favourites for quick access later. When the client clicks “Save” on a listing, the system verifies the client is logged in, verifies the listing exists, then stores the favourite record. The client can later view or remove saved listings.
     5== Scenario
     61. Client clicks a listing from the lisiting page.
     7{{{
     8SELECT
     9  l.listing_id,
     10  l.status,
     11  l.price,
     12  l.description,
     13  l.created_at,
     14  a.animal_id,
     15  a.name AS animal_name,
     16  a.species,
     17  a.breed,
     18  a.located_name,
     19  l.owner_id
     20FROM listings l
     21JOIN animals a ON a.animal_id = l.animal_id
     22WHERE l.listing_id = $1;
     23
     24}}}
     252. Client clicks "Save Listing".
     263. The system saves the listing to favorites to the client.
     27{{{
     28INSERT INTO favourite_listings (user_id, listing_id)
     29VALUES ($1, $2);
     30}}}
     31
     32
     33
     34