A utility class for converting between User and UserDto objects.
This class provides static methods to convert a UserDto to a User
and vice versa. The conversion maps all relevant fields between the two objects
while ensuring consistency in data transformation.
This method takes a UserDto object containing user data and maps it to
a User entity, which can be saved to or retrieved from the database.
The conversion includes all user-related fields like username, email, phone number,
password, and timestamps.
This method takes a User entity and maps its fields to a UserDto
object. The DTO is typically used for transferring user data between different layers
of the application, such as the service and presentation layers.