package mapper

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

func SubscriptionResponseMapper(subscriptionReq *entity.Subscription) (subscriptionRes *res.SubscriptionResponse) {
	if subscriptionReq != nil {
		subscriptionRes = &res.SubscriptionResponse{
			ID:        subscriptionReq.ID,
			Email:     subscriptionReq.Email,
			IsActive:  subscriptionReq.IsActive,
			CreatedAt: subscriptionReq.CreatedAt,
			UpdatedAt: subscriptionReq.UpdatedAt,
		}
	}
	return subscriptionRes
}
