package mapper

import (
	"go-humas-be/app/database/entity"
	res "go-humas-be/app/module/master_modules/response"
)

func MasterModulesResponseMapper(masterModulesReq *entity.MasterModules) (masterModulesRes *res.MasterModulesResponse) {
	if masterModulesReq != nil {
		masterModulesRes = &res.MasterModulesResponse{
			ID:          masterModulesReq.ID,
			Name:        masterModulesReq.Name,
			Description: masterModulesReq.Description,
			PathUrl:     masterModulesReq.PathUrl,
			StatusId:    masterModulesReq.StatusId,
			IsActive:    masterModulesReq.IsActive,
			CreatedAt:   masterModulesReq.CreatedAt,
			UpdatedAt:   masterModulesReq.UpdatedAt,
		}
	}
	return masterModulesRes
}
