qudoco-be/app/module/subscription/mapper/subscription.mapper.go

20 lines
533 B
Go
Raw Normal View History

2026-02-24 09:37:19 +00:00
package mapper
import (
"web-qudo-be/app/database/entity"
res "web-qudo-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
}