Class User

java.lang.Object
com.equipmentrental.equipment_rental_system.model.User

@Entity public class User extends Object
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 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 identifier
      password - user password (stored as plain text in this prototype)
      firstName - first name of the staff member
      lastName - last name of the staff member
      role - access level (ADMIN or STAFF)
      department - organisational department
      phone - contact telephone number
      email - contact email address
  • Method Details

    • getFullName

      public String getFullName()
      Returns the user's full name by combining first and last name.
      Returns:
      the full name in "FirstName LastName" format