api-entities/model/basket.go

23 lines
592 B
Go
Raw Normal View History

2022-12-18 21:37:23 +01:00
package model
2022-12-18 20:51:26 +01:00
import (
"github.com/jackc/pgtype"
)
type BasketModel struct {
ID string `db:"id"`
2022-12-22 13:59:08 +01:00
State string `db:"state"`
2022-12-18 20:51:26 +01:00
CreatedAt pgtype.Timestamp `db:"created_at"`
UpdatedAt pgtype.Timestamp `db:"updated_at"`
}
2022-12-20 12:43:24 +01:00
type BasketItemModel struct {
ID string `db:"id"`
BasketID string `db:"basket_id"`
2022-12-22 13:53:17 +01:00
ProductID int `db:"product_id"`
2022-12-20 12:43:24 +01:00
Quantity int `db:"quantity"`
Price float64 `db:"price"`
CreatedAt pgtype.Timestamp `db:"created_at"`
UpdatedAt pgtype.Timestamp `db:"updated_at"`
}