24 lines
775 B
Go
24 lines
775 B
Go
package mapper
|
|
|
|
import (
|
|
"go-humas-be/app/database/entity"
|
|
res "go-humas-be/app/module/article_comments/response"
|
|
)
|
|
|
|
func ArticleCommentsResponseMapper(articleCommentsReq *entity.ArticleComments) (articleCommentsRes *res.ArticleCommentsResponse) {
|
|
if articleCommentsReq != nil {
|
|
articleCommentsRes = &res.ArticleCommentsResponse{
|
|
ID: articleCommentsReq.ID,
|
|
Message: articleCommentsReq.Message,
|
|
ArticleId: articleCommentsReq.ArticleId,
|
|
CommentFrom: articleCommentsReq.CommentFrom,
|
|
ParentId: articleCommentsReq.ParentId,
|
|
IsPublic: articleCommentsReq.IsPublic,
|
|
IsActive: articleCommentsReq.IsActive,
|
|
CreatedAt: articleCommentsReq.CreatedAt,
|
|
UpdatedAt: articleCommentsReq.UpdatedAt,
|
|
}
|
|
}
|
|
return articleCommentsRes
|
|
}
|