package mapper

import (
	"netidhub-saas-be/app/database/entity"
	res "netidhub-saas-be/app/module/article_approvals/response"
)

func ArticleApprovalsResponseMapper(articleApprovalsReq *entity.ArticleApprovals) (articleApprovalsRes *res.ArticleApprovalsResponse) {
	if articleApprovalsReq != nil {
		articleApprovalsRes = &res.ArticleApprovalsResponse{
			ID:              articleApprovalsReq.ID,
			ArticleId:       articleApprovalsReq.ArticleId,
			ApprovalBy:      articleApprovalsReq.ApprovalBy,
			StatusId:        articleApprovalsReq.StatusId,
			Message:         articleApprovalsReq.Message,
			ApprovalAtLevel: articleApprovalsReq.ApprovalAtLevel,
			CreatedAt:       articleApprovalsReq.CreatedAt,
		}
	}
	return articleApprovalsRes
}
