Class User
java.lang.Object
com.equipmentrental.equipment_rental_system.model.User
Represents a staff member who can create and manage equipment bookings.
Every booking must be linked to a registered user (BR-03).
The table is named app_user rather than user because
"user" is a reserved keyword in H2 and PostgreSQL.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the user's full name by combining first and last name.
-
Constructor Details
-
User
public User(String username, String password, String firstName, String lastName, UserRole role, String department, String phone, String email) Creates a new user with all required and optional fields.- Parameters:
username- unique login identifierpassword- user password (stored as plain text in this prototype)firstName- first name of the staff memberlastName- last name of the staff memberrole- access level (ADMIN or STAFF)department- organisational departmentphone- contact telephone numberemail- contact email address
-
-
Method Details
-
getFullName
Returns the user's full name by combining first and last name.- Returns:
- the full name in "FirstName LastName" format
-