package mapper

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

func ArticleCategoryDetailsResponseMapper(articleCategoryDetailsReq *entity.ArticleCategoryDetails) (articleCategoryDetailsRes *res.ArticleCategoryDetailsResponse) {
	if articleCategoryDetailsReq != nil {
		articleCategoryDetailsRes = &res.ArticleCategoryDetailsResponse{
			ID:    articleCategoryDetailsReq.ID,
			ArticleId:    articleCategoryDetailsReq.ArticleId,
			CategoryId:    articleCategoryDetailsReq.CategoryId,
			IsActive:    articleCategoryDetailsReq.IsActive,
			CreatedAt:    articleCategoryDetailsReq.CreatedAt,
			UpdatedAt:    articleCategoryDetailsReq.UpdatedAt,
		}
	}
	return articleCategoryDetailsRes
}