From 72d5f93a309795531e0670990efdb6983671d221 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Mon, 20 Oct 2025 16:25:55 +0200 Subject: [PATCH] Fixes in packages namespaces --- catalog/dto/product.go | 2 +- catalog/entity/product.go | 2 +- catalog/model/product.go | 2 +- common/dto/error.go | 2 +- common/dto/health.go | 2 +- common/vo/currency.go | 2 +- common/vo/money.go | 2 +- identity/entity/user.go | 18 ++++++++++++++++++ 8 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 identity/entity/user.go diff --git a/catalog/dto/product.go b/catalog/dto/product.go index 31a1322..9448df6 100644 --- a/catalog/dto/product.go +++ b/catalog/dto/product.go @@ -1,4 +1,4 @@ -package dto +package catalog import ( "time" diff --git a/catalog/entity/product.go b/catalog/entity/product.go index 1110ca7..084cf53 100644 --- a/catalog/entity/product.go +++ b/catalog/entity/product.go @@ -1,4 +1,4 @@ -package entity +package catalog import "github.com/jackc/pgtype" diff --git a/catalog/model/product.go b/catalog/model/product.go index 164ee72..824a6df 100644 --- a/catalog/model/product.go +++ b/catalog/model/product.go @@ -1,4 +1,4 @@ -package model +package catalog import ( "time" diff --git a/common/dto/error.go b/common/dto/error.go index f6429ea..61647ae 100644 --- a/common/dto/error.go +++ b/common/dto/error.go @@ -1,4 +1,4 @@ -package dto +package common type ErrorResponseDTO struct { Error string `json:"error"` diff --git a/common/dto/health.go b/common/dto/health.go index 7d0d0cd..3e8d506 100644 --- a/common/dto/health.go +++ b/common/dto/health.go @@ -1,4 +1,4 @@ -package dto +package common type HealthResponseDTO struct { Status string `json:"status"` diff --git a/common/vo/currency.go b/common/vo/currency.go index e1cfe01..eb6d6a5 100644 --- a/common/vo/currency.go +++ b/common/vo/currency.go @@ -1,4 +1,4 @@ -package vo +package common import "strings" diff --git a/common/vo/money.go b/common/vo/money.go index 44a1979..a3ab430 100644 --- a/common/vo/money.go +++ b/common/vo/money.go @@ -1,4 +1,4 @@ -package vo +package common type Money struct { } diff --git a/identity/entity/user.go b/identity/entity/user.go new file mode 100644 index 0000000..6fe1757 --- /dev/null +++ b/identity/entity/user.go @@ -0,0 +1,18 @@ +package identity + +import "time" + +type User struct { + ID int `json:"id"` + Username string `json:"username"` + Password string `json:"password"` + CreateDate time.Time `json:"create_date"` + ModifyDate time.Time `json:"modify_date"` // FIXME: zero-value issue +} + +var TestUser = &User{ + ID: 1, + Username: "test", + Password: "test", + CreateDate: time.Now(), +}