wiki:UseCase05

Version 1 (modified by 231035, 2 weeks ago) ( diff )

--

UseCase05 - Create a Listing

Initiating actor: Owner

Description

An owner creates a listing for an animal they own. After creation, the system shows the created listing.

Scenario

  1. Owner opens "My Animals" page.
    SELECT
      a.animal_id,
      a.name,
      a.sex,
      a.date_of_birth,
      a.type,
      a.species,
      a.breed,
      a.located_name
    FROM animals a
    WHERE a.owner_id = $1
    ORDER BY a.animal_id DESC;
    
  2. Owner clicks on a specific animal and clicks "Create Listing".
  3. Owner enters listing information and submits it.
  4. System creates the lisitng.
    INSERT INTO listings (owner_id, animal_id, status, price, description, created_at)
    VALUES ($1, $2, 'ACTIVE', $3, $4, NOW())
    RETURNING listing_id;
    
Note: See TracWiki for help on using the wiki.