This commit is contained in:
Piotr Biernat 2022-12-19 08:52:12 +01:00
parent 0a5010f7b4
commit 63424d233a
2 changed files with 18 additions and 0 deletions

12
model/catalog.go Normal file
View 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"`
}

View File

@ -1 +1,7 @@
package model
type ProductPriceModel struct {
ID int `db:"id"`
PID int `db:"pid"`
Price float64 `db:"price"`
}