Creates an instance of UserService.
Repository for User entities
Creates a new user in the system.
The email address for the new user
The first name of the new user
The last name of the new user
The password for the new user (will be hashed)
The role of the new user (Student or Teacher)
Optional
image: stringOptional profile image URL for the new user
The newly created user entity
Finds any user by their email address with related courses and enrollments.
The email address of the user to find
The found user entity or null if not found
Finds a student by their email address with related course enrollments.
The email address of the student to find
The found student entity or null if not found
Finds a student with specified relations.
Query options including where clause and relations to include
The found student entity or null if not found
Finds a teacher by their email address with related courses.
The email address of the teacher to find
The found teacher entity or null if not found
Updates a user's email address.
The current email address of the user
The new email address to set
The updated user entity
Updates a user's password.
The email address of the user
The new password to set (will be hashed)
The updated user entity
Service responsible for managing user-related operations in the system. Handles user creation, retrieval, and profile updates.