Changes between Version 1 and Version 2 of UseCase04PrototypeImplementation


Ignore:
Timestamp:
02/08/26 13:31:48 (2 hours ago)
Author:
231035
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase04PrototypeImplementation

    v1 v2  
    55== Scenario
    661. Client clicks a listing from the lisiting page.
    7 {{{#!comment
    8 SELECT
    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
    20 FROM listings l
    21 JOIN animals a ON a.animal_id = l.animal_id
    22 WHERE l.listing_id = $1;
     7[[Image(save.png)]]
     8{{{
     9select
     10l1_0.listing_id,
     11l1_0.owner_id,
     12l1_0.animal_id,
     13l1_0.description,
     14l1_0.price,l1_0.status,
     15l1_0.created_at
     16 from favorite_listings fl1_0
     17 join listings l1_0 on l1_0.listing_id=fl1_0.listing_id
     18 where fl1_0.client_id=?
     19order by l1_0.created_at desc
    2320
    2421}}}
    25 2. Client clicks "Save Listing".
     222. Client clicks "Save Listing" or the heart.
     23[[Image(save2.png)]]
     24[[Image(save3.png)]]
     25[[Image(save4.png)]]
     26{{{
     27insert into favorite_listings (client_id,listing_id) values (?,?)
     28}}}
    26293. The system saves the listing to favorites to the client.
    27 {{{#!comment
    28 INSERT INTO favourite_listings (user_id, listing_id)
    29 VALUES ($1, $2);
    30 }}}
     30[[Image(save5.png)]]
    3131
    3232