qudoco-be/app/module/our_service_contents/request/our_service_contents.reques...

31 lines
960 B
Go
Raw Normal View History

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"`
}
func (r *OurServiceContentCreateRequest) ToEntity() *entity.OurServiceContent {
return &entity.OurServiceContent{
PrimaryTitle: r.PrimaryTitle,
SecondaryTitle: r.SecondaryTitle,
Description: r.Description,
}
}
type OurServiceContentUpdateRequest struct {
PrimaryTitle string `json:"primary_title"`
SecondaryTitle string `json:"secondary_title"`
Description string `json:"description"`
}
func (r *OurServiceContentUpdateRequest) ToEntity() *entity.OurServiceContent {
return &entity.OurServiceContent{
PrimaryTitle: r.PrimaryTitle,
SecondaryTitle: r.SecondaryTitle,
Description: r.Description,
}
}