Refactoring
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
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,omitempty"`
|
||||
}
|
||||
13
catalog/model/product.go
Normal file
13
catalog/model/product.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type ProductModel struct {
|
||||
PID string `db:"pid"`
|
||||
Name string `db:"name"`
|
||||
Price float64 `db:"price"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user