package mapper

import (
	"netidhub-saas-be/app/database/entity"
	res "netidhub-saas-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
}
