package mapper

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

func CustomStaticPagesResponseMapper(customStaticPagesReq *entity.CustomStaticPages) (customStaticPagesRes *res.CustomStaticPagesResponse) {
	if customStaticPagesReq != nil {
		customStaticPagesRes = &res.CustomStaticPagesResponse{
			ID:          customStaticPagesReq.ID,
			Title:       customStaticPagesReq.Title,
			Description: customStaticPagesReq.Description,
			Slug:        customStaticPagesReq.Slug,
			HtmlBody:    customStaticPagesReq.HtmlBody,
			IsActive:    customStaticPagesReq.IsActive,
			CreatedAt:   customStaticPagesReq.CreatedAt,
			UpdatedAt:   customStaticPagesReq.UpdatedAt,
		}
	}
	return customStaticPagesRes
}
