Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fc3ec9350 | |||
| f8d064fa35 |
@@ -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
12
model/catalog.go
Normal 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"`
|
||||
}
|
||||
@@ -1 +1,7 @@
|
||||
package model
|
||||
|
||||
type ProductPriceModel struct {
|
||||
ID int `db:"id"`
|
||||
PID int `db:"pid"`
|
||||
Price float64 `db:"price"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user