Compare commits

...

2 Commits

Author SHA1 Message Date
9fc3ec9350 fixed typo 2022-12-20 11:14:52 +01:00
f8d064fa35 update 2022-12-20 11:08:03 +01:00
3 changed files with 19 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ type AddProductToBasketRequest struct {
ProductID int `json:"product_id"`
}
type ProductAddToBasketResponse struct {
type AddProductToBasketResponse struct {
BasketID string `json:"basket_id"`
}

12
model/catalog.go Normal file
View File

@@ -0,0 +1,12 @@
package model
import "github.com/jackc/pgtype"
type ProductModel struct {
ID int `db:"id"`
PID string `db:"pid"`
Name string `db:"name"`
Price float64 `db:"price"`
CreatedAt pgtype.Timestamp `db:"created_at"`
UpdatedAt pgtype.Timestamp `db:"updated_at"`
}

View File

@@ -1 +1,7 @@
package model
type ProductPriceModel struct {
ID int `db:"id"`
PID int `db:"pid"`
Price float64 `db:"price"`
}