package mapper

import (
	"netidhub-saas-be/app/database/entity"
	res "netidhub-saas-be/app/module/master_menus/response"
)

func MasterMenusResponseMapper(masterMenusReq *entity.MasterMenus) (masterMenusRes *res.MasterMenusResponse) {
	if masterMenusReq != nil {
		masterMenusRes = &res.MasterMenusResponse{
			ID:           masterMenusReq.ID,
			Name:         masterMenusReq.Name,
			Description:  masterMenusReq.Description,
			ModuleId:     masterMenusReq.ModuleId,
			ParentMenuId: masterMenusReq.ParentMenuId,
			Icon:         masterMenusReq.Icon,
			Position:     masterMenusReq.Position,
			StatusId:     masterMenusReq.StatusId,
			IsActive:     masterMenusReq.IsActive,
			CreatedAt:    masterMenusReq.CreatedAt,
			UpdatedAt:    masterMenusReq.UpdatedAt,
		}
	}
	return masterMenusRes
}
