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