package mapper

import (
	"web-qudo-be/app/database/entity"
	res "web-qudo-be/app/module/user_levels/response"
)

func UserLevelsResponseMapper(userLevelsReq *entity.UserLevels) (userLevelsRes *res.UserLevelsResponse) {
	if userLevelsReq != nil {
		userLevelsRes = &res.UserLevelsResponse{
			ID:               userLevelsReq.ID,
			Name:             userLevelsReq.Name,
			AliasName:        userLevelsReq.AliasName,
			LevelNumber:      userLevelsReq.LevelNumber,
			ParentLevelId:    userLevelsReq.ParentLevelId,
			ProvinceId:       userLevelsReq.ProvinceId,
			IsApprovalActive: userLevelsReq.IsApprovalActive,
			Group:            userLevelsReq.Group,
			IsActive:         userLevelsReq.IsActive,
			CreatedAt:        userLevelsReq.CreatedAt,
			UpdatedAt:        userLevelsReq.UpdatedAt,
		}
	}
	return userLevelsRes
}
