package mapper

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

func MagazinesResponseMapper(magazinesReq *entity.Magazines) (magazinesRes *res.MagazinesResponse) {
	if magazinesReq != nil {
		magazinesRes = &res.MagazinesResponse{
			ID:    magazinesReq.ID,
			Title:    magazinesReq.Title,
			Description:    magazinesReq.Description,
			ThumbnailPath:    magazinesReq.ThumbnailPath,
			ThumbnailUrl:    magazinesReq.ThumbnailUrl,
			PageUrl:    magazinesReq.PageUrl,
			CreatedById:    magazinesReq.CreatedById,
			StatusId:    magazinesReq.StatusId,
			IsPublish:    magazinesReq.IsPublish,
			PublishedAt:    magazinesReq.PublishedAt,
			IsActive:    magazinesReq.IsActive,
			CreatedAt:    magazinesReq.CreatedAt,
			UpdatedAt:    magazinesReq.UpdatedAt,
		}
	}
	return magazinesRes
}