XinYeYouKu/app/http/entities/front/activity.go

26 lines
665 B
Go

package front
import (
"qteam/app/models/activitymodel"
"qteam/app/utils"
)
type ActivityResponse struct {
Id int `json:"id"`
Name string `json:"name"`
Banner string `json:"banner"`
Description string `json:"description"`
CreateTime string `json:"create_time"`
Product []ProductResponse `json:"product"`
}
func (p *ActivityResponse) ResponseFromDb(do activitymodel.Activity) {
//p.Id = do.Id
//do.Name = do.Name
//do.Banner = p.Banner
//do.Description = p.Description
//do.CreateTime = p.CreateTime.Format("2006-01-02 15:04:05")
utils.EntityCopy(p, &do)
return
}