From 0ae9fd4c99f882e58438167cbd087c82bd0c7ec4 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Tue, 21 Oct 2025 14:03:13 +0200 Subject: [PATCH] Removed uneccessary suffixes --- basket/model/basket.go | 4 ++-- catalog/entity/product.go | 2 +- catalog/model/product.go | 2 +- order/model/order.go | 4 ++-- pricing/model/product_price.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/basket/model/basket.go b/basket/model/basket.go index 68605fd..c317217 100644 --- a/basket/model/basket.go +++ b/basket/model/basket.go @@ -4,13 +4,13 @@ import ( "time" ) -type BasketModel struct { +type Basket struct { State string `db:"state" json:"state"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at,omitempty"` } -type BasketItemModel struct { +type BasketItem struct { BasketID string `db:"basket_id" json:"basket_id"` ProductID int `db:"product_id" json:"product_id"` Quantity int `db:"quantity" json:"quantity"` diff --git a/catalog/entity/product.go b/catalog/entity/product.go index 084cf53..eb2a7cf 100644 --- a/catalog/entity/product.go +++ b/catalog/entity/product.go @@ -2,7 +2,7 @@ package catalog import "github.com/jackc/pgtype" -type ProductEntity struct { +type Product struct { ID int `db:"id"` PID string `db:"pid"` Name string `db:"name"` diff --git a/catalog/model/product.go b/catalog/model/product.go index 824a6df..d3aab2f 100644 --- a/catalog/model/product.go +++ b/catalog/model/product.go @@ -4,7 +4,7 @@ import ( "time" ) -type ProductModel struct { +type Product struct { PID string `db:"pid"` Name string `db:"name"` Price float64 `db:"price"` diff --git a/order/model/order.go b/order/model/order.go index 069ed30..c88cd3b 100644 --- a/order/model/order.go +++ b/order/model/order.go @@ -2,13 +2,13 @@ package order import "time" -type OrderModel struct { +type Order struct { State string `db:"state" json:"state"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at,omitempty"` } -type OrderItemModel struct { +type OrderItem struct { OrderID string `db:"order_id" json:"order_id"` ProductID int `db:"product_id" json:"product_id"` Quantity int `db:"quantity" json:"quantity"` diff --git a/pricing/model/product_price.go b/pricing/model/product_price.go index f21d2ac..0a75be0 100644 --- a/pricing/model/product_price.go +++ b/pricing/model/product_price.go @@ -1,6 +1,6 @@ package pricing -type ProductPriceModel struct { +type ProductPrice struct { PID string `db:"pid"` Price int `db:"price"` }