20 lines
533 B
Go
20 lines
533 B
Go
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
|
|
}
|