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, } }