| | 1 | = UseCase001 - Registering a user |
| | 2 | |
| | 3 | **Initiating actor:** Unregistered Guest |
| | 4 | |
| | 5 | {{{#!div style="text-align: justify; width: 100%;" |
| | 6 | 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. |
| | 7 | }}} |
| | 8 | |
| | 9 | == Scenario |
| | 10 | |
| | 11 | {{{#!div style="text-align: justify; width: 100%;" |
| | 12 | 1. User provides their required registration details, including a email, password and username, and submits the registration form. |
| | 13 | |
| | 14 | 2. System validates that the email is unique and that all required fields meet the necessary formatting standards. |
| | 15 | |
| | 16 | 3. System creates a new entry in the User table with a unique user_id and the current date_created. |
| | 17 | |
| | 18 | 4. System initializes a corresponding entry in the Consumer table, setting the points_collected to zero and establishing the one-to-one relationship with the new user_id. |
| | 19 | |
| | 20 | 5. System confirms the successful account creation and automatically logs the user in. |
| | 21 | }}} |