package mapper

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

func ArticleCategoriesResponseMapper(articleCategoriesReq *entity.ArticleCategories) (articleCategoriesRes *res.ArticleCategoriesResponse) {
	if articleCategoriesReq != nil {
		articleCategoriesRes = &res.ArticleCategoriesResponse{
			ID:            articleCategoriesReq.ID,
			Title:         articleCategoriesReq.Title,
			Description:   articleCategoriesReq.Description,
			ThumbnailPath: articleCategoriesReq.ThumbnailPath,
			ParentId:      articleCategoriesReq.ParentId,
			CreatedById:   articleCategoriesReq.CreatedById,
			StatusId:      articleCategoriesReq.StatusId,
			IsPublish:     articleCategoriesReq.IsPublish,
			PublishedAt:   articleCategoriesReq.PublishedAt,
			IsActive:      articleCategoriesReq.IsActive,
			CreatedAt:     articleCategoriesReq.CreatedAt,
			UpdatedAt:     articleCategoriesReq.UpdatedAt,
		}
	}
	return articleCategoriesRes
}
