| Version 2 (modified by , 4 hours ago) ( diff ) |
|---|
Use-case 0002 - Sign up
Initiating actor: Guest
Other actors: None
Description: A new guest wants to use the platform to find a sitter or offer services. They must register an account first. The system creates the main user record and links it to the specific role table (in this example Pet Owner) using a secure transaction.
Scenario:
- Guest clicks on the "Sign up" button.
- Guest fills out their personal details and selects the "I am a Pet Owner" role.
- Guest submits the form.
- System creates the new user account and links it to the Pet Owner subtype table:
BEGIN; WITH new_user AS ( INSERT INTO users (username, first_name, last_name, password, email) VALUES ( 'owner_mona', 'Mona', 'Monevska', '$2a$10$hashed_pw_mona', 'mona@email.com' ) RETURNING user_id ) INSERT INTO pet_owners (user_id) SELECT user_id FROM new_user; COMMIT; - System redirects the new user to the home page.
Note:
See TracWiki
for help on using the wiki.
