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

16 lines
598 B
Go

package mapper
import "web-qudo-be/app/module/hero_section/response"
func ToHeroSectionResponse(data map[string]interface{}) response.HeroSectionResponse {
return response.HeroSectionResponse{
ID: data["id"].(int),
PrimaryTitle: data["primary_title"].(string),
SecondaryTitle: data["secondary_title"].(string),
Description: data["description"].(string),
PrimaryCTA: data["primary_cta"].(string),
SecondaryCTAText: data["secondary_cta_text"].(string),
ImagePath: data["image_path"].(string),
ImageURL: data["image_url"].(string),
}
}