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