21 lines
450 B
Go
21 lines
450 B
Go
package front
|
|
|
|
import "qteam/app/models/productmodel"
|
|
|
|
type ProductResponse struct {
|
|
Id int `json:"id"`
|
|
Name string `json:"name"`
|
|
Brand string `json:"brand"`
|
|
ShowPrice string `json:"show_price"`
|
|
Price string `json:"price"`
|
|
}
|
|
|
|
func (this *ProductResponse) ResponseFromDb(db productmodel.Product) {
|
|
this.Id = db.Id
|
|
this.Name = db.Name
|
|
this.Brand = db.Brand
|
|
this.ShowPrice = db.ShowPrice
|
|
this.Price = db.Price
|
|
return
|
|
}
|