package mapper

import (
	"campaign-pool-be/app/database/entity"
	res "campaign-pool-be/app/module/feedbacks/response"
)

func FeedbacksResponseMapper(feedbacksReq *entity.Feedbacks) (feedbacksRes *res.FeedbacksResponse) {
	if feedbacksReq != nil {
		feedbacksRes = &res.FeedbacksResponse{
			ID:               feedbacksReq.ID,
			Message:          feedbacksReq.Message,
			CommentFromName:  feedbacksReq.CommentFromName,
			CommentFromEmail: feedbacksReq.CommentFromEmail,
			StatusId:         feedbacksReq.StatusId,
			ApprovedAt:       feedbacksReq.ApprovedAt,
			ReplyMessage:     feedbacksReq.ReplyMessage,
			IsActive:         feedbacksReq.IsActive,
			CreatedAt:        feedbacksReq.CreatedAt,
			UpdatedAt:        feedbacksReq.UpdatedAt,
		}
	}
	return feedbacksRes
}
