package mapper

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

func MagazineFilesResponseMapper(magazineFilesReq *entity.MagazineFiles) (magazineFilesRes *res.MagazineFilesResponse) {
	if magazineFilesReq != nil {
		magazineFilesRes = &res.MagazineFilesResponse{
			ID:    magazineFilesReq.ID,
			Title:    magazineFilesReq.Title,
			Description:    magazineFilesReq.Description,
			MagazineId:    magazineFilesReq.MagazineId,
			DownloadCount:    magazineFilesReq.DownloadCount,
			StatusId:    magazineFilesReq.StatusId,
			IsPublish:    magazineFilesReq.IsPublish,
			PublishedAt:    magazineFilesReq.PublishedAt,
			IsActive:    magazineFilesReq.IsActive,
			CreatedAt:    magazineFilesReq.CreatedAt,
			UpdatedAt:    magazineFilesReq.UpdatedAt,
		}
	}
	return magazineFilesRes
}