package request

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

type PartnerContentCreateRequest struct {
	PrimaryTitle string `json:"primary_title" form:"primary_title" validate:"required"`
	ImagePath    string `json:"image_path" form:"image_path"`
	ImageURL     string `json:"image_url" form:"image_url"`
}

func (r *PartnerContentCreateRequest) ToEntity() *entity.PartnerContent {
	return &entity.PartnerContent{
		PrimaryTitle: r.PrimaryTitle,
		ImagePath:    r.ImagePath,
		ImageURL:     r.ImageURL,
	}
}

type PartnerContentUpdateRequest struct {
	PrimaryTitle string `json:"primary_title"`
	ImagePath    string `json:"image_path"`
	ImageURL     string `json:"image_url"`
}

func (r *PartnerContentUpdateRequest) ToEntity() *entity.PartnerContent {
	return &entity.PartnerContent{
		PrimaryTitle: r.PrimaryTitle,
		ImagePath:    r.ImagePath,
		ImageURL:     r.ImageURL,
	}
}