package mapper

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

func ArticleFilesResponseMapper(articleFilesReq *entity.ArticleFiles) (articleFilesRes *res.ArticleFilesResponse) {
	if articleFilesReq != nil {
		articleFilesRes = &res.ArticleFilesResponse{
			ID:    articleFilesReq.ID,
			ArticleId:    articleFilesReq.ArticleId,
			FilePath:    articleFilesReq.FilePath,
			FileUrl:    articleFilesReq.FileUrl,
			FileName:    articleFilesReq.FileName,
			FileThumbnail:    articleFilesReq.FileThumbnail,
			FileAlt:    articleFilesReq.FileAlt,
			WidthPixel:    articleFilesReq.WidthPixel,
			HeightPixel:    articleFilesReq.HeightPixel,
			Size:    articleFilesReq.Size,
			DownloadCount:    articleFilesReq.DownloadCount,
			CreatedById:    articleFilesReq.CreatedById,
			StatusId:    articleFilesReq.StatusId,
			IsPublish:    articleFilesReq.IsPublish,
			PublishedAt:    articleFilesReq.PublishedAt,
			IsActive:    articleFilesReq.IsActive,
			CreatedAt:    articleFilesReq.CreatedAt,
			UpdatedAt:    articleFilesReq.UpdatedAt,
		}
	}
	return articleFilesRes
}