Changes between Initial Version and Version 1 of UseCase09PrototypeImplementation


Ignore:
Timestamp:
02/05/26 19:13:14 (3 days ago)
Author:
231035
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase09PrototypeImplementation

    v1 v1  
     1= UseCase09 - Add an Animal
     2** Initiating actor: Client **
     3== Description
     4A 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.
     5== Scenario
     61. Client goes to his profile.
     72. Clicks the button "Add new pet".
     83. Fills in the form provided.
     94. Submits it.
     10{{{
     11
     12INSERT INTO owners (user_id)
     13SELECT user_id
     14FROM users
     15WHERE username = 'client.viktor';
     16
     17INSERT INTO animals (
     18  owner_id,
     19  name,
     20  sex,
     21  date_of_birth,
     22  photo_url,
     23  type,
     24  species,
     25  breed,
     26  located_name
     27)
     28VALUES (
     29  (SELECT user_id FROM users WHERE username = 'client.viktor'),
     30  'Bella',
     31  'FEMALE',
     32  '2022-04-15',
     33  'https://cdn.petify.com/pets/bella.jpg',
     34  'PET',
     35  'Dog',
     36  'Golden Retriever',
     37  'Skopje'
     38);
     39}}}
     405. The system sends a notification.
     41{{{
     42INSERT INTO notifications (user_id, type, message)
     43VALUES (
     44  (SELECT user_id FROM users WHERE username = 'client.viktor'),
     45  'PET',
     46  'Your pet Bella has been successfully added to your profile.'
     47);
     48}}}
     49