| Version 4 (modified by , 2 weeks ago) ( diff ) |
|---|
UseCase001 - Registering a user
Initiating actor: Unregistered Guest
The goal of this use case is to allow a new visitor to create a permanent account within the system by providing their personal details. Upon successful registration, the system creates a new record in the User table and assigns the user to the Consumer role, enabling them to access personalized features like wishlists and order history.
Scenario
- User provides their required registration details, including a
email,passwordandusername, and submits the registration form.
- System validates that the
emailis unique and that all required fields meet the necessary formatting standards.
SELECT COUNT(*) FROM User WHERE email = 'user@example.com';
- System creates a new entry in the
Usertable with a uniqueuser_idand the currentdate_created.
INSERT INTO User (email, password, username, date_created)
VALUES ('user@example.com', 'hashed_password', 'NewUser', CURRENT_TIMESTAMP);
- System initializes a corresponding entry in the
Consumer table, setting thepoints_collectedto zero and establishing the one-to-one relationship with the newuser_id.
INSERT INTO Consumer (user_id, points_collected) VALUES (LAST_INSERT_ID(), 0);
- System confirms the successful account creation and automatically logs the user in.
Note:
See TracWiki
for help on using the wiki.
