package mapper

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

func UserLevelsResponseMapper(userLevelsReq *user_levels.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
}
