wiki:UseCase02Implementation

Use-case 0002 Implementation - 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:

  1. Guest clicks on the "Sign up" button.

  1. Guest fills out their personal details and selects the "I am a Pet Owner" role.

  1. Guest submits the form.
  2. System creates the new user account and links it to the Pet Owner subtype table:
    Hibernate: 
        select
            u1_0.user_id,
            case 
                when u1_1.user_id is not null 
                    then 1 
                when u1_2.user_id is not null 
                    then 2 
                when u1_0.user_id is not null 
                    then 0 
                end,
                u1_0.email,
                u1_0.first_name,
                u1_0.last_name,
                u1_0.password,
                u1_0.username,
                u1_2.user_id 
            from
                project.users u1_0 
            left join
                project.pet_owners u1_1 
                    on u1_0.user_id=u1_1.user_id 
            left join
                project.pet_sitters u1_2 
                    on u1_0.user_id=u1_2.user_id 
            where
                u1_0.username=?
    Hibernate: 
        insert 
        into
            project.users
            (email, first_name, last_name, password, username, user_id) 
        values
            (?, ?, ?, ?, ?, ?)
    Hibernate: 
        insert 
        into
            project.pet_owners
            (user_id) 
        values
            (?)
    
  3. System redirects the new user to the login page.

Last modified 7 days ago Last modified on 05/18/26 17:23:04

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.