package mapper

import (
	"narasi-ahli-be/app/database/entity"
	res "narasi-ahli-be/app/module/knowledge_base/response"
)

func KnowledgeBaseResponseMapper(kb *entity.KnowledgeBase, host string) (out *res.KnowledgeBaseResponse) {
	if kb == nil {
		return nil
	}

	out = &res.KnowledgeBaseResponse{
		ID:           kb.ID,
		AgentId:      kb.AgentId,
		AgentName:    kb.AgentName,
		CreatedById:  kb.CreatedById,
		Title:        kb.Title,
		Status:       kb.Status,

		FileJournalUrl: kb.FileJournalUrl,
		FileAudioUrl:   kb.FileAudioUrl,
		FileVideoUrl:   kb.FileVideoUrl,

		IsActive:   kb.IsActive,
		CreatedAt:  kb.CreatedAt,
		UpdatedAt:  kb.UpdatedAt,
	}

	return out
}
