package request

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

type OurProductContentCreateRequest struct {
	PrimaryTitle   string `json:"primary_title" form:"primary_title" validate:"required"`
	SecondaryTitle string `json:"secondary_title" form:"secondary_title"`
	Description    string `json:"description" form:"description"`
}

func (r *OurProductContentCreateRequest) ToEntity() *entity.OurProductContent {
	return &entity.OurProductContent{
		PrimaryTitle:   r.PrimaryTitle,
		SecondaryTitle: r.SecondaryTitle,
		Description:    r.Description,
	}
}

type OurProductContentUpdateRequest struct {
	PrimaryTitle   string `json:"primary_title"`
	SecondaryTitle string `json:"secondary_title"`
	Description    string `json:"description"`
}

func (r *OurProductContentUpdateRequest) ToEntity() *entity.OurProductContent {
	return &entity.OurProductContent{
		PrimaryTitle:   r.PrimaryTitle,
		SecondaryTitle: r.SecondaryTitle,
		Description:    r.Description,
	}
}