package mapper

import (
	"web-qudo-be/app/database/entity"
	res "web-qudo-be/app/module/article_nulis_ai/response"
)

func ArticleNulisAIResponseMapper(articleNulisAIReq *entity.ArticleNulisAI) (articleNulisAIRes *res.ArticleNulisAIResponse) {
	if articleNulisAIReq != nil {
		articleNulisAIRes = &res.ArticleNulisAIResponse{
			ID:              articleNulisAIReq.ID,
			NulisAiId:       articleNulisAIReq.NulisAiId,
			ArticleId:       articleNulisAIReq.ArticleId,
			Title:           articleNulisAIReq.Title,
			Description:     articleNulisAIReq.Description,
			HtmlDescription: articleNulisAIReq.HtmlDescription,
			CategoryId:      articleNulisAIReq.CategoryId,
			CreatorId:       articleNulisAIReq.CreatorId,
			Tags:            articleNulisAIReq.Tags,
			ThumbnailPath:   articleNulisAIReq.ThumbnailPath,
			IsPublish:       articleNulisAIReq.IsPublish,
			PublishedAt:     articleNulisAIReq.PublishedAt,
			IsActive:        articleNulisAIReq.IsActive,
			CreatedAt:       articleNulisAIReq.CreatedAt,
			UpdatedAt:       articleNulisAIReq.UpdatedAt,
		}
	}
	return articleNulisAIRes
}
