api-entities/model/basket.go

22 lines
551 B
Go
Raw Permalink 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"`
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"`
ProductID string `db:"product_id"`
Quantity int `db:"quantity"`
Price float64 `db:"price"`
CreatedAt pgtype.Timestamp `db:"created_at"`
UpdatedAt pgtype.Timestamp `db:"updated_at"`
}