From 63424d233a1a64760108075968cdd08b7a684d65 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Mon, 19 Dec 2022 08:52:12 +0100 Subject: [PATCH] update --- model/catalog.go | 12 ++++++++++++ model/pricing.go | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 model/catalog.go 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"` +}