2026-04-09 18:08:56 +00:00
|
|
|
package request
|
|
|
|
|
|
|
|
|
|
import "web-qudo-be/app/database/entity"
|
|
|
|
|
|
|
|
|
|
type OurServiceContentCreateRequest 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"`
|
2026-04-10 18:53:47 +00:00
|
|
|
LinkURL string `json:"link_url" form:"link_url"`
|
2026-04-09 18:08:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (r *OurServiceContentCreateRequest) ToEntity() *entity.OurServiceContent {
|
|
|
|
|
return &entity.OurServiceContent{
|
|
|
|
|
PrimaryTitle: r.PrimaryTitle,
|
|
|
|
|
SecondaryTitle: r.SecondaryTitle,
|
|
|
|
|
Description: r.Description,
|
2026-04-10 18:53:47 +00:00
|
|
|
LinkURL: r.LinkURL,
|
2026-04-09 18:08:56 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type OurServiceContentUpdateRequest struct {
|
|
|
|
|
PrimaryTitle string `json:"primary_title"`
|
|
|
|
|
SecondaryTitle string `json:"secondary_title"`
|
|
|
|
|
Description string `json:"description"`
|
2026-04-10 18:53:47 +00:00
|
|
|
LinkURL string `json:"link_url"`
|
2026-04-09 18:08:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (r *OurServiceContentUpdateRequest) ToEntity() *entity.OurServiceContent {
|
|
|
|
|
return &entity.OurServiceContent{
|
|
|
|
|
PrimaryTitle: r.PrimaryTitle,
|
|
|
|
|
SecondaryTitle: r.SecondaryTitle,
|
|
|
|
|
Description: r.Description,
|
2026-04-10 18:53:47 +00:00
|
|
|
LinkURL: r.LinkURL,
|
2026-04-09 18:08:56 +00:00
|
|
|
}
|
2026-04-10 18:53:47 +00:00
|
|
|
}
|