Compare commits

..

1 Commits

Author SHA1 Message Date
c3d15cb1a1 Updated catalog DTOs 2025-10-23 18:32:45 +02:00
2 changed files with 13 additions and 13 deletions

View File

@@ -9,12 +9,12 @@ type GetProductRequestDTO struct {
} }
type GetProductResponseDTO struct { type GetProductResponseDTO struct {
ID string `json:"id"` ID string `json:"id"`
Name string `json:"name"` Name string `json:"name"`
Slug string `json:"slug"` Slug string `json:"slug"`
Price float64 `json:"price"` Price float64 `json:"price"`
CreatedAt time.Time `json:"created_at"` CreatedAt time.Duration `json:"created_at"`
UpdatedAt time.Time `json:"updated_at,omitempty"` UpdatedAt time.Duration `json:"updated_at,omitempty"`
} }
type GetProductListRequestDTO struct { type GetProductListRequestDTO struct {

View File

@@ -1,12 +1,12 @@
package catalog package catalog
import "time" import "github.com/jackc/pgtype"
type Product struct { type Product struct {
ID string `json:"id",db:"id"` ID string `db:"id"`
Slug string `json:"slug",db:"slug"` Slug string `db:"slug"`
Name string `json:"name",db:"name"` Name string `db:"name"`
Price float64 `json:"price",db:"price"` Price float64 `db:"price"`
CreatedAt time.Time `json:"created_at",db:"created_at"` CreatedAt pgtype.Timestamp `db:"created_at"`
UpdatedAt time.Time `json:"updated_at",db:"updated_at,omitempty"` UpdatedAt pgtype.Timestamp `db:"updated_at,omitempty"`
} }