31 lines
960 B
Go
31 lines
960 B
Go
|
|
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,
|
||
|
|
}
|
||
|
|
}
|