| | 1 | == Use-case 0016 - Edit a Pet Profile |
| | 2 | |
| | 3 | '''Initiating actor:''' Pet Owner |
| | 4 | |
| | 5 | '''Other actors:''' None |
| | 6 | |
| | 7 | '''Description:''' |
| | 8 | A Pet Owner wants to update the details of an existing pet, such as its age, photo URL, or special needs. |
| | 9 | |
| | 10 | '''Scenario:''' |
| | 11 | 1. Pet Owner navigates to their "My Pets" dashboard. |
| | 12 | 2. Owner clicks the "Edit Pet" button next to a specific pet. |
| | 13 | 3. Owner updates the age and special needs, and submits the form. |
| | 14 | 4. System updates the pet record in the database: |
| | 15 | {{{ |
| | 16 | #!sql |
| | 17 | UPDATE pets |
| | 18 | SET age = 5, special_needs = 'Needs medication pill every 12 hours', photo = 'new_photo_url.jpg' |
| | 19 | WHERE pet_id = 'specific-pet-uuid-here' |
| | 20 | AND owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan'); |
| | 21 | }}} |