diff --git a/model/catalog.go b/model/catalog.go new file mode 100644 index 0000000..ce74a43 --- /dev/null +++ b/model/catalog.go @@ -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"` +} diff --git a/model/pricing.go b/model/pricing.go index 8b53790..03132dd 100644 --- a/model/pricing.go +++ b/model/pricing.go @@ -1 +1,7 @@ package model + +type ProductPriceModel struct { + ID int `db:"id"` + PID int `db:"pid"` + Price float64 `db:"price"` +}