package mapper

import (
	"narasi-ahli-be/app/database/entity"
	res "narasi-ahli-be/app/module/user_roles/response"
)

func UserRolesResponseMapper(userRolesReq *entity.UserRoles) (userRolesRes *res.UserRolesResponse) {
	if userRolesReq != nil {
		userRolesRes = &res.UserRolesResponse{
			ID:          userRolesReq.ID,
			Name:        userRolesReq.Name,
			Description: userRolesReq.Description,
			Code:        userRolesReq.Code,
			UserLevelId: userRolesReq.UserLevelId,
			StatusId:    userRolesReq.StatusId,
			CreatedById: userRolesReq.CreatedById,
			IsActive:    userRolesReq.IsActive,
			CreatedAt:   userRolesReq.CreatedAt,
			UpdatedAt:   userRolesReq.UpdatedAt,
		}
	}
	return userRolesRes
}
