package request

import "web-qudo-be/app/database/entity"

type PopupNewsContentImagesGeneric interface {
	ToEntity()
}

// Create (upload / insert image)
type PopupNewsContentImagesCreateRequest struct {
	PopupNewsContentID uint   `json:"popup_news_content_id" validate:"required"`
	MediaPath          string `json:"media_path"`
	MediaURL           string `json:"media_url"`
	IsThumbnail        *bool  `json:"is_thumbnail"`
}

func (req PopupNewsContentImagesCreateRequest) ToEntity() *entity.PopupNewsContentImages {
	return &entity.PopupNewsContentImages{
		PopupNewsContentID: req.PopupNewsContentID,
		MediaPath:          req.MediaPath,
		MediaURL:           req.MediaURL,
		IsThumbnail:        req.IsThumbnail,
	}
}