package request

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

	"github.com/google/uuid"
)

type OurProductContentImageCreateRequest struct {
	OurProductContentID uuid.UUID `json:"our_product_content_id" validate:"required"`
	ImagePath           string    `json:"image_path"`
	ImageURL            string    `json:"image_url"`
	IsThumbnail         *bool     `json:"is_thumbnail"`
}

func (r *OurProductContentImageCreateRequest) ToEntity() *entity.OurProductContentImage {
	return &entity.OurProductContentImage{
		OurProductContentID: r.OurProductContentID,
		ImagePath:           r.ImagePath,
		ImageURL:            r.ImageURL,
		IsThumbnail:         r.IsThumbnail,
	}
}

type OurProductContentImageUpdateRequest struct {
	ImagePath   string `json:"image_path"`
	ImageURL    string `json:"image_url"`
	IsThumbnail *bool  `json:"is_thumbnail"`
}

func (r *OurProductContentImageUpdateRequest) ToEntity() *entity.OurProductContentImage {
	return &entity.OurProductContentImage{
		ImagePath:   r.ImagePath,
		ImageURL:    r.ImageURL,
		IsThumbnail: r.IsThumbnail,
	}
}