Package com.alpaca.entity
Class Profile
java.lang.Object
com.alpaca.entity.Profile
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 Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe address of the Profile.private StringURL of the user's avatar image.private StringThe first name of the Profile.private UUIDUnique identifier for the Profile.private StringThe last name of the Profile.private UserThe User associated with this Profile. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
Unique identifier for the Profile. This value is automatically generated using a UUID strategy. -
firstName
The first name of the Profile. This field cannot be null. -
lastName
The last name of the Profile. This field cannot be null. -
address
The address of the Profile. This field cannot be null. -
avatarUrl
URL of the user's avatar image. This field cannot be null. -
user
The User associated with this Profile. This is a one-to-one relationship, meaning each user has exactly one profile.
-
-
Constructor Details
-
Profile
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 nulllastName- Last name - must not be nulladdress- Address - must not be nullavatarUrl- URL of the profile's avatar - must not be nulluser- The associated User instance - must not be null
-
-
Method Details