wiki:UseCase09PrototypeImplementation

Version 1 (modified by 231035, 3 days ago) ( diff )

--

UseCase09 - Add an Animal

Initiating actor: Client

Description

A client adds a new pet to their profile by filling in an “Add Pet” form. The client must upload a pet photo. With this the client now becomes an owner.

Scenario

  1. Client goes to his profile.
  2. Clicks the button "Add new pet".
  3. Fills in the form provided.
  4. Submits it.
    INSERT INTO owners (user_id)
    SELECT user_id
    FROM users
    WHERE username = 'client.viktor';
    
    INSERT INTO animals (
      owner_id,
      name,
      sex,
      date_of_birth,
      photo_url,
      type,
      species,
      breed,
      located_name
    )
    VALUES (
      (SELECT user_id FROM users WHERE username = 'client.viktor'),
      'Bella',
      'FEMALE',
      '2022-04-15',
      'https://cdn.petify.com/pets/bella.jpg',
      'PET',
      'Dog',
      'Golden Retriever',
      'Skopje'
    );
    
  5. The system sends a notification.
    INSERT INTO notifications (user_id, type, message)
    VALUES (
      (SELECT user_id FROM users WHERE username = 'client.viktor'),
      'PET',
      'Your pet Bella has been successfully added to your profile.'
    );
    

Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.