Class Profile

java.lang.Object
com.alpaca.entity.Profile

@Entity public class Profile extends Object
Represents a Profile entity in the system. This entity is mapped to the "profiles" table in the database and stores personal details of a user, including name, address, and avatar. It has a one-to-one relationship with the User entity.
  • Field Details

    • id

      private UUID id
      Unique identifier for the Profile. This value is automatically generated using a UUID strategy.
    • firstName

      private String firstName
      The first name of the Profile. This field cannot be null.
    • lastName

      private String lastName
      The last name of the Profile. This field cannot be null.
    • address

      private String address
      The address of the Profile. This field cannot be null.
    • avatarUrl

      private String avatarUrl
      URL of the user's avatar image. This field cannot be null.
    • user

      private User user
      The User associated with this Profile. This is a one-to-one relationship, meaning each user has exactly one profile.
  • Constructor Details

    • Profile

      public Profile(String firstName, String lastName, String address, String avatarUrl, User user)
      Constructs an instance of a new Profile object with the specified attributes. The generated object is ready to be used and stored in the database.
      Parameters:
      firstName - First name - must not be null
      lastName - Last name - must not be null
      address - Address - must not be null
      avatarUrl - URL of the profile's avatar - must not be null
      user - The associated User instance - must not be null
  • Method Details